Class Filtering


  • public class Filtering
    extends Object
    Filtering parameters to apply on the characteristics of the objects to return. By default, the current user and the language in which the textual properties of the object have to be expressed are set. For latter, it is the language of the user, but it can be updated.
    Author:
    mmoquillon
    • Constructor Detail

      • Filtering

        public Filtering()
    • Method Detail

      • getCurrentUser

        public User getCurrentUser()
      • getLanguage

        public String getLanguage()
      • setLanguage

        public Filtering setLanguage​(String language)
        Replaces the languages to use with the specified one. By default, the language is the one of the current user.
        Parameters:
        language - the language to use in the localization of the CMIS object.
        Returns:
        itself.
      • setPropertiesFilter

        public Filtering setPropertiesFilter​(String filterExpression)
        Sets a filter on the properties of the object(s) to return.
        Parameters:
        filterExpression - a filter expression.
        Returns:
        itself.
      • getPropertiesFilter

        public Set<String> getPropertiesFilter()
        Gets the different properties to include with the object(s) to return. By default all the object(s)' properties are included.
        Returns:
        a set of object's property identifiers that have to be set in the object(s) to return. An empty list if all the object's properties have to be included with the object(s).
      • areAllowedActionsToBeIncluded

        public boolean areAllowedActionsToBeIncluded()
        Are the actions allowable to the object(s) to be included? No by default.
        Returns:
        true if the allowable actions have to be included with the object(s) to return. False otherwise.
      • setIncludeAllowableActions

        public Filtering setIncludeAllowableActions​(boolean includeAllowableActions)
        Indicates whether the allowable actions have to be included with the object(s) to return.
        Parameters:
        includeAllowableActions - a boolean indicating whether the allowable actions has to be included or not.
        Returns:
        itself.
      • isPathSegmentToBeIncluded

        public boolean isPathSegmentToBeIncluded()

        A folder hierarchy MAY be represented in a canonical notation such as path. For CMIS, a path is represented by:

        • ’/’ for the root folder.
        • All paths start with the root folder.
        • A set of the folder and object path segments separated by ’/’ in order of closest to the root.
        • Folder and object path segments are specified by pathSegment tokens which can be retrieved by all services that take an includePathSegments parameter (for example getChildren).
        • A pathSegment token MUST not include a ’/’ character. It is repository specific how a repository chooses the value for pathSegment. Repositories might choose to use cmis:name or content stream filename for pathSegment token.
        • The pathSegment token for each item MUST uniquely identify the item in the folder.

        That is, if folder A is under the root, and folder B is under A, then the path would be /A/B.

        A path for an object may be calculated in the following way:

        • If the object is the root folder, the path is ’/’.
        • If the object is a direct child of the root folder, the path is the object’s pathSegment prefixed by ’/’.
        • If the object is not a direct child of the root folder, the path is item’s parent folder cmis:path property appended by ’/’ and the object’s pathSegment.
        Returns:
        true if the object's path segments have to be included with its description, false otherwise.
      • setIncludePathSegment

        public Filtering setIncludePathSegment​(boolean includePathSegment)

        A folder hierarchy MAY be represented in a canonical notation such as path. For CMIS, a path is represented by:

        • ’/’ for the root folder.
        • All paths start with the root folder.
        • A set of the folder and object path segments separated by ’/’ in order of closest to the root.
        • Folder and object path segments are specified by pathSegment tokens which can be retrieved by all services that take an includePathSegments parameter (for example getChildren).
        • A pathSegment token MUST not include a ’/’ character. It is repository specific how a repository chooses the value for pathSegment. Repositories might choose to use cmis:name or content stream filename for pathSegment token.
        • The pathSegment token for each item MUST uniquely identify the item in the folder.

        That is, if folder A is under the root, and folder B is under A, then the path would be /A/B.

        A path for an object may be calculated in the following way:

        • If the object is the root folder, the path is ’/’.
        • If the object is a direct child of the root folder, the path is the object’s pathSegment prefixed by ’/’.
        • If the object is not a direct child of the root folder, the path is item’s parent folder cmis:path property appended by ’/’ and the object’s pathSegment.
        Parameters:
        includePathSegment - a boolean indicating if the path segment of objects have to be included with the data that describe them.
        Returns:
        itself.
      • getIncludeRelationships

        public org.apache.chemistry.opencmis.commons.enums.IncludeRelationships getIncludeRelationships()
        Gets how the relationships of an object have to be included.
        Returns:
        an IncludeRelationships value indicating how the relationships of an object have to be included within its own data describing it. By default no relationships are included (IncludeRelationships.NONE
      • setIncludeRelationships

        public Filtering setIncludeRelationships​(org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships)
        Sets how the relationships of an object have to be included with its own description.
        Parameters:
        includeRelationships - an IncludeRelationships instance indicating how the relationships of an object have to be included within its own data describing it.
        Returns:
        itself
      • getIncludeCmisObjectTypes

        public Filtering.IncludeCmisObjectTypes getIncludeCmisObjectTypes()
        Gets what types of CMIS objects have to be included. By default, all file-able object types. This filtering rule is only taken into account with subtree navigation operations.
        Returns:
        an Filtering.IncludeCmisObjectTypes value indicating what types of file-able CMIS objects have to be taken into account.
      • setIncludeCmisObjectTypes

        public Filtering setIncludeCmisObjectTypes​(Filtering.IncludeCmisObjectTypes includeCmisObjectTypes)
        Sets the types of the CMIS objects to include. By default all the file-able object types. This filtering rule is only taken into account with subtree navigation operations.
        Parameters:
        includeCmisObjectTypes - an Filtering.IncludeCmisObjectTypes value indicating what types of file-able CMIS objects have to be taken into account.
        Returns:
        itself.
      • isACLToBeIncluded

        public boolean isACLToBeIncluded()
        Is the ACL about the object(s) to be included? No by default.
        Returns:
        true if the ACL has to be included with the object(s) to return. False otherwise.
      • setIncludeAcl

        public Filtering setIncludeAcl​(boolean includeAcl)
        Indicates whether the ACL has to be included with the object(s) to return.
        Parameters:
        includeAcl - a boolean indicating whether the ACL has to be included or not.
        Returns:
        itself.