public class VersioningHelper extends Object
| Constructor and Description |
|---|
VersioningHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
activateVersioning(List<String> pathes,
JCRSessionWrapper currentUserSession)
Activate versionning
|
void |
addNewVersionFile(JCRNodeWrapper node,
String tmpName,
String httpSessionID)
Activate versioning if nested and add a new version
|
static String |
formatForLabel(long timestamp)
Returns the formatted timestamp for the version label.
|
static String |
getRestoreVersionLabel(long timestamp)
Returns the label for the restored version of the file with the timestamp.
|
static String |
getVersionLabel(long timestamp)
Returns the label for the new version of the file with the timestamp.
|
static String |
getVersionLabelCurrent()
Returns the label for the new version of the file with the current timestamp.
|
void |
restoreVersionLabel(String nodeUuid,
Date versionDate,
String versionLabel,
boolean allSubTree,
JCRSessionWrapper currentUserSession) |
void |
setCacheManager(FileCacheManager cacheManager) |
void |
setCacheService(CacheService cacheService) |
void |
setFileStorage(SessionNamedDataStorage<UploadedPendingFile> fileStorage) |
void |
setVersionService(JCRVersionService versionService) |
public static String formatForLabel(long timestamp)
timestamp - the time stamp for the labelpublic static String getVersionLabel(long timestamp)
timestamp - the time stamp for the labelpublic static String getVersionLabelCurrent()
timestamp - the time stamp for the labelpublic static String getRestoreVersionLabel(long timestamp)
timestamp - the time stamp for the labelpublic void setCacheService(CacheService cacheService)
public void setVersionService(JCRVersionService versionService)
public void setCacheManager(FileCacheManager cacheManager)
public void setFileStorage(SessionNamedDataStorage<UploadedPendingFile> fileStorage)
public void activateVersioning(List<String> pathes, JCRSessionWrapper currentUserSession)
pathes - currentUserSession - public void addNewVersionFile(JCRNodeWrapper node, String tmpName, String httpSessionID) throws org.jahia.ajax.gwt.client.service.GWTJahiaServiceException
node - tmpName - org.jahia.ajax.gwt.client.service.GWTJahiaServiceExceptionpublic void restoreVersionLabel(String nodeUuid, Date versionDate, String versionLabel, boolean allSubTree, JCRSessionWrapper currentUserSession)
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.