Package org.ametys.web.skin
Class SkinsManager
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.web.skin.SkinsManager
- All Implemented Interfaces:
Disposable,Initializable,Component,Contextualizable,LogEnabled,Serviceable,ThreadSafe
public class SkinsManager
extends AbstractLogEnabled
implements ThreadSafe, Serviceable, Component, Contextualizable, Initializable, Disposable
Manages the skins
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContextCocoon contextprotected ContextAvalon contextThe skins declared as external: name of the skin and file locationprotected ServiceManagerThe avalon service managerThe skins declared in jar filesprotected SiteManagerThe site managerprotected SkinConfigurationHelperThe skin configuration helperA cache of skins objects classified by absolute pathprotected SourceResolverThe excalibur source resolverprotected ViewAndParametersParserThe view and parameters parserprotected ModelItemTypeExtensionPointThe extension point for type of view parameterprotected ViewParametersManagerThe view parameters managerstatic final StringThe avalon role name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextualize(Context context) voiddispose()getDirectChildren(Skin skin) Compute the skin that are directly derived from the given oneGet the skins locationGet the list of existing skins from JARsGet a skingetSkinAndParents(Skin skin) Get the skin and recursively its parents skins in the right weight orderGet the skin name from request ornullif not foundgetSkinNameFromRequest(Request request) Get the skin name from request ornullif not foundgetSkins()Get the list of existing skinsvoidvoidservice(ServiceManager manager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
ROLE
The avalon role name -
_skins
A cache of skins objects classified by absolute path -
_externalSkins
The skins declared as external: name of the skin and file location -
_resourcesSkins
The skins declared in jar files -
_manager
The avalon service manager -
_sourceResolver
The excalibur source resolver -
_context
Avalon context -
_cocoonContext
Cocoon context -
_siteManager
The site manager -
_viewParametersManager
The view parameters manager -
_viewAndParametersParser
The view and parameters parser -
_viewParametersEP
The extension point for type of view parameter -
_skinConfigurationHelper
The skin configuration helper
-
-
Constructor Details
-
SkinsManager
public SkinsManager()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
dispose
- Specified by:
disposein interfaceDisposable
-
getResourceSkins
Get the list of existing skins from JARs- Returns:
- A set of skin names. Can be null if there is an error.
-
getSkins
Get the list of existing skins- Returns:
- A set of skin names. Can be null if there is an error.
-
getSkin
Get a skin- Parameters:
id- The id of the skin- Returns:
- The skin or null if the skin does not exist
-
getSkinAndParents
Get the skin and recursively its parents skins in the right weight order- Parameters:
skin- The non null skin to check- Returns:
- The list of parent skins INCLUDING the given one
-
getDirectChildren
Compute the skin that are directly derived from the given one- Parameters:
skin- A non null skin- Returns:
- A non null list of skins
-
getLocalSkinsLocation
Get the skins location- Returns:
- the skin location
-
getSkinNameFromRequest
Get the skin name from request ornullif not found- Returns:
- The skin name or
null
-
getSkinNameFromRequest
Get the skin name from request ornullif not found- Parameters:
request- The request- Returns:
- The skin name or
null
-