/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * Kind, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ using PortCMIS.Data; using PortCMIS.Data.Extensions; using PortCMIS.Enums; using System.Collections.Generic; using System.Numerics; namespace PortCMIS.Binding.Services { /// /// Repository Service interface. /// public interface IRepositoryService { /// /// Returns a list of CMIS repository information available from this CMIS service endpoint. /// /// /// In contrast to the CMIS specification this method returns repository infos not only repository IDs. /// IList GetRepositoryInfos(IExtensionsData extension); /// /// Returns information about the CMIS repository, the optional capabilities it supports and its /// access control information if applicable. /// IRepositoryInfo GetRepositoryInfo(string repositoryId, IExtensionsData extension); /// /// Returns the list of object types defined for the repository that are children of the specified type. /// ITypeDefinitionList GetTypeChildren(string repositoryId, string typeId, bool? includePropertyDefinitions, BigInteger? maxItems, BigInteger? skipCount, IExtensionsData extension); /// /// Returns the set of descendant object type defined for the repository under the specified type. /// IList GetTypeDescendants(string repositoryId, string typeId, BigInteger? depth, bool? includePropertyDefinitions, IExtensionsData extension); /// /// Gets the definition of the specified object type. /// ITypeDefinition GetTypeDefinition(string repositoryId, string typeId, IExtensionsData extension); /// /// Creates a new type. /// ITypeDefinition CreateType(string repositoryId, ITypeDefinition type, IExtensionsData extension); /// /// Updates a type. /// ITypeDefinition UpdateType(string repositoryId, ITypeDefinition type, IExtensionsData extension); /// /// Deletes a type. /// void DeleteType(string repositoryId, string typeId, IExtensionsData extension); } /// /// Navigation Service interface. /// public interface INavigationService { /// /// Gets the list of child objects contained in the specified folder. /// IObjectInFolderList GetChildren(string repositoryId, string folderId, string filter, string orderBy, bool? includeAllowableActions, IncludeRelationships? includeRelationships, string renditionFilter, bool? includePathSegment, BigInteger? maxItems, BigInteger? skipCount, IExtensionsData extension); /// /// Gets the set of descendant objects contained in the specified folder or any of its child folders. /// IList GetDescendants(string repositoryId, string folderId, BigInteger? depth, string filter, bool? includeAllowableActions, IncludeRelationships? includeRelationships, string renditionFilter, bool? includePathSegment, IExtensionsData extension); /// /// Gets the set of descendant folder objects contained in the specified folder. /// IList GetFolderTree(string repositoryId, string folderId, BigInteger? depth, string filter, bool? includeAllowableActions, IncludeRelationships? includeRelationships, string renditionFilter, bool? includePathSegment, IExtensionsData extension); /// /// Gets the parent folder(s) for the specified non-folder, fileable object. /// IList GetObjectParents(string repositoryId, string objectId, string filter, bool? includeAllowableActions, IncludeRelationships? includeRelationships, string renditionFilter, bool? includeRelativePathSegment, IExtensionsData extension); /// /// Gets the parent folder object for the specified folder object. /// IObjectData GetFolderParent(string repositoryId, string folderId, string filter, IExtensionsData extension); /// /// Gets the list of documents that are checked out that the user has access to. /// IObjectList GetCheckedOutDocs(string repositoryId, string folderId, string filter, string orderBy, bool? includeAllowableActions, IncludeRelationships? includeRelationships, string renditionFilter, BigInteger? maxItems, BigInteger? skipCount, IExtensionsData extension); } /// /// Object Service interface. /// public interface IObjectService { /// /// Creates a document object of the specified type (given by the cmis:objectTypeId property) in the (optionally) specified location. /// string CreateDocument(string repositoryId, IProperties properties, string folderId, IContentStream contentStream, VersioningState? versioningState, IList policies, IAcl addAces, IAcl removeAces, IExtensionsData extension); /// /// Creates a document object as a copy of the given source document in the (optionally) specified location. /// string CreateDocumentFromSource(string repositoryId, string sourceId, IProperties properties, string folderId, VersioningState? versioningState, IList policies, IAcl addAces, IAcl removeAces, IExtensionsData extension); /// /// Creates a folder object of the specified type (given by the cmis:objectTypeId property) in the specified location. /// string CreateFolder(string repositoryId, IProperties properties, string folderId, IList policies, IAcl addAces, IAcl removeAces, IExtensionsData extension); /// /// Creates a relationship object of the specified type (given by the cmis:objectTypeId property). /// string CreateRelationship(string repositoryId, IProperties properties, IList policies, IAcl addAces, IAcl removeAces, IExtensionsData extension); /// /// Creates a policy object of the specified type (given by the cmis:objectTypeId property). /// string CreatePolicy(string repositoryId, IProperties properties, string folderId, IList policies, IAcl addAces, IAcl removeAces, IExtensionsData extension); /// /// Creates an item object of the specified type (given by the cmis:objectTypeId property). /// string CreateItem(string repositoryId, IProperties properties, string folderId, IList policies, IAcl addAces, IAcl removeAces, IExtensionsData extension); /// /// Gets the list of allowable actions for an object. /// IAllowableActions GetAllowableActions(string repositoryId, string objectId, IExtensionsData extension); /// /// Gets the list of properties for an object. /// IProperties GetProperties(string repositoryId, string objectId, string filter, IExtensionsData extension); /// /// Gets the list of associated renditions for the specified object. /// /// /// Only rendition attributes are returned, not rendition stream. /// IList GetRenditions(string repositoryId, string objectId, string renditionFilter, BigInteger? maxItems, BigInteger? skipCount, IExtensionsData extension); /// /// Gets the specified information for the object specified by ID. /// IObjectData GetObject(string repositoryId, string objectId, string filter, bool? includeAllowableActions, IncludeRelationships? includeRelationships, string renditionFilter, bool? includePolicyIds, bool? includeAcl, IExtensionsData extension); /// /// Gets the specified information for the object specified by path. /// IObjectData GetObjectByPath(string repositoryId, string path, string filter, bool? includeAllowableActions, IncludeRelationships? includeRelationships, string renditionFilter, bool? includePolicyIds, bool? includeAcl, IExtensionsData extension); /// /// Gets the content stream for the specified document object, or gets a rendition stream /// for a specified rendition of a document or folder object. /// IContentStream GetContentStream(string repositoryId, string objectId, string streamId, BigInteger? offset, BigInteger? length, IExtensionsData extension); /// /// Updates properties of the specified object. /// void UpdateProperties(string repositoryId, ref string objectId, ref string changeToken, IProperties properties, IExtensionsData extension); /// /// Updates properties and secondary types of one or more objects. /// IList BulkUpdateProperties(string repositoryId, IList objectIdAndChangeToken, IProperties properties, IList addSecondaryTypeIds, IList removeSecondaryTypeIds, IExtensionsData extension); /// /// Moves the specified file-able object from one folder to another. /// void MoveObject(string repositoryId, ref string objectId, string targetFolderId, string sourceFolderId, IExtensionsData extension); /// /// Deletes the specified object. /// void DeleteObject(string repositoryId, string objectId, bool? allVersions, IExtensionsData extension); /// /// Deletes the specified folder object and all of its child- and descendant-objects. /// IFailedToDeleteData DeleteTree(string repositoryId, string folderId, bool? allVersions, UnfileObject? unfileObjects, bool? continueOnFailure, IExtensionsData extension); /// /// Sets the content stream for the specified document object. /// void SetContentStream(string repositoryId, ref string objectId, bool? overwriteFlag, ref string changeToken, IContentStream contentStream, IExtensionsData extension); /// /// Deletes the content stream for the specified document object. /// void DeleteContentStream(string repositoryId, ref string objectId, ref string changeToken, IExtensionsData extension); /// /// Appends the content stream to the content of the document. /// void AppendContentStream(string repositoryId, ref string objectId, bool? isLastChunk, ref string changeToken, IContentStream contentStream, IExtensionsData extension); } /// /// Versioning Service interface. /// public interface IVersioningService { /// /// Create a private working copy of the document. /// void CheckOut(string repositoryId, ref string objectId, IExtensionsData extension, out bool? contentCopied); /// /// Reverses the effect of a check-out. /// void CancelCheckOut(string repositoryId, string objectId, IExtensionsData extension); /// /// Checks-in the private working copy (PWC) document. /// void CheckIn(string repositoryId, ref string objectId, bool? major, IProperties properties, IContentStream contentStream, string checkinComment, IList policies, IAcl addAces, IAcl removeAces, IExtensionsData extension); /// /// Get the latest document object in the version series. /// IObjectData GetObjectOfLatestVersion(string repositoryId, string objectId, string versionSeriesId, bool? major, string filter, bool? includeAllowableActions, IncludeRelationships? includeRelationships, string renditionFilter, bool? includePolicyIds, bool? includeAcl, IExtensionsData extension); /// /// Get a subset of the properties for the latest document object in the version series. /// IProperties GetPropertiesOfLatestVersion(string repositoryId, string objectId, string versionSeriesId, bool? major, string filter, IExtensionsData extension); /// /// Returns the list of all document objects in the specified version series, sorted by the property "cmis:creationDate" descending. /// IList GetAllVersions(string repositoryId, string objectId, string versionSeriesId, string filter, bool? includeAllowableActions, IExtensionsData extension); } /// /// Relationship Service interface. /// public interface IRelationshipService { /// /// Gets all or a subset of relationships associated with an independent object. /// IObjectList GetObjectRelationships(string repositoryId, string objectId, bool? includeSubRelationshipTypes, RelationshipDirection? relationshipDirection, string typeId, string filter, bool? includeAllowableActions, BigInteger? maxItems, BigInteger? skipCount, IExtensionsData extension); } /// /// Discovery Service interface. /// public interface IDiscoveryService { /// /// Executes a CMIS query statement against the contents of the repository. /// IObjectList Query(string repositoryId, string statement, bool? searchAllVersions, bool? includeAllowableActions, IncludeRelationships? includeRelationships, string renditionFilter, BigInteger? maxItems, BigInteger? skipCount, IExtensionsData extension); /// /// Gets a list of content changes. /// IObjectList GetContentChanges(string repositoryId, ref string changeLogToken, bool? includeProperties, string filter, bool? includePolicyIds, bool? includeAcl, BigInteger? maxItems, IExtensionsData extension); } /// /// MultiFiling Service interface. /// public interface IMultiFilingService { /// /// Adds an existing fileable non-folder object to a folder. /// void AddObjectToFolder(string repositoryId, string objectId, string folderId, bool? allVersions, IExtensionsData extension); /// /// Removes an existing fileable non-folder object from a folder. /// void RemoveObjectFromFolder(string repositoryId, string objectId, string folderId, IExtensionsData extension); } /// /// ACL Service interface. /// public interface IAclService { /// /// Get the ACL currently applied to the specified object. /// IAcl GetAcl(string repositoryId, string objectId, bool? onlyBasicPermissions, IExtensionsData extension); /// /// Adds or removes the given ACEs to or from the ACL of the object. /// IAcl ApplyAcl(string repositoryId, string objectId, IAcl addAces, IAcl removeAces, AclPropagation? aclPropagation, IExtensionsData extension); } /// /// Policy Service interface. /// public interface IPolicyService { /// /// Applies a specified policy to an object. /// void ApplyPolicy(string repositoryId, string policyId, string objectId, IExtensionsData extension); /// /// Removes a specified policy from an object. /// void RemovePolicy(string repositoryId, string policyId, string objectId, IExtensionsData extension); /// /// Gets the list of policies currently applied to the specified object. /// IList GetAppliedPolicies(string repositoryId, string objectId, string filter, IExtensionsData extension); } }