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
Modifier and TypeClassDescriptionstatic class
Class representing the condition for a template assignment -
Field Summary
Modifier and TypeFieldDescriptionprotected SkinsManager
The skins managerprotected SourceResolver
The source resolverFields inherited from interface org.ametys.web.skin.TemplatesAssignmentHandler
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Creates the cachesprotected void
_refreshValues
(Skin skin) Get the available templates for assignmentgetAvailablesTemplates
(String skinName) Returns the list of available templates for a skingetAvailablesTemplates
(Page page) Returns the list of available templates for a given Page.void
void
service
(ServiceManager smanager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_skinsManager
The skins manager -
_srcResolver
The source resolver
-
-
Constructor Details
-
StaticTemplatesAssignmentHandler
public StaticTemplatesAssignmentHandler()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
_createCaches
Creates the caches -
getAvailablesTemplates
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
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
Get the available templates for assignment- Parameters:
skin
- The skin
-