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
FieldsModifier and TypeFieldDescriptionprotected static final StringScheme for skinprotected static final PatternThe regexp for a protocolprotected ContextCocoon contextprotected SiteManagerThe site managerprotected SkinsManagerThe skins managerFields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Configuration configuration) protected SkinReturn the current skinprotected voidLookupSiteManagerandSkinsManagerfor lazy initialization.voidvoidservice(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:
servicein interfaceServiceable- Throws:
ServiceException
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
initializeComponents
LookupSiteManagerandSkinsManagerfor 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:
getSourcein interfaceSourceFactory- Throws:
IOException
-
release
- Specified by:
releasein interfaceSourceFactory
-