Package org.ametys.web.repository.page
Class DefaultServicesAssignmentHandler
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.web.repository.page.DefaultServicesAssignmentHandler
- All Implemented Interfaces:
ServicesAssignmentHandler,Initializable,LogEnabled,Serviceable
public class DefaultServicesAssignmentHandler
extends AbstractLogEnabled
implements ServicesAssignmentHandler, Serviceable, Initializable
This implementation of the services handler is based on services declared in the whole application
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classThe cache is a HashSet of String + a date -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractCacheManagerThe cache managerprotected ServiceExtensionPointThe services managerprotected SiteTypesExtensionPointThe site type managerprotected SourceResolverThe source resolverFields inherited from interface org.ametys.web.repository.page.ServicesAssignmentHandler
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DefaultServicesAssignmentHandler.CacheGet the public services.protected DefaultServicesAssignmentHandler.Cache_parseServices(Configuration configuration, long lastModificationDade) Parses the valid services in a configuration.protected DefaultServicesAssignmentHandler.Cache_parseServices(Source configFile) Parses the valid services for the site typeprotected DefaultServicesAssignmentHandler.Cache_parseTemplateServices(Source configFile) Parse a template configuration file.protected DefaultServicesAssignmentHandler.Cache_parseZoneServices(Source configFile, String zoneName) Parse a template configuration file and get the set of available services for a given zone.getAvailableServices(SitemapElement page, String zoneName) Returns the list of available services for a givenZone.voidvoidservice(ServiceManager manager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_serviceEP
The services manager -
_siteTypeExtensionPoint
The site type manager -
_srcResolver
The source resolver -
_cacheManager
The cache manager
-
-
Constructor Details
-
DefaultServicesAssignmentHandler
public DefaultServicesAssignmentHandler()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
getAvailableServices
Description copied from interface:ServicesAssignmentHandlerReturns the list of available services for a givenZone.- Specified by:
getAvailableServicesin interfaceServicesAssignmentHandler- Parameters:
page- the Page to considerzoneName- the zone name to consider- Returns:
- the list of available services ' id for a given Page and Zone
-
_getPublicServices
Get the public services.- Returns:
- the public services.
-
_parseTemplateServices
Parse a template configuration file.- Parameters:
configFile- the template configuration file.- Returns:
- the set of available services for the template.
-
_parseZoneServices
protected DefaultServicesAssignmentHandler.Cache _parseZoneServices(Source configFile, String zoneName) Parse a template configuration file and get the set of available services for a given zone.- Parameters:
configFile- the template configuration file.zoneName- the zone name.- Returns:
- the set of available services for the given zone.
-
_parseServices
Parses the valid services for the site type- Parameters:
configFile- the configuration file.- Returns:
- the services id in a Set
-
_parseServices
protected DefaultServicesAssignmentHandler.Cache _parseServices(Configuration configuration, long lastModificationDade) throws ConfigurationException Parses the valid services in a configuration.- Parameters:
configuration- the configuration.lastModificationDade- date de dernière modification- Returns:
- the services id in a Set
- Throws:
ConfigurationException- if configuration is invalid
-