/* * 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 System; using System.Collections.Generic; using System.IO; using DotCMIS.Binding; using DotCMIS.Data; using DotCMIS.Data.Extensions; using DotCMIS.Enums; namespace DotCMIS.Client { /// /// Session factory interface. /// public interface ISessionFactory { /// /// Creates a new session with the given parameters and connects to the repository. /// /// the session parameters /// the newly created session /// /// Connect to an AtomPub CMIS endpoint: /// /// Dictionary<string, string> parameters = new Dictionary<string, string>(); /// /// parameters[SessionParameter.BindingType] = BindingType.AtomPub; /// parameters[SessionParameter.AtomPubUrl] = "http://localhost/cmis/atom"; /// parameters[SessionParameter.Password] = "admin"; /// parameters[SessionParameter.User] = "admin"; /// parameters[SessionParameter.RepositoryId] = "1234-abcd-5678"; /// /// SessionFactory factory = SessionFactory.NewInstance(); /// ISession session = factory.CreateSession(parameters); /// /// /// Connect to a Web Services CMIS endpoint: /// /// Dictionary<string, string> parameters = new Dictionary<string, string>(); /// /// string baseUrlWS = "https://localhost:443/cmis/ws"; /// /// parameters[SessionParameter.BindingType] = BindingType.WebServices; /// parameters[SessionParameter.WebServicesRepositoryService] = baseUrlWS + "/RepositoryService?wsdl"; /// parameters[SessionParameter.WebServicesAclService] = baseUrlWS + "/AclService?wsdl"; /// parameters[SessionParameter.WebServicesDiscoveryService] = baseUrlWS + "/DiscoveryService?wsdl"; /// parameters[SessionParameter.WebServicesMultifilingService] = baseUrlWS + "/MultifilingService?wsdl"; /// parameters[SessionParameter.WebServicesNavigationService] = baseUrlWS + "/NavigationService?wsdl"; /// parameters[SessionParameter.WebServicesObjectService] = baseUrlWS + "/ObjectService?wsdl"; /// parameters[SessionParameter.WebServicesPolicyService] = baseUrlWS + "/PolicyService?wsdl"; /// parameters[SessionParameter.WebServicesRelationshipService] = baseUrlWS + "/RelationshipService?wsdl"; /// parameters[SessionParameter.WebServicesVersioningService] = baseUrlWS + "/VersioningService?wsdl"; /// parameters[SessionParameter.RepositoryId] = "1234-abcd-5678" /// parameters[SessionParameter.User] = "admin"; /// parameters[SessionParameter.Password] = "admin"; /// /// SessionFactory factory = SessionFactory.NewInstance(); /// ISession session = factory.CreateSession(parameters); /// /// /// ISession CreateSession(IDictionary parameters); /// /// Gets all repository available at the specified endpoint. /// /// the session parameters /// a list of all available repositories /// IList GetRepositories(IDictionary parameters); } /// /// Repository interface. /// public interface IRepository : IRepositoryInfo { /// /// Creates a session for this repository. /// ISession CreateSession(); } /// /// A session is a connection to a CMIS repository with a specific user. /// /// /// /// Not all operations might be supported by the connected repository. Either DotCMIS or the repository will /// throw an exception if an unsupported operation is called. /// The capabilities of the repository can be discovered by evaluating the repository info /// (see ). /// /// /// Almost all methods might throw exceptions derived from ! /// /// /// (Please refer to the CMIS specification /// for details about the domain model, terms, concepts, base types, properties, ids and query names, /// query language, etc.) /// /// public interface ISession { /// /// Clears all caches. /// void Clear(); /// /// Gets the CMIS binding object. /// ICmisBinding Binding { get; } /// /// Gets the default operation context. /// IOperationContext DefaultContext { get; set; } /// /// Creates a new operation context object. /// IOperationContext CreateOperationContext(); /// /// Creates a new operation context object with the given parameters. /// IOperationContext CreateOperationContext(HashSet filter, bool includeAcls, bool includeAllowableActions, bool includePolicies, IncludeRelationshipsFlag includeRelationships, HashSet renditionFilter, bool includePathSegments, string orderBy, bool cacheEnabled, int maxItemsPerPage); /// /// Creates a new with the giveb id. /// IObjectId CreateObjectId(string id); /// /// Gets the CMIS repositoy info. /// IRepositoryInfo RepositoryInfo { get; } /// /// Gets the internal object factory. /// IObjectFactory ObjectFactory { get; } // types IObjectType GetTypeDefinition(string typeId); IItemEnumerable GetTypeChildren(string typeId, bool includePropertyDefinitions); IList> GetTypeDescendants(string typeId, int depth, bool includePropertyDefinitions); // navigation IFolder GetRootFolder(); IFolder GetRootFolder(IOperationContext context); IItemEnumerable GetCheckedOutDocs(); IItemEnumerable GetCheckedOutDocs(IOperationContext context); /// /// Gets a CMIS object from the session cache. If the object is not in the cache or the cache is /// turned off per default , it will load the object /// from the repository and puts it into the cache. /// /// the object id ICmisObject GetObject(IObjectId objectId); ICmisObject GetObject(IObjectId objectId, IOperationContext context); /// /// Gets a CMIS object from the session cache. If the object is not in the cache or the cache is /// turned off per default , it will load the object /// from the repository and puts it into the cache. /// /// the object id ICmisObject GetObject(string objectId); ICmisObject GetObject(string objectId, IOperationContext context); /// /// Gets a CMIS object from the session cache. If the object is not in the cache or the cache is /// turned off per default , it will load the object /// from the repository and puts it into the cache. /// /// the path to the object ICmisObject GetObjectByPath(string path); ICmisObject GetObjectByPath(string path, IOperationContext context); /// /// Removes the given object from the cache. /// /// the object id void RemoveObjectFromCache(IObjectId objectId); /// /// Removes the given object from the cache. /// /// the object id void RemoveObjectFromCache(string objectId); // discovery /// /// Performs a query. /// /// the CMIS QL statement /// indicates if all versions or only latest version should be searched /// query results IItemEnumerable Query(string statement, bool searchAllVersions); /// /// Performs a query using the given . /// /// the CMIS QL statement /// indicates if all versions or only latest version should be searched /// the /// query results IItemEnumerable Query(string statement, bool searchAllVersions, IOperationContext context); IChangeEvents GetContentChanges(string changeLogToken, bool includeProperties, long maxNumItems); IChangeEvents GetContentChanges(string changeLogToken, bool includeProperties, long maxNumItems, IOperationContext context); // create IObjectId CreateDocument(IDictionary properties, IObjectId folderId, IContentStream contentStream, VersioningState? versioningState, IList policies, IList addAces, IList removeAces); IObjectId CreateDocument(IDictionary properties, IObjectId folderId, IContentStream contentStream, VersioningState? versioningState); IObjectId CreateDocumentFromSource(IObjectId source, IDictionary properties, IObjectId folderId, VersioningState? versioningState, IList policies, IList addAces, IList removeAces); IObjectId CreateDocumentFromSource(IObjectId source, IDictionary properties, IObjectId folderId, VersioningState? versioningState); IObjectId CreateFolder(IDictionary properties, IObjectId folderId, IList policies, IList addAces, IList removeAces); IObjectId CreateFolder(IDictionary properties, IObjectId folderId); IObjectId CreatePolicy(IDictionary properties, IObjectId folderId, IList policies, IList addAces, IList removeAces); IObjectId CreatePolicy(IDictionary properties, IObjectId folderId); IObjectId CreateRelationship(IDictionary properties, IList policies, IList addAces, IList removeAces); IObjectId CreateRelationship(IDictionary properties); IItemEnumerable GetRelationships(IObjectId objectId, bool includeSubRelationshipTypes, RelationshipDirection? relationshipDirection, IObjectType type, IOperationContext context); // permissions IAcl GetAcl(IObjectId objectId, bool onlyBasicPermissions); IAcl ApplyAcl(IObjectId objectId, IList addAces, IList removeAces, AclPropagation? aclPropagation); void ApplyPolicy(IObjectId objectId, params IObjectId[] policyIds); void RemovePolicy(IObjectId objectId, params IObjectId[] policyIds); } public interface IObjectFactory { void Initialize(ISession session, IDictionary parameters); // ACL and ACE IAcl ConvertAces(IList aces); IAcl CreateAcl(IList aces); IAce CreateAce(string principal, IList permissions); // policies IList ConvertPolicies(IList policies); // renditions IRendition ConvertRendition(string objectId, IRenditionData rendition); // content stream IContentStream CreateContentStream(string filename, long length, string mimetype, Stream stream); // types IObjectType ConvertTypeDefinition(ITypeDefinition typeDefinition); IObjectType GetTypeFromObjectData(IObjectData objectData); // properties IProperty CreateProperty(IPropertyDefinition type, IList values); IDictionary ConvertProperties(IObjectType objectType, IProperties properties); IProperties ConvertProperties(IDictionary properties, IObjectType type, HashSet updatabilityFilter); IList ConvertQueryProperties(IProperties properties); // objects ICmisObject ConvertObject(IObjectData objectData, IOperationContext context); IQueryResult ConvertQueryResult(IObjectData objectData); IChangeEvent ConvertChangeEvent(IObjectData objectData); IChangeEvents ConvertChangeEvents(string changeLogToken, IObjectList objectList); } /// /// Operation context interface. /// public interface IOperationContext { /// /// Gets and sets the property filter. /// /// /// This is a set of query names. /// HashSet Filter { get; set; } /// /// Gets and sets the property filter. /// /// /// This is a comma-separated list of query names. /// string FilterString { get; set; } /// /// Gets and sets if allowable actions should be retrieved. /// bool IncludeAllowableActions { get; set; } /// /// Gets and sets if ACLs should be retrieved. /// bool IncludeAcls { get; set; } /// /// Gets and sets if relationships should be retrieved. /// IncludeRelationshipsFlag? IncludeRelationships { get; set; } /// /// Gets and sets if policies should be retrieved. /// bool IncludePolicies { get; set; } /// /// Gets and sets the rendition filter. /// /// /// This is a set of rendition kinds or MIME types. /// HashSet RenditionFilter { get; set; } /// /// Gets and sets the rendition filter. /// /// /// This is a comma-separated list of rendition kinds or MIME types. /// string RenditionFilterString { get; set; } /// /// Gets and sets if path segements should be retrieved. /// bool IncludePathSegments { get; set; } /// /// Gets and sets order by list. /// /// /// This is a comma-separated list of query names. /// string OrderBy { get; set; } /// /// Gets and sets if object fetched with this /// should be cached or not. /// bool CacheEnabled { get; set; } /// /// Gets the cache key. (For internal use.) /// string CacheKey { get; } /// /// Gets and sets how many items should be fetched per page. /// int MaxItemsPerPage { get; set; } } public interface ITree { T Item { get; } IList> Children { get; } } /// /// Base interface for all CMIS types. /// public interface IObjectType : ITypeDefinition { bool IsBaseType { get; } IObjectType GetBaseType(); IObjectType GetParentType(); IItemEnumerable GetChildren(); IList> GetDescendants(int depth); } /// /// Document type interface. /// public interface IDocumentType : IObjectType { bool? IsVersionable { get; } ContentStreamAllowed? ContentStreamAllowed { get; } } /// /// Folder type interface. /// public interface IFolderType : IObjectType { } /// /// Relationship type interface. /// public interface IRelationshipType : IObjectType { IList GetAllowedSourceTypes { get; } IList GetAllowedTargetTypes { get; } } /// /// Policy type interface. /// public interface IPolicyType : IObjectType { } public interface IItemEnumerable : IEnumerable { IItemEnumerable SkipTo(long position); IItemEnumerable GetPage(); IItemEnumerable GetPage(int maxNumItems); long PageNumItems { get; } bool HasMoreItems { get; } long TotalNumItems { get; } } public interface IObjectId { /// /// Gets the object id. /// string Id { get; } } public interface IRendition : IRenditionData { IDocument GetRenditionDocument(); IDocument GetRenditionDocument(IOperationContext context); IContentStream GetContentStream(); } /// /// Property interface. /// public interface IProperty { /// /// Gets the property id. /// string Id { get; } /// /// Gets the property local name. /// string LocalName { get; } /// /// Gets the property display name. /// string DisplayName { get; } /// /// Gets the property query name. /// string QueryName { get; } /// /// Gets if the property is a multi-value proprty. /// bool IsMultiValued { get; } /// /// Gets the proprty type. /// PropertyType? PropertyType { get; } /// /// Gets the property defintion. /// IPropertyDefinition PropertyDefinition { get; } /// /// Gets the value of the property. /// /// /// If the property is a single-value property the single value is returned. /// If the property is a multi-value property a IList<object> is returned. /// object Value { get; } /// /// Gets the value list of the property. /// /// /// If the property is a single-value property a list with one or no items is returend. /// IList Values { get; } /// /// Gets the first value of the value list or null if the list has no values. /// object FirstValue { get; } /// /// Gets a string representation of the first value of the value list. /// string ValueAsString { get; } /// /// Gets a string representation of the value list. /// string ValuesAsString { get; } } /// /// Collection of common CMIS properties. /// public interface ICmisObjectProperties { /// /// Gets a list of all available CMIS properties. /// IList Properties { get; } /// /// available /// /// the property id /// the property or null if the property is not available IProperty this[string propertyId] { get; } /// /// Gets the value of the requested property. /// /// the property id /// the property value or null if the property is not available or not set object GetPropertyValue(string propertyId); /// /// Gets the name of this CMIS object (CMIS property cmis:name). /// string Name { get; } /// /// Gets the user who created this CMIS object (CMIS property cmis:createdBy). /// string CreatedBy { get; } /// /// Gets the timestamp when this CMIS object has been created (CMIS property cmis:creationDate). /// DateTime? CreationDate { get; } /// /// Gets the user who modified this CMIS object (CMIS property cmis:lastModifiedBy). /// string LastModifiedBy { get; } /// /// Gets the timestamp when this CMIS object has been modified (CMIS property cmis:lastModificationDate). /// DateTime? LastModificationDate { get; } /// /// Gets the id of the base type of this CMIS object (CMIS property cmis:baseTypeId). /// BaseTypeId BaseTypeId { get; } /// /// Gets the base type of this CMIS object (object type identified by cmis:baseTypeId). /// IObjectType BaseType { get; } /// /// Gets the type of this CMIS object (object type identified by cmis:objectTypeId). /// IObjectType ObjectType { get; } /// /// Gets the change token (CMIS property cmis:changeToken). /// string ChangeToken { get; } } public enum ExtensionLevel { Object, Properties, AllowableActions, Acl, Policies, ChangeEvent } /// /// Base interface for all CMIS objects. /// public interface ICmisObject : IObjectId, ICmisObjectProperties { /// /// Gets the allowable actions if they have been fetched for this object. /// IAllowableActions AllowableActions { get; } /// /// Gets the relationships if they have been fetched for this object. /// IList Relationships { get; } /// /// Gets the ACL if it has been fetched for this object. /// IAcl Acl { get; } /// /// Deletes this object. /// /// if this object is a document this parameter defines if just this version or all versions should be deleted void Delete(bool allVersions); /// /// Updates the properties that are provided. /// /// the properties to update /// the updated object (a repository might have created a new object) ICmisObject UpdateProperties(IDictionary properties); /// /// Updates the properties that are provided. /// /// the properties to update /// indicates if the object should be refresh after the update /// the object id of the updated object (a repository might have created a new object) IObjectId UpdateProperties(IDictionary properties, bool refresh); /// /// Gets the renditions if they have been fetched for this object. /// IList Renditions { get; } /// /// Applies the given policies to the object. /// void ApplyPolicy(params IObjectId[] policyId); /// /// Removes the given policies from the object. /// void RemovePolicy(params IObjectId[] policyId); /// /// Gets a list of policies applied to this object. /// IList Policies { get; } /// /// Adds and removes ACEs to this object. /// /// the new ACL of this object IAcl ApplyAcl(IList addAces, IList removeAces, AclPropagation? aclPropagation); /// /// Adds ACEs to this object. /// /// the new ACL of this object IAcl AddAcl(IList addAces, AclPropagation? aclPropagation); /// /// Removes ACEs from this object. /// /// the new ACL of this object IAcl RemoveAcl(IList removeAces, AclPropagation? aclPropagation); /// /// Gets the extensions of the given level. /// IList GetExtensions(ExtensionLevel level); /// /// Gets the timestamp of the last refresh. /// DateTime RefreshTimestamp { get; } /// /// Reloads the data from the repository. /// void Refresh(); /// /// Reloads the data from the repository if the last refresh did not occur within durationInMillis. /// void RefreshIfOld(long durationInMillis); } /// /// Base interface for all fileable CMIS objects. /// public interface IFileableCmisObject : ICmisObject { /// /// Moves this object from a source folder to a target folder. /// /// the source folder id /// the target folder id /// the object in the new location IFileableCmisObject Move(IObjectId sourceFolderId, IObjectId targetFolderId); /// /// Gets a list of all parent folders. /// /// /// Returns an empty list if it is an unfiled object or the root folder. /// IList Parents { get; } /// /// Gets all paths for this object /// /// /// Returns an empty list for unfiled objects. /// IList Paths { get; } /// /// Adds this object to the given folder. /// /// the id of the target folder /// indicates if only this object or all versions of the object should be added void AddToFolder(IObjectId folderId, bool allVersions); /// /// Removes this object from the given folder. /// /// the id of the folder void RemoveFromFolder(IObjectId folderId); } /// /// Document properties. /// public interface IDocumentProperties { /// /// Gets if this CMIS object is immutable (CMIS property cmis:isImmutable). /// bool? IsImmutable { get; } /// /// Gets if this CMIS object is the latest version (CMIS property cmis:isLatestVersion) /// bool? IsLatestVersion { get; } /// /// Gets if this CMIS object is the latest version (CMIS property cmis:isMajorVersion). /// bool? IsMajorVersion { get; } /// /// Gets if this CMIS object is the latest major version (CMIS property cmis:isLatestMajorVersion). /// bool? IsLatestMajorVersion { get; } /// /// Gets the version label (CMIS property cmis:versionLabel). /// string VersionLabel { get; } /// /// Gets the version series id (CMIS property cmis:versionSeriesId). /// string VersionSeriesId { get; } /// /// Gets if this version series is checked out (CMIS property cmis:isVersionSeriesCheckedOut). /// bool? IsVersionSeriesCheckedOut { get; } /// /// Gets the user who checked out this version series (CMIS property cmis:versionSeriesCheckedOutBy). /// string VersionSeriesCheckedOutBy { get; } /// /// Gets the PWC id of this version series (CMIS property cmis:versionSeriesCheckedOutId). /// string VersionSeriesCheckedOutId { get; } /// /// Gets the checkin comment (CMIS property cmis:checkinComment). /// string CheckinComment { get; } /// /// Gets the content stream length or null if the document has no content (CMIS property cmis:contentStreamLength). /// long? ContentStreamLength { get; } /// /// Gets the content stream MIME type or null if the document has no content (CMIS property cmis:contentStreamMimeType). /// string ContentStreamMimeType { get; } /// /// Gets the content stream filename or null if the document has no content (CMIS property cmis:contentStreamFileName). /// string ContentStreamFileName { get; } /// /// Gets the content stream id or null if the document has no content (CMIS property cmis:contentStreamId). /// string ContentStreamId { get; } } /// /// Document interface. /// public interface IDocument : IFileableCmisObject, IDocumentProperties { /// /// Deletes all versions of this document. /// void DeleteAllVersions(); /// /// Gets the content stream of this document. /// /// the content stream or null if the document has no content IContentStream GetContentStream(); /// /// Gets the content stream identified by the given stream id. /// /// the content stream or null if the stream id is not associated with content IContentStream GetContentStream(string streamId); /// /// Sets a new content stream for this document. /// /// the content stream /// indicates if the current stream should be overwritten /// the new document object /// /// Repositories might create a new version if the content is updated. /// IDocument SetContentStream(IContentStream contentStream, bool overwrite); /// /// Sets a new content stream for this document. /// /// the content stream /// indicates if the current stream should be overwritten /// indicates if this object should be refreshed after the new content is set /// the new document object id /// /// Repositories might create a new version if the content is updated. /// IObjectId SetContentStream(IContentStream contentStream, bool overwrite, bool refresh); /// /// Deletes the current content stream for this document. /// /// the new document object /// /// Repositories might create a new version if the content is deleted. /// IDocument DeleteContentStream(); /// /// Deletes the current content stream for this document. /// /// indicates if this object should be refreshed after the content is deleted /// the new document object id /// /// Repositories might create a new version if the content is deleted. /// IObjectId DeleteContentStream(bool refresh); /// /// Checks out this document. /// /// the object id of the newly created private working copy (PWC). IObjectId CheckOut(); /// /// Cancels the check out. /// void CancelCheckOut(); /// /// Checks in this private working copy (PWC). /// /// the object id of the new created document IObjectId CheckIn(bool major, IDictionary properties, IContentStream contentStream, string checkinComment, IList policies, IList addAces, IList removeAces); /// /// Checks in this private working copy (PWC). /// /// the object id of the new created document IObjectId CheckIn(bool major, IDictionary properties, IContentStream contentStream, string checkinComment); IDocument GetObjectOfLatestVersion(bool major); IDocument GetObjectOfLatestVersion(bool major, IOperationContext context); /// /// Gets a list of all versions in this version series. /// IList GetAllVersions(); /// /// Gets a list of all versions in this version series using the given . /// IList GetAllVersions(IOperationContext context); IDocument Copy(IObjectId targetFolderId); IDocument Copy(IObjectId targetFolderId, IDictionary properties, VersioningState? versioningState, IList policies, IList addACEs, IList removeACEs, IOperationContext context); } /// /// Folder properties. /// public interface IFolderProperties { string ParentId { get; } IList AllowedChildObjectTypes { get; } } /// /// Folder interface. /// public interface IFolder : IFileableCmisObject, IFolderProperties { IDocument CreateDocument(IDictionary properties, IContentStream contentStream, VersioningState? versioningState, IList policies, IList addAces, IList removeAces, IOperationContext context); IDocument CreateDocument(IDictionary properties, IContentStream contentStream, VersioningState? versioningState); IDocument CreateDocumentFromSource(IObjectId source, IDictionary properties, VersioningState? versioningState, IList policies, IList addAces, IList removeAces, IOperationContext context); IDocument CreateDocumentFromSource(IObjectId source, IDictionary properties, VersioningState? versioningState); IFolder CreateFolder(IDictionary properties, IList policies, IList addAces, IList removeAces, IOperationContext context); IFolder CreateFolder(IDictionary properties); IPolicy CreatePolicy(IDictionary properties, IList policies, IList addAces, IList removeAces, IOperationContext context); IPolicy CreatePolicy(IDictionary properties); IList DeleteTree(bool allversions, UnfileObject? unfile, bool continueOnFailure); /// /// Gets the folder tress of this folder (only folder). /// /// the depth /// a list of folder trees /// /// If depth == 1 only objects that are children of this folder are returned. /// If depth > 1 only objects that are children of this folder and descendants up to "depth" levels deep are returned. /// If depth == -1 all descendant objects at all depth levels in the CMIS hierarchy are returned. /// IList> GetFolderTree(int depth); /// /// Gets the folder tress of this folder (only folder) using the given . /// /// the depth /// the /// a list of folder trees /// /// If depth == 1 only objects that are children of this folder are returned. /// If depth > 1 only objects that are children of this folder and descendants up to "depth" levels deep are returned. /// If depth == -1 all descendant objects at all depth levels in the CMIS hierarchy are returned. /// IList> GetFolderTree(int depth, IOperationContext context); /// /// Gets the descendants of this folder (all filable objects). /// /// the depth /// a list of descendant trees /// /// If depth == 1 only objects that are children of this folder are returned. /// If depth > 1 only objects that are children of this folder and descendants up to "depth" levels deep are returned. /// If depth == -1 all descendant objects at all depth levels in the CMIS hierarchy are returned. /// IList> GetDescendants(int depth); /// /// Gets the descendants of this folder (all filable objects) using the given . /// /// the depth /// the /// a list of descendant trees /// /// If depth == 1 only objects that are children of this folder are returned. /// If depth > 1 only objects that are children of this folder and descendants up to "depth" levels deep are returned. /// If depth == -1 all descendant objects at all depth levels in the CMIS hierarchy are returned. /// IList> GetDescendants(int depth, IOperationContext context); /// /// Gets the children of this folder. /// IItemEnumerable GetChildren(); /// /// Gets the children of this folder ussing the given . /// IItemEnumerable GetChildren(IOperationContext context); /// /// Gets if this folder is the root folder. /// bool IsRootFolder { get; } /// /// Gets the parent of this folder or null if this folder is the root folder. /// IFolder FolderParent { get; } /// /// Gets the path of this folder. /// string Path { get; } IItemEnumerable GetCheckedOutDocs(); IItemEnumerable GetCheckedOutDocs(IOperationContext context); } /// /// Policy properties. /// public interface IPolicyProperties { /// /// Gets the policy text of this CMIS policy (CMIS property cmis:policyText). /// string PolicyText { get; } } /// /// Policy interface. /// public interface IPolicy : IFileableCmisObject, IPolicyProperties { } /// /// Relationship properties. /// public interface IRelationshipProperties { /// /// Gets the id of the relationship source object. /// IObjectId SourceId { get; } /// /// Gets the id of the relationships target object. /// IObjectId TargetId { get; } } /// /// Relationship interface. /// public interface IRelationship : ICmisObject, IRelationshipProperties { /// /// Gets the relationship source object. /// /// /// If the source object id is invalid, null will be returned. /// ICmisObject GetSource(); /// /// Gets the relationship source object using the given . /// /// /// If the source object id is invalid, null will be returned. /// ICmisObject GetSource(IOperationContext context); /// /// Gets the relationship target object. /// /// /// If the target object id is invalid, null will be returned. /// ICmisObject GetTarget(); /// /// Gets the relationship target object using the given . /// /// /// If the target object id is invalid, null will be returned. /// ICmisObject GetTarget(IOperationContext context); } /// /// Query result. /// public interface IQueryResult { /// /// Gets the property. /// /// the propertys query name or alias IPropertyData this[string queryName] { get; } /// /// Gets a list of all properties in this query result. /// IList Properties { get; } /// /// Returns a property by id. /// /// the property id /// /// Since repositories are not obligated to add property ids to their /// query result properties, this method might not always work as expected with /// some repositories. Use instead. /// IPropertyData GetPropertyById(string propertyId); /// /// Gets the property (single) value by query name or alias. /// object GetPropertyValueByQueryName(string queryName); /// /// Gets the property (single) value by property id. /// object GetPropertyValueById(string propertyId); /// /// Gets the property value by query name or alias. /// IList GetPropertyMultivalueByQueryName(string queryName); /// /// Gets the property value by property id. /// IList GetPropertyMultivalueById(string propertyId); /// /// Gets the allowable actions if they were requested. /// IAllowableActions AllowableActions { get; } /// /// Gets the relationships if they were requested. /// IList Relationships { get; } /// /// Gets the renditions if they were requested. /// IList Renditions { get; } } public interface IChangeEvent : IChangeEventInfo { string ObjectId { get; } IDictionary> Properties { get; } IList PolicyIds { get; } IAcl Acl { get; } } public interface IChangeEvents { string LatestChangeLogToken { get; } IList ChangeEventList { get; } bool? HasMoreItems { get; } long? TotalNumItems { get; } } }