public class DefaultServicesAssignmentHandler extends AbstractLogEnabled implements ServicesAssignmentHandler, Serviceable
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DefaultServicesAssignmentHandler.Cache
The cache is a HashSet of String + a date
|
| Modifier and Type | Field and Description |
|---|---|
private Map<String,DefaultServicesAssignmentHandler.Cache> |
_cache |
protected ServiceExtensionPoint |
_serviceEP
The services manager
|
protected SiteTypesExtensionPoint |
_siteTypeExtensionPoint
The site type manager
|
protected SourceResolver |
_srcResolver
The source resolver
|
ROLE| Constructor and Description |
|---|
DefaultServicesAssignmentHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected DefaultServicesAssignmentHandler.Cache |
_getPublicServices()
Get the public services.
|
private Set<String> |
_getServicesForSiteType(String siteType) |
private Set<String> |
_getServicesForSkin(String siteType,
String skinName) |
private Set<String> |
_getServicesForTemplate(String siteType,
String skinName,
String templateName) |
private Set<String> |
_getServicesForZone(String siteType,
String skinName,
String templateName,
String zoneName) |
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 type
|
protected 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.
|
Set<String> |
getAvailableServices(Page page,
String zoneName)
Returns the list of available services for a given
Zone. |
void |
service(ServiceManager manager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected ServiceExtensionPoint _serviceEP
protected SiteTypesExtensionPoint _siteTypeExtensionPoint
protected SourceResolver _srcResolver
private Map<String,DefaultServicesAssignmentHandler.Cache> _cache
public DefaultServicesAssignmentHandler()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic Set<String> getAvailableServices(Page page, String zoneName)
ServicesAssignmentHandlerZone.getAvailableServices in interface ServicesAssignmentHandlerpage - the Page to considerzoneName - the zone name to considerprivate Set<String> _getServicesForZone(String siteType, String skinName, String templateName, String zoneName)
private Set<String> _getServicesForTemplate(String siteType, String skinName, String templateName)
private Set<String> _getServicesForSkin(String siteType, String skinName)
private Set<String> _getServicesForSiteType(String siteType)
protected DefaultServicesAssignmentHandler.Cache _getPublicServices()
protected DefaultServicesAssignmentHandler.Cache _parseTemplateServices(Source configFile)
configFile - the template configuration file.protected DefaultServicesAssignmentHandler.Cache _parseZoneServices(Source configFile, String zoneName)
configFile - the template configuration file.zoneName - the zone name.protected DefaultServicesAssignmentHandler.Cache _parseServices(Source configFile)
configFile - the configuration file.protected DefaultServicesAssignmentHandler.Cache _parseServices(Configuration configuration, long lastModificationDade) throws ConfigurationException
configuration - the configuration.lastModificationDade - date de dernière modificationConfigurationException - if configuration is invalid