Class SkinDAO
- java.lang.Object
-
- org.ametys.plugins.skineditor.skin.SkinDAO
-
- All Implemented Interfaces:
Component
,Serviceable
public class SkinDAO extends Object implements Serviceable, Component
DAO for files and folders inside a skin directory
-
-
Field Summary
Fields Modifier and Type Field Description protected SkinLockManager
_lockManager
The lock managerprotected SkinEditionHelper
_skinHelper
The skin edition helperstatic String
ROLE
The Avalon rolestatic String
SKIN_EDITOR_TOOL_ID
Constant for skin editor tool id
-
Constructor Summary
Constructors Constructor Description SkinDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Object>
getSkinsList(String siteName)
Get the list of available and modifiable skins for a siteString
openSkin(String skinId, String mode, boolean unlinkModel)
Open a skin for editingvoid
service(ServiceManager manager)
protected void
unlinkModel(Path skinDir)
Unlink model
-
-
-
Field Detail
-
SKIN_EDITOR_TOOL_ID
public static final String SKIN_EDITOR_TOOL_ID
Constant for skin editor tool id- See Also:
- Constant Field Values
-
_lockManager
protected SkinLockManager _lockManager
The lock manager
-
_skinHelper
protected SkinEditionHelper _skinHelper
The skin edition helper
-
-
Constructor Detail
-
SkinDAO
public SkinDAO()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getSkinsList
public List<Object> getSkinsList(String siteName)
Get the list of available and modifiable skins for a site- Parameters:
siteName
- The site name- Returns:
- the list of skins
-
openSkin
public String openSkin(String skinId, String mode, boolean unlinkModel) throws Exception
Open a skin for editing- Parameters:
skinId
- the skin idmode
- the edition modeunlinkModel
- True to remove any existing change- Returns:
- the skin id
- Throws:
Exception
- if an error occurs during the skin opening process
-
unlinkModel
protected void unlinkModel(Path skinDir) throws IOException
Unlink model- Parameters:
skinDir
- The skin directory- Throws:
IOException
- If an error occurred
-
-