Package org.ametys.web.skin
Class StaticTemplatesAssignmentHandler
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.web.skin.StaticTemplatesAssignmentHandler
-
- All Implemented Interfaces:
TemplatesAssignmentHandler,Initializable,LogEnabled,Serviceable
public class StaticTemplatesAssignmentHandler extends AbstractLogEnabled implements TemplatesAssignmentHandler, Serviceable, Initializable
This implementation of the templates handler is based uppon a configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStaticTemplatesAssignmentHandler.AssignmentConditionClass representing the condition for a template assignment
-
Field Summary
Fields Modifier and Type Field Description protected SkinsManager_skinsManagerThe skins managerprotected SourceResolver_srcResolverThe source resolver-
Fields inherited from interface org.ametys.web.skin.TemplatesAssignmentHandler
ROLE
-
-
Constructor Summary
Constructors Constructor Description StaticTemplatesAssignmentHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_createCaches()Creates the cachesprotected void_refreshValues(Skin skin)Get the available templates for assignmentSet<String>getAvailablesTemplates(String skinName)Returns the list of available templates for a skinSet<String>getAvailablesTemplates(Page page)Returns the list of available templates for a given Page.voidinitialize()voidservice(ServiceManager smanager)-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_skinsManager
protected SkinsManager _skinsManager
The skins manager
-
_srcResolver
protected SourceResolver _srcResolver
The source resolver
-
-
Constructor Detail
-
StaticTemplatesAssignmentHandler
public StaticTemplatesAssignmentHandler()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
initialize
public void initialize() throws Exception
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
_createCaches
protected void _createCaches()
Creates the caches
-
getAvailablesTemplates
public Set<String> getAvailablesTemplates(String skinName)
Description copied from interface:TemplatesAssignmentHandlerReturns the list of available templates for a skin- Specified by:
getAvailablesTemplatesin interfaceTemplatesAssignmentHandler- Parameters:
skinName- the name of the skin to consider- Returns:
- the list of available templates for this skin
-
getAvailablesTemplates
public Set<String> getAvailablesTemplates(Page page)
Description copied from interface:TemplatesAssignmentHandlerReturns the list of available templates for a given Page.- Specified by:
getAvailablesTemplatesin interfaceTemplatesAssignmentHandler- Parameters:
page- the Page to consider- Returns:
- the list of available templates for a given Page
-
_refreshValues
protected void _refreshValues(Skin skin)
Get the available templates for assignment- Parameters:
skin- The skin
-
-