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 class
StaticTemplatesAssignmentHandler.AssignmentCondition
Class representing the condition for a template assignment
-
Field Summary
Fields Modifier and Type Field Description protected SkinsManager
_skinsManager
The skins managerprotected SourceResolver
_srcResolver
The 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.void
initialize()
void
service(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:
service
in interfaceServiceable
- Throws:
ServiceException
-
initialize
public void initialize() throws Exception
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
_createCaches
protected void _createCaches()
Creates the caches
-
getAvailablesTemplates
public Set<String> getAvailablesTemplates(String skinName)
Description copied from interface:TemplatesAssignmentHandler
Returns the list of available templates for a skin- Specified by:
getAvailablesTemplates
in 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:TemplatesAssignmentHandler
Returns the list of available templates for a given Page.- Specified by:
getAvailablesTemplates
in 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
-
-