Skip to content

Cmis

Overview

Module

Entry point into the platform's CMIS repository — the internal Dirigible store by default, or S3 / SharePoint when those engines are wired in. getSession() returns the underlying Apache Chemistry Session (org.apache.chemistry.opencmis.client.api.Session) so callers can use the full CMIS 1.1 surface — create / read / update / delete documents and folders, query with CMIS-SQL, manage document versions.

The session is typed as Object on the SDK signature to avoid pulling Apache Chemistry types into the SDK compile surface. Cast it to org.apache.chemistry.opencmis.client.api.Session at the call site.

Access-control questions can be answered ahead of time with isAllowed(String, String) and getAccessDefinitions(String, String) — useful when an authorisation outcome needs to be reported before attempting the operation.

Key Features:

  • Raw CMIS Session: Returns an Apache Chemistry Session so callers can use the full CMIS 1.1 surface.
  • Backend-agnostic: Sits over the internal Dirigible repository, Amazon S3, or Microsoft SharePoint depending on the platform configuration.
  • Access-control helpers: Resolve whether a path is readable / writable, or fetch the matching access definitions, before attempting the operation.
  • Method constants: METHOD_READ and METHOD_WRITE constants for use with the access-control helpers.

Example Usage:

java
import org.eclipse.dirigible.sdk.cms.Cmis;
import org.apache.chemistry.opencmis.client.api.Session;
import org.apache.chemistry.opencmis.client.api.Folder;

if (Cmis.isAllowed("/reports", Cmis.METHOD_WRITE)) {
    Session session = (Session) Cmis.getSession();
    Folder root = session.getRootFolder();
    // ... create / read / update / delete using the raw CMIS API
}

Methods

getSession()

Returns the underlying Apache Chemistry Session for the configured CMIS repository. Cast it to org.apache.chemistry.opencmis.client.api.Session at the call site to use the full CMIS 1.1 surface.

java
public static Object getSession();

Returns

  • Type: Object (cast to org.apache.chemistry.opencmis.client.api.Session)
  • Description: The raw CMIS session connected to the platform's configured repository.

getVersioningState()

Resolves a versioning-state string (for example none, major, minor, checkedout) into the matching Apache Chemistry VersioningState enum value.

java
public static Object getVersioningState(String state);
ParameterTypeDescription
stateStringThe versioning state name.

Returns

  • Type: Object (cast to org.apache.chemistry.opencmis.commons.enums.VersioningState)
  • Description: The matching versioning-state enum value.

getUnifiedObjectDelete()

Returns the platform's unified object-delete constant used by CMIS delete operations.

java
public static Object getUnifiedObjectDelete();

Returns

  • Type: Object
  • Description: The unified delete-mode value to pass to CMIS delete calls.

isAllowed()

Checks whether the calling principal is allowed to perform the given method on the given path.

java
public static boolean isAllowed(String path, String method);
ParameterTypeDescription
pathStringThe CMIS path to check (for example /reports/2026/Q2.pdf).
methodStringThe access method — use Cmis.METHOD_READ or Cmis.METHOD_WRITE.

Returns

  • Type: boolean
  • Description: true if the principal is allowed, false otherwise.

getAccessDefinitions()

Returns the set of platform Access definitions that apply to the given path / method combination. Useful for reporting authorisation outcomes in detail (which role, which scope) before attempting the operation.

java
public static Set<Access> getAccessDefinitions(String path, String method) throws ServletException;
ParameterTypeDescription
pathStringThe CMIS path.
methodStringThe access method — use Cmis.METHOD_READ or Cmis.METHOD_WRITE.

Returns

  • Type: Set<Access>
  • Description: The access definitions matching the given path and method.

Constants

NameTypeDescription
METHOD_READStringMethod constant for read-access checks.
METHOD_WRITEStringMethod constant for write-access checks.

Released under the EPL-2.0 License.