Package org.ametys.skinfactory.actions
Class AbstractSkinAction
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.acting.AbstractAction
-
- org.apache.cocoon.acting.ServiceableAction
-
- org.ametys.skinfactory.actions.AbstractSkinAction
-
- All Implemented Interfaces:
Component,LogEnabled,Serviceable,Action
public abstract class AbstractSkinAction extends ServiceableAction
Abstract class for manipulating skin directory
-
-
Field Summary
Fields Modifier and Type Field Description protected Context_cocoonContextThe cocoon contextprotected SkinLockManager_lockManagerThe lock managerprotected SkinModelsManager_modelsManagerThe models managerprotected SiteManager_siteManagerThe sites managerprotected SkinFactoryComponent_skinFactoryManagerThe skin factory componentprotected SkinEditionHelper_skinHelperThe skin edition helperprotected SkinsManager_skinsManagerThe skin managerprotected UserManager_userManagerThe users managerprotected CurrentUserProvider_userProviderThe user providerstatic StringSKIN_FACTORY_TOOL_IDConstant for skin editor tool id-
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description AbstractSkinAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckLock(Request request, Path skinDir)Determines the skin directory is locked.protected booleancheckModelExists(Request request, String modelName)Determines if the model still existsvoidservice(ServiceManager smanager)-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
SKIN_FACTORY_TOOL_ID
public static final String SKIN_FACTORY_TOOL_ID
Constant for skin editor tool id- See Also:
- Constant Field Values
-
_cocoonContext
protected Context _cocoonContext
The cocoon context
-
_userProvider
protected CurrentUserProvider _userProvider
The user provider
-
_siteManager
protected SiteManager _siteManager
The sites manager
-
_skinFactoryManager
protected SkinFactoryComponent _skinFactoryManager
The skin factory component
-
_modelsManager
protected SkinModelsManager _modelsManager
The models manager
-
_lockManager
protected SkinLockManager _lockManager
The lock manager
-
_skinHelper
protected SkinEditionHelper _skinHelper
The skin edition helper
-
_skinsManager
protected SkinsManager _skinsManager
The skin manager
-
_userManager
protected UserManager _userManager
The users manager
-
-
Constructor Detail
-
AbstractSkinAction
public AbstractSkinAction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableAction- Throws:
ServiceException
-
checkLock
protected boolean checkLock(Request request, Path skinDir) throws IOException
Determines the skin directory is locked. If no, the lock owner is set in JSON map request attribute- Parameters:
request- The requestskinDir- The skin directory- Returns:
- <code>true</code> if the current user can write.
- Throws:
IOException- if an exception occurs while manipulating the skin directory
-
checkModelExists
protected boolean checkModelExists(Request request, String modelName)
Determines if the model still exists- Parameters:
request- The requestmodelName- The model name- Returns:
trueif the model still exists.
-
-