Interface DataController

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CTXT_BYPASS_GIVE_UP_RIGHTS_CHECKING
      DataController's context map key to bypass give up of read rights on Publication
      static java.lang.Object CTXT_CREATE_COPY
      DataController's context map key to use in order to detect wether a publication is created from a copy or from a real create
      static java.lang.String CTXT_DBMEMBER_CONVERT_TO_MEMBER
      DataController's context map key used to indicate that the operation is convertion from DBMember to Member.
      static java.lang.String CTXT_DOC_DIRECTORY
      DataController's context map key used to indicate that the operation is an being performed on all files of a directory.
      static java.lang.String CTXT_DOC_DOCUMENTS_COLLECTION
      DataController's context map key used to retrieve the collection of documents that were created by using the same context.
      static java.lang.String CTXT_DOC_PSTATUS_CONTROL
      DataController's context map key used to indicate that the operation is an being performed on control the pstatus of the FileDocument from its referer.
      static java.lang.String CTXT_DOC_UNZIP
      DataController's context map key used to indicate that the operation is an being performed by unzipping a document.
      static java.lang.String CTXT_DOC_UPLOAD
      DataController's context map key used to indicate that the operation is an upload operation (from the web interface).
      static java.lang.String CTXT_DOC_UPLOAD_ATTACHMENT
      DataController's context map key used to indicate that the operation is an upload operation associated to another publication.
      static java.lang.String CTXT_DOC_UPLOAD_NEW_FILE
      DataController's context map key used to indicate that the operation is an upload operation (from the web interface) and will generate a new file of file system (creation or orlder version are kept).
      static java.lang.String CTXT_DOC_UPLOAD_PREVIOUS_FILE
      DataController's context map key used to indicate that the previous File that will be replaced or updated by upload.
      static java.lang.String CTXT_DOC_UPLOAD_UNIFIED_INSERT_UPLOAD
      DataController's context map key used to indicate that the operation is an upload operation performed from wysiwyg editor.
      static java.lang.String CTXT_DOC_UPLOAD_WYSIWYG_IMAGE_UPLOAD
      DataController's context map key used to indicate that the operation is an upload operation performed from wysiwyg editor.
      static java.lang.String CTXT_FORCE_DELETE
      DataController's context map key to use in order to force delete operations (used by member, publication or workspace).
      static java.lang.String CTXT_IGNORE_DBDATA_MODIFICATION_CHECK
      DataController's context map key to use in order to disable the DBData modification check during update operations.
      static java.lang.String CTXT_IGNORE_INTEGRITY_CHECK
      DataController's context map key to use in order to disable integrity check during operations.
      static java.lang.String CTXT_IS_BATCH_OPERATION
      DataController's context map key used to indicate that the operation is batch operation requiring high performance processing (e.g caddy).
      static java.lang.String CTXT_IS_SILENT_WRITE
      DataController's context map key used to indicate that the operation is a silent write and it must not been notified to the members (eg Publication Follower, ESN Activity, ...)
      static java.lang.String CTXT_MAIL_FETCHER
      DataController's context map key used to indicate that the operation is performed in the scope of a Mail Fetching.
      static java.lang.String CTXT_ORIGINAL_DATA
      DataController's context map key used to indicate that the operation is a duplication of an existing data.
      static java.lang.String CTXT_PREVIOUS_DATA
      DataController's context map key available in afterWrite() to provide a clone of the modified data (only if op == OP_UPDATE).
      static java.lang.String CTXT_REST
      DataController's context map key used to indicate that the operation is a rest operation.
      static java.lang.Object CTXT_SAVE_ACTION_TO_ANALYTICS
      DataController's context map key to use in order to save or not the current action in analytics
      static java.lang.String CTXT_SKIP_CSRF_CHECK
      DataController's context map key to use in order to skip CSRF check during operations performed through HTTP request.
      static java.lang.String CTXT_SYNC_LDAP
      DataController's context map key to use in order to indicate this is an LDAP synchronization operation.
      static java.lang.String CTXT_WEBDAV
      DataController's context map key used to indicate that the operation is a webdav operation.
      static java.lang.String CTXT_WIZARD
      DataController's context map key used to link the WizardContext in the DataControler Map.
      static java.lang.Object CTXT_WORK_COPY_MERGE
      DataController's context map key to use in order to detect wether a publication is the result of a merge of a workcopy
      static java.lang.String DO_NOT_STORE
      DataController's context map key to use in order to cancel write operation.
      Must be used in beforeWrite(Data, int, Member, Map).
      static java.lang.String REVISION  
    • Field Detail

      • CTXT_IGNORE_INTEGRITY_CHECK

        static final java.lang.String CTXT_IGNORE_INTEGRITY_CHECK
        DataController's context map key to use in order to disable integrity check during operations.
        Warning: This is potentially very dangerous !!! Be sure of what you do if you use it.
        Since:
        jcms-5.0.4
        See Also:
        Constant Field Values
      • CTXT_SKIP_CSRF_CHECK

        static final java.lang.String CTXT_SKIP_CSRF_CHECK
        DataController's context map key to use in order to skip CSRF check during operations performed through HTTP request.
        Warning: This is potentially very dangerous !!! Be sure of what you do if you use it.
        See Also:
        Constant Field Values
      • CTXT_FORCE_DELETE

        static final java.lang.String CTXT_FORCE_DELETE
        DataController's context map key to use in order to force delete operations (used by member, publication or workspace).
        Warning: This is potentially very dangerous !!! Be sure of what you do if you use it.
        Since:
        jcms-5.5.0
        See Also:
        Constant Field Values
      • CTXT_WEBDAV

        static final java.lang.String CTXT_WEBDAV
        DataController's context map key used to indicate that the operation is a webdav operation.
        Since:
        jcms-5.5.0
        See Also:
        Constant Field Values
      • CTXT_REST

        static final java.lang.String CTXT_REST
        DataController's context map key used to indicate that the operation is a rest operation.
        Since:
        jcms-6.0
        See Also:
        Constant Field Values
      • CTXT_DOC_UPLOAD

        static final java.lang.String CTXT_DOC_UPLOAD
        DataController's context map key used to indicate that the operation is an upload operation (from the web interface).
        Since:
        jcms-5.5.0
        See Also:
        Constant Field Values
      • CTXT_DOC_UPLOAD_NEW_FILE

        static final java.lang.String CTXT_DOC_UPLOAD_NEW_FILE
        DataController's context map key used to indicate that the operation is an upload operation (from the web interface) and will generate a new file of file system (creation or orlder version are kept).
        Since:
        jcms-7.1.1
        See Also:
        Constant Field Values
      • CTXT_DOC_UPLOAD_PREVIOUS_FILE

        static final java.lang.String CTXT_DOC_UPLOAD_PREVIOUS_FILE
        DataController's context map key used to indicate that the previous File that will be replaced or updated by upload. This may be null.
        Since:
        jcms-10.0.6
        See Also:
        Constant Field Values
      • CTXT_DOC_UPLOAD_ATTACHMENT

        static final java.lang.String CTXT_DOC_UPLOAD_ATTACHMENT
        DataController's context map key used to indicate that the operation is an upload operation associated to another publication.
        Since:
        jcms-9.0.2
        See Also:
        Constant Field Values
      • CTXT_DOC_UPLOAD_WYSIWYG_IMAGE_UPLOAD

        static final java.lang.String CTXT_DOC_UPLOAD_WYSIWYG_IMAGE_UPLOAD
        DataController's context map key used to indicate that the operation is an upload operation performed from wysiwyg editor.
        Since:
        jcms-10.0.2 / JCMS-6769
        See Also:
        Constant Field Values
      • CTXT_DOC_UPLOAD_UNIFIED_INSERT_UPLOAD

        static final java.lang.String CTXT_DOC_UPLOAD_UNIFIED_INSERT_UPLOAD
        DataController's context map key used to indicate that the operation is an upload operation performed from wysiwyg editor.
        Since:
        jcms-10.0.2 / JCMS-6769
        See Also:
        Constant Field Values
      • CTXT_DOC_UNZIP

        static final java.lang.String CTXT_DOC_UNZIP
        DataController's context map key used to indicate that the operation is an being performed by unzipping a document.

        If this key is present in the context map, the value in the Map will contains the original FileDocument (which may not have been created in the store and may not be).

        Since:
        jcms-5.7.3
        See Also:
        Constant Field Values
      • CTXT_DOC_DIRECTORY

        static final java.lang.String CTXT_DOC_DIRECTORY
        DataController's context map key used to indicate that the operation is an being performed on all files of a directory.

        If this key is present in the context map, the value in the Map will contains the File instance pointing to the directory being worked on.

        Since:
        jcms-5.7.3
        See Also:
        Constant Field Values
      • CTXT_DOC_DOCUMENTS_COLLECTION

        static final java.lang.String CTXT_DOC_DOCUMENTS_COLLECTION
        DataController's context map key used to retrieve the collection of documents that were created by using the same context.

        This key is filled for batch operation such as Unzipping or filedocument creation from Directory.

        If this key is present in the context map, the value is a Collection of FileDocument.

        Since:
        jcms-10.0.3
        See Also:
        Constant Field Values
      • CTXT_DOC_PSTATUS_CONTROL

        static final java.lang.String CTXT_DOC_PSTATUS_CONTROL
        DataController's context map key used to indicate that the operation is an being performed on control the pstatus of the FileDocument from its referer.
        Since:
        jcms-6.1.0
        See Also:
        Constant Field Values
      • CTXT_PREVIOUS_DATA

        static final java.lang.String CTXT_PREVIOUS_DATA
        DataController's context map key available in afterWrite() to provide a clone of the modified data (only if op == OP_UPDATE).
        Since:
        jcms-6.1.0
        See Also:
        Constant Field Values
      • CTXT_ORIGINAL_DATA

        static final java.lang.String CTXT_ORIGINAL_DATA
        DataController's context map key used to indicate that the operation is a duplication of an existing data. The bound value is the original data.
        Since:
        jcms-5.7.4
        See Also:
        Constant Field Values
      • CTXT_IS_BATCH_OPERATION

        static final java.lang.String CTXT_IS_BATCH_OPERATION
        DataController's context map key used to indicate that the operation is batch operation requiring high performance processing (e.g caddy).
        Since:
        jcms-6.1.0
        See Also:
        Constant Field Values
      • CTXT_IS_SILENT_WRITE

        static final java.lang.String CTXT_IS_SILENT_WRITE
        DataController's context map key used to indicate that the operation is a silent write and it must not been notified to the members (eg Publication Follower, ESN Activity, ...)
        Since:
        jcms-10.0.0
        See Also:
        Constant Field Values
      • CTXT_WIZARD

        static final java.lang.String CTXT_WIZARD
        DataController's context map key used to link the WizardContext in the DataControler Map.
        Since:
        jcms-6.1.0
        See Also:
        Constant Field Values
      • CTXT_MAIL_FETCHER

        static final java.lang.String CTXT_MAIL_FETCHER
        DataController's context map key used to indicate that the operation is performed in the scope of a Mail Fetching. The Map is shared between DataControllers and MailPolicyFilter.
        Since:
        jcms-6.1.0
        See Also:
        Constant Field Values
      • CTXT_DBMEMBER_CONVERT_TO_MEMBER

        static final java.lang.String CTXT_DBMEMBER_CONVERT_TO_MEMBER
        DataController's context map key used to indicate that the operation is convertion from DBMember to Member.
        Since:
        jcms-6.1.
        See Also:
        Constant Field Values
      • CTXT_IGNORE_DBDATA_MODIFICATION_CHECK

        static final java.lang.String CTXT_IGNORE_DBDATA_MODIFICATION_CHECK
        DataController's context map key to use in order to disable the DBData modification check during update operations. Without this check, DBData are always updated in database, even when no field has been detected as modified through signature comparison.
        Since:
        jcms-7.0.0
        See Also:
        Constant Field Values
      • CTXT_CREATE_COPY

        static final java.lang.Object CTXT_CREATE_COPY
        DataController's context map key to use in order to detect wether a publication is created from a copy or from a real create
        Since:
        jcms-9.0.2
      • CTXT_WORK_COPY_MERGE

        static final java.lang.Object CTXT_WORK_COPY_MERGE
        DataController's context map key to use in order to detect wether a publication is the result of a merge of a workcopy
        Since:
        jcms-9.0.3
      • CTXT_SAVE_ACTION_TO_ANALYTICS

        static final java.lang.Object CTXT_SAVE_ACTION_TO_ANALYTICS
        DataController's context map key to use in order to save or not the current action in analytics
        Since:
        jcms-10.0.3
      • CTXT_SYNC_LDAP

        static final java.lang.String CTXT_SYNC_LDAP
        DataController's context map key to use in order to indicate this is an LDAP synchronization operation.
        Since:
        jcms-10.0.5
        See Also:
        Constant Field Values
      • CTXT_BYPASS_GIVE_UP_RIGHTS_CHECKING

        static final java.lang.String CTXT_BYPASS_GIVE_UP_RIGHTS_CHECKING
        DataController's context map key to bypass give up of read rights on Publication
        Since:
        jcms-10.0.6
        See Also:
        Constant Field Values
    • Method Detail

      • checkIntegrity

        ControllerStatus checkIntegrity​(Data data)
        Checks if the given data respects constraints integrity
        Parameters:
        data - the data to be checked
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • checkWrite

        ControllerStatus checkWrite​(Data data,
                                    int op,
                                    Member mbr,
                                    boolean checkIntegrity,
                                    java.util.Map context)
        Checks if the given write operation can be performed
        Parameters:
        data - the data involved by this operation
        op - the operation (OP_CREATE, OP_UPDATE, ...)
        mbr - the member which requests the write operation
        checkIntegrity - if true, requires the constraints integrity to be checked
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • processFieldStatusMap

        void processFieldStatusMap​(Data data,
                                   Member mbr,
                                   java.util.Map<java.lang.String,​FieldStatus> map)
        This method is called to fill the map of FieldStatus for the given data. The key of the map in the name of the field.
        Parameters:
        data - the data
        mbr - the member which requests the data
        map - the map of FieldStatus
        Since:
        jcms-6.0.1
      • beforeWrite

        void beforeWrite​(Data data,
                         int op,
                         Member mbr,
                         java.util.Map context)
        This method is called before the write operation is performed. The DataController can prevent the objet to be write in the store by setting the attribute DataController.DO_NOT_STORE to Boolean.TRUE in the context.
        Parameters:
        data - the data which will be written
        op - the operation (OP_CREATE, OP_UPDATE, ...)
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Since:
        jcms-5.0.0
      • afterWrite

        void afterWrite​(Data data,
                        int op,
                        Member mbr,
                        java.util.Map context)
        This method is called once the write operation has been performed.
        Parameters:
        data - the data that was written
        op - the operation (OP_CREATE, OP_UPDATE, ...)
        mbr - the member who requested the write operation
        context - a map which contains context parameters (may be null)
        Since:
        jcms-5.0.0