Package org.nuxeo.ecm.core.model
Class BaseSession
java.lang.Object
org.nuxeo.ecm.core.model.BaseSession
- All Implemented Interfaces:
Session<QueryFilter>
- Direct Known Subclasses:
DBSSession,SQLSession
Common code for VCS and DBS
Session implementations.- Since:
- 11.3
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanstatic final StringConfiguration property controlling whether ReadVersion permission is disabled.protected final Repositorystatic final StringConfiguration property controlling whether ACLs on versions are disabled.protected final BaseSession.VersionAclModeFields inherited from interface org.nuxeo.ecm.core.model.Session
PROP_ALLOW_DELETE_UNDELETABLE_DOCUMENTS, PROP_RETENTION_COMPLIANCE_MODE_ENABLED, PROP_RETENTION_STRICT_MODE_ENABLED, USER_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanDeleteUndeletable(NuxeoPrincipal principal) Can undeletable documents be deleted.protected voidcheckNegativeAcl(ACP acp) abstract ACPGets the ACP for the document (without any inheritance).protected ACPprotected DocumentBlobManagergetMergedACP(Document doc) static booleanstatic booleanIs the retention in strict mode?protected voidnotifyAfterCopy(Document doc) protected ACPReturns the merge of two ACPs.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.ecm.core.model.Session
commit, copy, createProxy, destroy, end, getBinaryFulltext, getDocumentByUUID, getLockManager, getNullDocument, getProxies, getProxies, getRepositoryName, getRootDocument, getVersion, importDocument, isFulltextStoredInBlob, isNegativeAclAllowed, move, query, queryAndFetch, queryProjection, removeDocument, resolvePath, rollback, save, scroll, scroll, scroll, setACP, setProxyTarget, start, updateReadACLs
-
Field Details
-
VERSION_ACL_DISABLED_PROP
Configuration property controlling whether ACLs on versions are disabled.- Since:
- 11.3
- See Also:
-
READ_VERSION_PERM_DISABLED_PROP
Configuration property controlling whether ReadVersion permission is disabled.- Since:
- 11.3
- See Also:
-
repository
-
versionAclMode
-
disableReadVersionPermission
protected final boolean disableReadVersionPermission
-
-
Constructor Details
-
BaseSession
-
-
Method Details
-
isReadVersionPermissionDisabled
public static boolean isReadVersionPermissionDisabled() -
getDocumentBlobManager
-
notifyAfterCopy
-
checkNegativeAcl
-
canDeleteUndeletable
Can undeletable documents be deleted. Undeletable documents are documents under legal hold or retention.They are deletable only if on of these conditions is true:Session.PROP_ALLOW_DELETE_UNDELETABLE_DOCUMENTSis true for unit tests purpose- Retention is active in governance mode and the principal is member of
SecurityConstants.RECORDS_CLEANER_GROUP
- Parameters:
principal- the Nuxeo principal- Returns:
trueif undeletable documents can be deleted,falseotherwise- Since:
- 11.5
-
isRetentionStricMode
public static boolean isRetentionStricMode()Is the retention in strict mode? False by default.In strict mode, nobody can delete documents under retention or legal hold.
Otherwise users member of the
SecurityConstants.RECORDS_CLEANER_GROUPgroup can delete records.- Returns:
- true if the retention is in strict mode, false otherwise
- Since:
- 2023.1
-
getACP
Gets the ACP for the document (without any inheritance).- Parameters:
doc- the document- Returns:
- the ACP
-
getACP
-
getMergedACP
- Specified by:
getMergedACPin interfaceSession<QueryFilter>
-
updateACP
Returns the merge of two ACPs.
-