Class DBDataRevisionManager


  • public class DBDataRevisionManager
    extends java.lang.Object
    This class manages revision for HistorizedDBData
    Since:
    jcms-6.2.0
    Author:
    Olivier Dedieu
    • Method Detail

      • getRevisionList

        public java.util.List<DBDataRevision> getRevisionList​(Data data)
        Returns the list of DBDataRevision for the given data.
        Parameters:
        data - the data
        Returns:
        the list of DBDataRevision for the given data.
        Since:
        jcms-6.2.0
      • getRevisionList

        public java.util.List<DBDataRevision> getRevisionList​(java.lang.Class clazz,
                                                              java.lang.String id)
        Returns the list of DBDataRevision for the given data.
        Parameters:
        clazz - the class of the Data
        id - the id of the data
        Returns:
        the list of DBDataRevision for the given data.
        Since:
        jcms-6.2.0
      • getRevisionClass

        public java.lang.Class getRevisionClass​(java.lang.Class clazz)
        Returns the revision class bound to the given class.
        Parameters:
        clazz - the class
        Returns:
        the revision class bound to the given class.
        Since:
        jcms-6.2.0
      • getRevisionDataList

        public java.util.List<Data> getRevisionDataList​(Data data)
        Returns a list of data representation of each revision of the given data.
        Parameters:
        data - the data
        Returns:
        a list of data representation of each revision of the given data.
        Since:
        jcms-6.2.0
      • getRevisionDataList

        public java.util.List<Data> getRevisionDataList​(java.lang.String id)
        Returns a list of data representation of each revision of the given data.
        Parameters:
        id - the id of the data
        Returns:
        a list of data representation of each revision of the given data.
        Since:
        jcms-6.2.0
      • getRevisionDataList

        public java.util.List<Data> getRevisionDataList​(java.lang.Class clazz,
                                                        java.lang.String id)
        Returns a list of data representation of each revision of the given data.
        Parameters:
        clazz - the class of the data
        id - the id of the data
        Returns:
        a list of data representation of each revision of the given data.
        Since:
        jcms-6.2.0
      • addRevision

        public DBDataRevision addRevision​(DBData data,
                                          int op,
                                          Member mbr)
        Add a new revision for the given data.
        Parameters:
        data - the data
        op - the operation (OP_CREATE, OP_UPDATE or OP_DELETE)
        mbr - the author of the revision
        Returns:
        the new DBDataRevision
        Since:
        jcms-6.2.0