Package com.jalios.jcms
Interface DataController
- All Superinterfaces:
Comparable
- All Known Implementing Classes:
AlertController,BasicDataController,ContentController,JPortalPortletFieldStatusController,JPortalStructureDataController,MailMessageDataController,MediaProgressionDataController,MentionController,PortletJspDataController,PortletQueryForeachDataController,PublicationFollowerController,QuotaDataController,RecentHistoryDataController,RecommendationController,SecurityAlertMemberDataController,UnzipDataController,VoteDataController,WFDataController
A DataController is notified whenever data integrity must be
checked, write (create, update, delete, ...) must be accepted,
before and after the write is performed.
- Since:
- jcms-5.0.0
- Author:
- Olivier Dedieu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDataController's context map key to bypass give up of read rights on Publicationstatic final StringDataController's context map key to use in order to bypass, inPublication.checkWrite(int, Member, boolean, Map), the control checking that member(s) newly added in the Publication's role map are authorized to read the Publication.static final StringDataController's context map key to use in order to bypass, inPublication.checkWrite(int, Member, boolean, Map), the control checking that the Member has the read right on linked Publication/FileDocument added or removed on the Publication.static final ObjectDataController's context map key to use in order to detect wether a publication is created from a copy or from a real createstatic final StringDataController's context map key used to indicate that the operation is convertion from DBMember to Member.static final StringDataController's context map key used to indicate that the operation is an being performed on all files of a directory.static final StringDataController's context map key used to retrieve the collection of documents that were created by using the same context.static final StringDataController'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 final StringDataController's context map key used to indicate that the operation is an being performed by unzipping a document.static final StringDataController's context map key used to indicate that the operation is an upload operation (from the web interface).static final StringDataController's context map key used to indicate that the operation is an upload operation associated to another publication.static final StringDataController'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 final StringDataController's context map key used to indicate that the previous File that will be replaced or updated by upload.static final StringDataController's context map key used to indicate that the operation is an upload operation performed from wysiwyg editor.static final StringDataController's context map key used to indicate that the operation is an upload operation performed from wysiwyg editor.static final StringDataController's context map key to use in order to bypass, inPublication.checkWrite(int, Member, boolean, Map), the control forbidding a writer to set update right with member(s) not authorized to read the Publication (JCMS-8940).static final StringDataController's context map key to use in order to force delete operations (used by member, publication or workspace).static final StringDataController's context map key to use in order to disable the DBData modification check during update operations.static final StringDataController's context map key to use in order to disable integrity check during operations.static final StringDataController's context map key to use in order to ignore link during operations (used by member, publication or workspace).static final StringDataController's context map key used to indicate that the operation is batch operation requiring high performance processing (e.g caddy).static final StringDataController's context map key to use in order to indicate this is an Unlock publication operation.static final StringDataController'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 final StringDataController's context map key to use in order to indicate this is an Unlock publication operation.static final StringDataController's context map key used to indicate that the operation is performed in the scope of a Mail Fetching.static final StringDataController's context map key used to indicate that the operation is a duplication of an existing data.static final StringDataController's context map key available in afterWrite() to provide a clone of the modified data (only if op == OP_UPDATE).static final StringDataController's context map key used to indicate that the operation is a rest operation.static final ObjectDataController's context map key to use in order to save or not the current action in analyticsstatic final StringDataController's context map key to use in order to skip CSRF check during operations performed through HTTP request.static final StringDataController's context map key to use in order to indicate this is an LDAP synchronization operation.static final StringDataController's context map key used to link the WizardContext in the DataControler Map.static final ObjectDataController's context map key to use in order to detect wether a publication is the result of a merge of a workcopystatic final StringDataController's context map key to use in order to cancel write operation.
Must be used inbeforeWrite(Data, int, Member, Map). -
Method Summary
Modifier and TypeMethodDescriptionvoidafterWrite(Data data, int op, Member mbr, Map context) This method is called once the write operation has been performed.voidbeforeWrite(Data data, int op, Member mbr, Map context) This method is called before the write operation is performed.checkIntegrity(Data data) Checks if the given data respects constraints integritycheckWrite(Data data, int op, Member mbr, boolean checkIntegrity, Map context) Checks if the given write operation can be performedvoidprocessFieldStatusMap(Data data, Member mbr, Map<String, FieldStatus> map) This method is called to fill the map of FieldStatus for the given data.Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
DO_NOT_STORE
DataController's context map key to use in order to cancel write operation.
Must be used inbeforeWrite(Data, int, Member, Map).- Since:
- jcms-5.0.4
- See Also:
-
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:
-
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:
-
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:
-
CTXT_IGNORE_LINK
DataController's context map key to use in order to ignore link during 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-11.0.0
- See Also:
-
CTXT_REST
DataController's context map key used to indicate that the operation is a rest operation.- Since:
- jcms-6.0
- See Also:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
CTXT_WIZARD
DataController's context map key used to link the WizardContext in the DataControler Map.- Since:
- jcms-6.1.0
- See Also:
-
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:
-
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:
-
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:
-
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
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
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
DataController's context map key to use in order to indicate this is an LDAP synchronization operation.- Since:
- jcms-10.0.5
- See Also:
-
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:
-
CTXT_IS_LOCK_OPERATION
DataController's context map key to use in order to indicate this is an Unlock publication operation.- Since:
- jcms-10.0.9 / JCMS-11173
- See Also:
-
CTXT_IS_UNLOCK_OPERATION
DataController's context map key to use in order to indicate this is an Unlock publication operation.- Since:
- jcms-10.0.8 / JCMS-9978
- See Also:
-
CTXT_CHECK_LINK_AUTHORIZATION
DataController's context map key to use in order to bypass, inPublication.checkWrite(int, Member, boolean, Map), the control checking that the Member has the read right on linked Publication/FileDocument added or removed on the Publication.- Since:
- JCMS-12120
- See Also:
-
CTXT_FORBID_UPDATESRIGHT_WITHOUT_READRIGHTS
DataController's context map key to use in order to bypass, inPublication.checkWrite(int, Member, boolean, Map), the control forbidding a writer to set update right with member(s) not authorized to read the Publication (JCMS-8940).- Since:
- JCMS-12120
- See Also:
-
CTXT_CHECK_BAD_ROLE_ASSIGNMENT
DataController's context map key to use in order to bypass, inPublication.checkWrite(int, Member, boolean, Map), the control checking that member(s) newly added in the Publication's role map are authorized to read the Publication.- Since:
- JCMS-12120
- See Also:
-
-
Method Details
-
checkIntegrity
Checks if the given data respects constraints integrity- Parameters:
data- the data to be checked- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkWrite
Checks if the given write operation can be performed- Parameters:
data- the data involved by this operationop- the operation (OP_CREATE, OP_UPDATE, ...)mbr- the member which requests the write operationcheckIntegrity- if true, requires the constraints integrity to be checkedcontext- a map which contains context parameters (may be null)- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
processFieldStatusMap
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 datambr- the member which requests the datamap- the map of FieldStatus- Since:
- jcms-6.0.1
-
beforeWrite
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 writtenop- the operation (OP_CREATE, OP_UPDATE, ...)mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Since:
- jcms-5.0.0
-
afterWrite
This method is called once the write operation has been performed.- Parameters:
data- the data that was writtenop- the operation (OP_CREATE, OP_UPDATE, ...)mbr- the member who requested the write operationcontext- a map which contains context parameters (may be null)- Since:
- jcms-5.0.0
-