Class BaseSession

java.lang.Object
org.nuxeo.ecm.core.model.BaseSession
All Implemented Interfaces:
Session<QueryFilter>
Direct Known Subclasses:
DBSSession, SQLSession

public abstract class BaseSession extends Object implements Session<QueryFilter>
Common code for VCS and DBS Session implementations.
Since:
11.3
  • Field Details

    • VERSION_ACL_DISABLED_PROP

      public static final String VERSION_ACL_DISABLED_PROP
      Configuration property controlling whether ACLs on versions are disabled.
      Since:
      11.3
      See Also:
    • READ_VERSION_PERM_DISABLED_PROP

      public static final String READ_VERSION_PERM_DISABLED_PROP
      Configuration property controlling whether ReadVersion permission is disabled.
      Since:
      11.3
      See Also:
    • repository

      protected final Repository repository
    • versionAclMode

      protected final BaseSession.VersionAclMode versionAclMode
    • disableReadVersionPermission

      protected final boolean disableReadVersionPermission
  • Constructor Details

    • BaseSession

      protected BaseSession(Repository repository)
  • Method Details

    • isReadVersionPermissionDisabled

      public static boolean isReadVersionPermissionDisabled()
    • getDocumentBlobManager

      protected DocumentBlobManager getDocumentBlobManager()
    • notifyAfterCopy

      protected void notifyAfterCopy(Document doc)
    • checkNegativeAcl

      protected void checkNegativeAcl(ACP acp)
    • canDeleteUndeletable

      public static boolean canDeleteUndeletable(NuxeoPrincipal principal)
      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:
      Parameters:
      principal - the Nuxeo principal
      Returns:
      true if undeletable documents can be deleted, false otherwise
      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_GROUP group can delete records.

      Returns:
      true if the retention is in strict mode, false otherwise
      Since:
      2023.1
    • getACP

      public abstract ACP getACP(Document doc)
      Gets the ACP for the document (without any inheritance).
      Parameters:
      doc - the document
      Returns:
      the ACP
    • getACP

      protected ACP getACP(Document doc, boolean replaceReadVersionPermission)
    • getMergedACP

      public ACP getMergedACP(Document doc)
      Specified by:
      getMergedACP in interface Session<QueryFilter>
    • updateACP

      protected ACP updateACP(ACP curAcp, ACP addAcp)
      Returns the merge of two ACPs.