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
_cocoonContext
The cocoon contextprotected SkinLockManager
_lockManager
The lock managerprotected SkinModelsManager
_modelsManager
The models managerprotected SiteManager
_siteManager
The sites managerprotected SkinFactoryComponent
_skinFactoryManager
The skin factory componentprotected SkinEditionHelper
_skinHelper
The skin edition helperprotected SkinsManager
_skinsManager
The skin managerprotected UserManager
_userManager
The users managerprotected CurrentUserProvider
_userProvider
The user providerstatic String
SKIN_FACTORY_TOOL_ID
Constant 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 boolean
checkLock(Request request, Path skinDir)
Determines the skin directory is locked.protected boolean
checkModelExists(Request request, String modelName)
Determines if the model still existsvoid
service(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:
service
in interfaceServiceable
- Overrides:
service
in 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:
true
if the model still exists.
-
-