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
Modifier and TypeFieldDescriptionprotected Context
Cocoon contextprotected Context
Avalon contextThe skins declared as external: name of the skin and file locationprotected ServiceManager
The avalon service managerThe skins declared in jar filesprotected SiteManager
The site managerprotected SkinConfigurationHelper
The skin configuration helperA cache of skins objects classified by absolute pathprotected SourceResolver
The excalibur source resolverprotected ViewAndParametersParser
The view and parameters parserprotected ModelItemTypeExtensionPoint
The extension point for type of view parameterprotected ViewParametersManager
The view parameters managerstatic final String
The avalon role name -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) void
dispose()
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 ornull
if not foundgetSkinNameFromRequest
(Request request) Get the skin name from request ornull
if not foundgetSkins()
Get the list of existing skinsvoid
void
service
(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:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
dispose
- Specified by:
dispose
in 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 ornull
if not found- Returns:
- The skin name or
null
-
getSkinNameFromRequest
Get the skin name from request ornull
if not found- Parameters:
request
- The request- Returns:
- The skin name or
null
-