public class CommonSkinDAO extends Object implements Serviceable, Component
| Modifier and Type | Field and Description | 
|---|---|
private static String | 
__TEMP_MODE  | 
private static String | 
__WORK_MODE  | 
private SkinLockManager | 
_lockManager  | 
private SiteManager | 
_siteManager  | 
private SkinEditionHelper | 
_skinHelper  | 
private UserManager | 
_userManager  | 
private CurrentUserProvider | 
_userProvider  | 
| Constructor and Description | 
|---|
CommonSkinDAO()  | 
| Modifier and Type | Method and Description | 
|---|---|
private Map<String,Object> | 
_checkLock(String skinName)  | 
private String | 
_getSkinName(String siteName,
            String skinName)  | 
Map<String,Object> | 
cancelChanges(String skinName,
             boolean workVersion,
             String toolId)
Cancel the current modification to the skin 
 | 
Map<String,Object> | 
checkUnsaveModifications(String skinName)
Check if there is unsaved or uncomitted changes 
 | 
Map<String,Object> | 
clearModifications(String skinName,
                  boolean workVersion)
Revert changes and back to last work version or to current skin 
 | 
Map<String,Object> | 
commitChanges(String skinName,
             boolean quit)
Commit the changes made to the skin 
 | 
Map<String,Object> | 
getLock(String siteName,
       String skinName)
Get lock informations on a skin 
 | 
String | 
getPreviewURI(String siteName,
             String lang)
Get the URI to preview a site 
 | 
String | 
getSkinModel(String siteName,
            String skinName,
            String mode)
Get the model for the skin 
 | 
Map<String,Object> | 
saveChanges(String skinName,
           boolean quit)
Save the current skin into the skin work folder 
 | 
void | 
service(ServiceManager smanager)  | 
private static final String __TEMP_MODE
private static final String __WORK_MODE
private SiteManager _siteManager
private SkinEditionHelper _skinHelper
private SkinLockManager _lockManager
private CurrentUserProvider _userProvider
private UserManager _userManager
public CommonSkinDAO()
public void service(ServiceManager smanager) throws ServiceException
service in interface ServiceableServiceExceptionpublic String getPreviewURI(String siteName, String lang)
siteName - the site namelang - the site langagepublic Map<String,Object> checkUnsaveModifications(String skinName) throws IOException
skinName - The skin nameIOException - if an error occurs while manipulating filespublic Map<String,Object> saveChanges(String skinName, boolean quit) throws IOException
skinName - The name of the skinquit - True if the temp directory can be removedIOException - if an error occurs while manipulating filespublic Map<String,Object> commitChanges(String skinName, boolean quit) throws Exception
skinName - the name of the skinquit - True to remove the temporary directoryException - if an error occurs when committing the skin changespublic Map<String,Object> cancelChanges(String skinName, boolean workVersion, String toolId) throws IOException
skinName - The name of the skinworkVersion - True it is the work version, false for the temp versiontoolId - the id of the toolIOException - if an error occurs while manipulating filesprivate Map<String,Object> _checkLock(String skinName) throws IOException
IOExceptionpublic String getSkinModel(String siteName, String skinName, String mode)
siteName - the site name. Can be null if skinName is not null.skinName - the skin name. Can be null if siteName is not null.mode - the edition mode. Can be null.private String _getSkinName(String siteName, String skinName)
public Map<String,Object> getLock(String siteName, String skinName) throws IOException
siteName - the site name. Can be null if skinName is not null.skinName - the skin name. Can be null if siteName is not null.IOException - if an error occurspublic Map<String,Object> clearModifications(String skinName, boolean workVersion) throws IOException
skinName - The skin nameworkVersion - true to get back the work versionIOException - if an error occurs