Class VersionManager

java.lang.Object
com.jalios.jcms.VersionManager

public class VersionManager extends Object
  • Method Details

    • getInstance

      public static VersionManager getInstance()
    • getVersionList

      public List<? extends Storable> getVersionList(Data data) throws LogException
      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

      public List<? extends Storable> getVersionList(String id) throws LogException
      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