Package com.jalios.jcms
Class VersionManager
java.lang.Object
com.jalios.jcms.VersionManager
-
Method Summary
Modifier and TypeMethodDescriptiongetDeletedSet(Class<? extends Storable> clazz) Get the latest version of the deleted Data for a given class.static VersionManagergetVersionList(Data data) Get all the version of a given Data.getVersionList(String id) Get all the version of a Data, given its id.
-
Method Details
-
getInstance
-
getVersionList
Get all the version of a given Data. Since jcms-5.5, if this data is deleted, the list contains one more element which represents the deleted version. This element contains the deletion date (getDdate()) and the deletion author (getOpAuthor()). CAUTION: SLOW! this method parses the store to find the version, use with care.- Parameters:
data- the data- Returns:
- a unmodifiable list of Data
- Throws:
LogException- if an error occured while reading store.xml- Since:
- jcms-3.0
-
getVersionList
Get all the version of a Data, given its id. Since jcms-5.5, if this data is deleted, the list contains one more element which represents the deleted version. This element contains the deletion date (getDdate()) and the deletion author (getOpAuthor()). CAUTION: SLOW! this method parses the store to find the version, use with care.- Parameters:
id- the data id- Returns:
- a unmodifable List of Data
- Throws:
LogException- if an error occured while reading store.xml- Since:
- jcms-3.0
-
getDeletedSet
public TreeSet<? extends Storable> getDeletedSet(Class<? extends Storable> clazz) throws LogException Get the latest version of the deleted Data for a given class. CAUTION: SLOW! this methods re-read the store to find the deleted object of the given Class, use with care.- Parameters:
clazz- the searched class- Returns:
- a Set of Data
- Throws:
LogException- if an error occured while reading store.xml- Since:
- jcms-3.0
-