Package org.ametys.web.source
Class SkinSourceFactory
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.source.SkinSourceFactory
- All Implemented Interfaces:
LogEnabled
,Component
,Configurable
,Serviceable
,SourceFactory
- Direct Known Subclasses:
TemplateSourceFactory
public class SkinSourceFactory
extends AbstractLogEnabled
implements SourceFactory, Serviceable, Configurable
Resolve the protocol skin:// seeking file in skins/{siteConfiguration:skin}/
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
Scheme for skinprotected static final Pattern
The regexp for a protocolprotected Context
Cocoon contextprotected SiteManager
The site managerprotected SkinsManager
The skins managerFields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) protected Skin
Return the current skinprotected void
LookupSiteManager
andSkinsManager
for lazy initialization.void
void
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
__SOURCE_PATTERN
The regexp for a protocol -
__SKIN_SCHEME
Scheme for skin- See Also:
-
_skinsManager
The skins manager -
_siteManager
The site manager -
_cocoonContext
Cocoon context
-
-
Constructor Details
-
SkinSourceFactory
public SkinSourceFactory()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
initializeComponents
LookupSiteManager
andSkinsManager
for lazy initialization. -
getSkin
Return the current skin- Parameters:
name
- the skin name. Can be null or emptydefaultValue
- switch to this value if skin cannot be determined, or if the determined skin does not exist. Can be null- Returns:
- the skin. Cannot be null.
- Throws:
SourceNotFoundException
- If the skin do not exist
-
getSource
- Specified by:
getSource
in interfaceSourceFactory
- Throws:
IOException
-
release
- Specified by:
release
in interfaceSourceFactory
-