Class SkinDAO
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.skincommons.AbstractCommonSkinDAO
org.ametys.plugins.skineditor.skin.SkinDAO
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
DAO for files and folders inside a skin directory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Constant for the id of right to edit teh current skinstatic final String
Constant for the id of right to edit all skinsstatic final String
The Avalon rolestatic final String
Constant for skin editor tool idFields inherited from class org.ametys.plugins.skincommons.AbstractCommonSkinDAO
_lockManager, _siteManager, _skinHelper, _skinsManager, _userManager, _userProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkUserRight
(String skinName) Check user rights and throwsAccessDeniedException
if it is not authorizedGet the list of available and modifiable skins for a siteOpen a skin for editingvoid
service
(ServiceManager manager) protected void
unlinkModel
(Path skinDir) Unlink modelMethods inherited from class org.ametys.plugins.skincommons.AbstractCommonSkinDAO
cancelChanges, checkUnsaveModifications, clearModifications, commitChanges, getLock, getPreviewURI, getSkinModel, saveChanges
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role -
EDIT_SKINS_RIGHT_ID
Constant for the id of right to edit all skins- See Also:
-
EDIT_CURRENT_SKIN_RIGHT_ID
Constant for the id of right to edit teh current skin- See Also:
-
SKIN_EDITOR_TOOL_ID
Constant for skin editor tool id- See Also:
-
-
Constructor Details
-
SkinDAO
public SkinDAO()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractCommonSkinDAO
- Throws:
ServiceException
-
checkUserRight
Description copied from class:AbstractCommonSkinDAO
Check user rights and throwsAccessDeniedException
if it is not authorized- Specified by:
checkUserRight
in classAbstractCommonSkinDAO
- Parameters:
skinName
- the skin name
-
getSkinsList
Get the list of available and modifiable skins for a site- Returns:
- the list of skins
-
openSkin
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
Unlink model- Parameters:
skinDir
- The skin directory- Throws:
IOException
- If an error occurred
-