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 StringConstant for the id of right to edit teh current skinstatic final StringConstant for the id of right to edit all skinsstatic final StringThe Avalon rolestatic final StringConstant 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 voidcheckUserRight(String skinName) Check user rights and throwsAccessDeniedExceptionif it is not authorizedGet the list of available and modifiable skins for a siteOpen a skin for editingvoidservice(ServiceManager manager) protected voidunlinkModel(Path skinDir) Unlink modelMethods inherited from class org.ametys.plugins.skincommons.AbstractCommonSkinDAO
cancelChanges, checkUnsaveModifications, clearModifications, commitChanges, getLock, getPreviewURI, getSkinModel, saveChangesMethods 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:
servicein interfaceServiceable- Overrides:
servicein classAbstractCommonSkinDAO- Throws:
ServiceException
-
checkUserRight
Description copied from class:AbstractCommonSkinDAOCheck user rights and throwsAccessDeniedExceptionif it is not authorized- Specified by:
checkUserRightin 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
-