Author: fmui
Date: Mon May 2 12:02:11 2016
New Revision: 1741970
URL: http://svn.apache.org/viewvc?rev=1741970&view=rev
Log:
PortCMIS: more documentation
Modified:
chemistry/portcmis/trunk/PortCMIS/binding/BindingIntf.cs
chemistry/portcmis/trunk/PortCMIS/client/ClientIntf.cs
chemistry/portcmis/trunk/PortCMIS/client/ClientTypes.cs
chemistry/portcmis/trunk/PortCMIS/client/SessionParameterDefaults.cs
chemistry/portcmis/trunk/PortCMIS/data/DataImpl.cs
chemistry/portcmis/trunk/PortCMIS/data/DataIntf.cs
chemistry/portcmis/trunk/PortCMIS/enum/Enums.cs
chemistry/portcmis/trunk/PortCMIS/utils/Logger.cs
Modified: chemistry/portcmis/trunk/PortCMIS/binding/BindingIntf.cs
URL:
http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/binding/BindingIntf.cs?rev=1741970&r1=1741969&r2=1741970&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/binding/BindingIntf.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/binding/BindingIntf.cs Mon May 2
12:02:11 2016
@@ -252,7 +252,9 @@ namespace PortCMIS.Binding
/// </summary>
public interface IAuthenticationProvider
{
- /// <value>Binding session instance</value>
+ /// <value>
+ /// Gets the binding session instance
+ /// </value>
IBindingSession Session { get; set; }
}
@@ -285,22 +287,32 @@ namespace PortCMIS.Binding
/// </summary>
public abstract class AbstractAuthenticationProvider :
IPortableAuthenticationProvider
{
- /// <value>Binding session instance</value>
+ /// <inheritdoc/>
public IBindingSession Session { get; set; }
- /// <value>HTTP cookie container</value>
+ /// <value>
+ /// Gets the HTTP cookie container.
+ /// </value>
public CookieContainer CookieContainer { get; private set; }
- /// <value>User</value>
+ /// <value>
+ /// Gets the user name.
+ /// </value>
public string User { get { return
Session.GetValue(SessionParameter.User) as string; } }
- /// <value>Password</value>
+ /// <value>
+ /// Gets the Password.
+ /// </value>
public string Password { get { return
Session.GetValue(SessionParameter.Password) as string; } }
- /// <value>Proxy user</value>
+ /// <value>
+ /// Gets the proxy user.
+ /// </value>
public string ProxyUser { get { return
Session.GetValue(SessionParameter.ProxyUser) as string; } }
- /// <value>Proxy password</value>
+ /// <value>
+ /// Gets the proxy password
+ /// </value>
public string ProxyPassword { get { return
Session.GetValue(SessionParameter.ProxyPassword) as string; } }
/// <inheritdoc/>
@@ -329,25 +341,37 @@ namespace PortCMIS.Binding
/// </summary>
public class StandardAuthenticationProvider :
AbstractAuthenticationProvider
{
- /// <value>OAuth bearer token</value>
+ /// <value>
+ /// Gets the OAuth bearer token.
+ /// </value>
public string BearerToken { get { return
Session.GetValue(SessionParameter.OAuthBearerToken) as string; } }
- /// <value>CSRF header</value>
+ /// <value>
+ /// Gets the CSRF header.
+ /// r</value>
public string CsrfHeader { get { return
Session.GetValue(SessionParameter.CsrfHeader) as string; } }
- /// <value>Authentication header</value>
+ /// <value>
+ /// Gets the authentication header.
+ /// </value>
protected AuthenticationHeaderValue AuthenticationHeader { get; set; }
- /// <value>proxy authentication header</value>
+ /// <value>
+ /// Gets the proxy authentication header.
+ /// </value>
protected AuthenticationHeaderValue ProxyAuthenticationHeader { get;
set; }
private object tokenLock = new object();
private string token = "fetch";
- /// <value>CSRF header name</value>
+ /// <value>
+ /// Gets the CSRF header name.
+ /// </value>
protected string CsrfHeaderName { get; set; }
- /// <value>CSRF header token</value>
+ /// <value>
+ /// Gets the CSRF header token.
+ /// </value>
protected string CsrfToken
{
get { lock (tokenLock) { return token; } }
Modified: chemistry/portcmis/trunk/PortCMIS/client/ClientIntf.cs
URL:
http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/client/ClientIntf.cs?rev=1741970&r1=1741969&r2=1741970&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/client/ClientIntf.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/client/ClientIntf.cs Mon May 2 12:02:11
2016
@@ -890,17 +890,15 @@ namespace PortCMIS.Client
/// </value>
bool IsBaseType { get; }
- /// <summary>
- /// Returns the base type definition.
- /// </summary>
- /// <returns>the base type definition or <c>null</c> if it is a base
type</returns>
- IObjectType GetBaseType();
+ /// <value>
+ /// Gets the base type definition.
+ /// </value>
+ IObjectType BaseType { get; }
- /// <summary>
+ /// <value>
/// Returns the parent type definition.
- /// </summary>
- /// <returns>the parent type definition or <c>null</c> if it is a base
type</returns>
- IObjectType GetParentType();
+ /// </value>
+ IObjectType ParentType { get; }
/// <summary>
/// Gets the list of types directly derived from this type.
Modified: chemistry/portcmis/trunk/PortCMIS/client/ClientTypes.cs
URL:
http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/client/ClientTypes.cs?rev=1741970&r1=1741969&r2=1741970&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/client/ClientTypes.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/client/ClientTypes.cs Mon May 2 12:02:11
2016
@@ -44,24 +44,30 @@ namespace PortCMIS.Client.Impl
public bool IsBaseType { get { return objectType.ParentTypeId == null
|| objectType.ParentTypeId.Length == 0; } }
- public IObjectType GetBaseType()
+ public IObjectType BaseType
{
- if (IsBaseType) { return null; }
- if (baseType != null) { return baseType; }
+ get
+ {
+ if (IsBaseType) { return null; }
+ if (baseType != null) { return baseType; }
- baseType =
session.GetTypeDefinition(objectType.BaseTypeId.GetCmisValue());
+ baseType =
session.GetTypeDefinition(objectType.BaseTypeId.GetCmisValue());
- return baseType;
+ return baseType;
+ }
}
- public IObjectType GetParentType()
+ public IObjectType ParentType
{
- if (parentType != null) { return parentType; }
- if (objectType.ParentTypeId == null) { return null; }
+ get
+ {
+ if (parentType != null) { return parentType; }
+ if (objectType.ParentTypeId == null) { return null; }
- parentType = session.GetTypeDefinition(objectType.ParentTypeId);
+ parentType =
session.GetTypeDefinition(objectType.ParentTypeId);
- return parentType;
+ return parentType;
+ }
}
public IItemEnumerable<IObjectType> GetChildren()
@@ -82,6 +88,11 @@ namespace PortCMIS.Client.Impl
{
private ObjectTypeHelper helper;
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <param name="session">the related session object</param>
+ /// <param name="typeDefinition">the low-level type definition</param>
public DocumentType(ISession session, IDocumentTypeDefinition
typeDefinition)
{
Initialize(typeDefinition);
@@ -90,14 +101,19 @@ namespace PortCMIS.Client.Impl
helper = new ObjectTypeHelper(session, this);
}
- public virtual IObjectType GetBaseType() { return
helper.GetBaseType(); }
+ /// <inheritdoc/>
+ public virtual IObjectType BaseType { get { return helper.BaseType; } }
+
+ /// <inheritdoc/>
+ public virtual IObjectType ParentType { get { return
helper.ParentType; } }
+ /// <inheritdoc/>
public virtual IItemEnumerable<IObjectType> GetChildren() { return
helper.GetChildren(); }
+ /// <inheritdoc/>
public virtual IList<ITree<IObjectType>> GetDescendants(int depth) {
return helper.GetDescendants(depth); }
- public virtual IObjectType GetParentType() { return
helper.GetParentType(); }
-
+ /// <inheritdoc/>
public virtual bool IsBaseType { get { return helper.IsBaseType; } }
}
@@ -108,20 +124,30 @@ namespace PortCMIS.Client.Impl
{
private ObjectTypeHelper helper;
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <param name="session">the related session object</param>
+ /// <param name="typeDefinition">the low-level type definition</param>
public FolderType(ISession session, IFolderTypeDefinition
typeDefinition)
{
Initialize(typeDefinition);
helper = new ObjectTypeHelper(session, this);
}
- public virtual IObjectType GetBaseType() { return
helper.GetBaseType(); }
+ /// <inheritdoc/>
+ public virtual IObjectType BaseType { get { return helper.BaseType; } }
+
+ /// <inheritdoc/>
+ public virtual IObjectType ParentType { get { return
helper.ParentType; } }
+ /// <inheritdoc/>
public virtual IItemEnumerable<IObjectType> GetChildren() { return
helper.GetChildren(); }
+ /// <inheritdoc/>
public virtual IList<ITree<IObjectType>> GetDescendants(int depth) {
return helper.GetDescendants(depth); }
- public virtual IObjectType GetParentType() { return
helper.GetParentType(); }
-
+ /// <inheritdoc/>
public virtual bool IsBaseType { get { return helper.IsBaseType; } }
}
@@ -134,22 +160,33 @@ namespace PortCMIS.Client.Impl
private IList<IObjectType> allowedSourceTypes;
private IList<IObjectType> allowedTargetTypes;
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <param name="session">the related session object</param>
+ /// <param name="typeDefinition">the low-level type definition</param>
public RelationshipType(ISession session, IRelationshipTypeDefinition
typeDefinition)
{
Initialize(typeDefinition);
helper = new ObjectTypeHelper(session, this);
}
- public virtual IObjectType GetBaseType() { return
helper.GetBaseType(); }
+ /// <inheritdoc/>
+ public virtual IObjectType BaseType { get { return helper.BaseType; } }
+
+ /// <inheritdoc/>
+ public virtual IObjectType ParentType { get { return
helper.ParentType; } }
+ /// <inheritdoc/>
public virtual IItemEnumerable<IObjectType> GetChildren() { return
helper.GetChildren(); }
+ /// <inheritdoc/>
public virtual IList<ITree<IObjectType>> GetDescendants(int depth) {
return helper.GetDescendants(depth); }
- public virtual IObjectType GetParentType() { return
helper.GetParentType(); }
-
+ /// <inheritdoc/>
public virtual bool IsBaseType { get { return helper.IsBaseType; } }
+ /// <inheritdoc/>
public virtual IList<IObjectType> GetAllowedSourceTypes
{
get
@@ -171,6 +208,7 @@ namespace PortCMIS.Client.Impl
}
}
+ /// <inheritdoc/>
public virtual IList<IObjectType> GetAllowedTargetTypes
{
get
@@ -200,20 +238,30 @@ namespace PortCMIS.Client.Impl
{
private ObjectTypeHelper helper;
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <param name="session">the related session object</param>
+ /// <param name="typeDefinition">the low-level type definition</param>
public PolicyType(ISession session, IPolicyTypeDefinition
typeDefinition)
{
Initialize(typeDefinition);
helper = new ObjectTypeHelper(session, this);
}
- public virtual IObjectType GetBaseType() { return
helper.GetBaseType(); }
+ /// <inheritdoc/>
+ public virtual IObjectType BaseType { get { return helper.BaseType; } }
+ /// <inheritdoc/>
+ public virtual IObjectType ParentType { get { return
helper.ParentType; } }
+
+ /// <inheritdoc/>
public virtual IItemEnumerable<IObjectType> GetChildren() { return
helper.GetChildren(); }
+ /// <inheritdoc/>
public virtual IList<ITree<IObjectType>> GetDescendants(int depth) {
return helper.GetDescendants(depth); }
- public virtual IObjectType GetParentType() { return
helper.GetParentType(); }
-
+ /// <inheritdoc/>
public virtual bool IsBaseType { get { return helper.IsBaseType; } }
}
@@ -224,20 +272,30 @@ namespace PortCMIS.Client.Impl
{
private ObjectTypeHelper helper;
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <param name="session">the related session object</param>
+ /// <param name="typeDefinition">the low-level type definition</param>
public ItemType(ISession session, IItemTypeDefinition typeDefinition)
{
Initialize(typeDefinition);
helper = new ObjectTypeHelper(session, this);
}
- public virtual IObjectType GetBaseType() { return
helper.GetBaseType(); }
+ /// <inheritdoc/>
+ public virtual IObjectType BaseType { get { return helper.BaseType; } }
+ /// <inheritdoc/>
+ public virtual IObjectType ParentType { get { return
helper.ParentType; } }
+
+ /// <inheritdoc/>
public virtual IItemEnumerable<IObjectType> GetChildren() { return
helper.GetChildren(); }
+ /// <inheritdoc/>
public virtual IList<ITree<IObjectType>> GetDescendants(int depth) {
return helper.GetDescendants(depth); }
- public virtual IObjectType GetParentType() { return
helper.GetParentType(); }
-
+ /// <inheritdoc/>
public virtual bool IsBaseType { get { return helper.IsBaseType; } }
}
@@ -248,20 +306,30 @@ namespace PortCMIS.Client.Impl
{
private ObjectTypeHelper helper;
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <param name="session">the related session object</param>
+ /// <param name="typeDefinition">the low-level type definition</param>
public SecondaryType(ISession session, ISecondaryTypeDefinition
typeDefinition)
{
Initialize(typeDefinition);
helper = new ObjectTypeHelper(session, this);
}
- public virtual IObjectType GetBaseType() { return
helper.GetBaseType(); }
+ /// <inheritdoc/>
+ public virtual IObjectType BaseType { get { return helper.BaseType; } }
+ /// <inheritdoc/>
+ public virtual IObjectType ParentType { get { return
helper.ParentType; } }
+
+ /// <inheritdoc/>
public virtual IItemEnumerable<IObjectType> GetChildren() { return
helper.GetChildren(); }
+ /// <inheritdoc/>
public virtual IList<ITree<IObjectType>> GetDescendants(int depth) {
return helper.GetDescendants(depth); }
- public virtual IObjectType GetParentType() { return
helper.GetParentType(); }
-
+ /// <inheritdoc/>
public virtual bool IsBaseType { get { return helper.IsBaseType; } }
}
}
Modified: chemistry/portcmis/trunk/PortCMIS/client/SessionParameterDefaults.cs
URL:
http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/client/SessionParameterDefaults.cs?rev=1741970&r1=1741969&r2=1741970&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/client/SessionParameterDefaults.cs
(original)
+++ chemistry/portcmis/trunk/PortCMIS/client/SessionParameterDefaults.cs Mon
May 2 12:02:11 2016
@@ -25,6 +25,9 @@ using System.Threading.Tasks;
namespace PortCMIS.Client
{
+ /// <summary>
+ /// Default values for some session parameters.
+ /// </summary>
public static class SessionParameterDefaults
{
/// <summary>Default repository cache size</summary>
Modified: chemistry/portcmis/trunk/PortCMIS/data/DataImpl.cs
URL:
http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/data/DataImpl.cs?rev=1741970&r1=1741969&r2=1741970&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/data/DataImpl.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/data/DataImpl.cs Mon May 2 12:02:11 2016
@@ -270,6 +270,9 @@ namespace PortCMIS.Data
public IList<string> Permissions { get; set; }
}
+ /// <summary>
+ /// Extension Feature implementation.
+ /// </summary>
public class ExtensionFeature : ExtensionsData, IExtensionFeature
{
/// <inheritdoc/>
@@ -480,6 +483,9 @@ namespace PortCMIS.Data
public IList<string> AllowedTargetTypeIds { get; set; }
}
+ /// <summary>
+ /// Type Definition List implementation.
+ /// </summary>
public class TypeDefinitionList : ExtensionsData, ITypeDefinitionList
{
/// <inheritdoc/>
@@ -492,6 +498,9 @@ namespace PortCMIS.Data
public BigInteger? NumItems { get; set; }
}
+ /// <summary>
+ /// Type Definition Container implementation.
+ /// </summary>
public class TypeDefinitionContainer : ExtensionsData,
ITypeDefinitionContainer
{
/// <inheritdoc/>
@@ -654,6 +663,9 @@ namespace PortCMIS.Data
public IList<IChoice<string>> Choices { get; set; }
}
+ /// <summary>
+ /// Object Data implementation.
+ /// </summary>
public class ObjectData : ExtensionsData, IObjectData
{
/// <inheritdoc/>
@@ -716,6 +728,9 @@ namespace PortCMIS.Data
}
}
+ /// <summary>
+ /// Object List implementation.
+ /// </summary>
public class ObjectList : ExtensionsData, IObjectList
{
/// <inheritdoc/>
@@ -728,6 +743,9 @@ namespace PortCMIS.Data
public BigInteger? NumItems { get; set; }
}
+ /// <summary>
+ /// Object In Folder Data implementation.
+ /// </summary>
public class ObjectInFolderData : ExtensionsData, IObjectInFolderData
{
/// <inheritdoc/>
@@ -737,6 +755,9 @@ namespace PortCMIS.Data
public string PathSegment { get; set; }
}
+ /// <summary>
+ /// Object In Folder List implementation.
+ /// </summary>
public class ObjectInFolderList : ExtensionsData, IObjectInFolderList
{
/// <inheritdoc/>
@@ -749,6 +770,9 @@ namespace PortCMIS.Data
public BigInteger? NumItems { get; set; }
}
+ /// <summary>
+ /// Object In Folder Container implementation.
+ /// </summary>
public class ObjectInFolderContainer : ExtensionsData,
IObjectInFolderContainer
{
/// <inheritdoc/>
@@ -758,6 +782,9 @@ namespace PortCMIS.Data
public IList<IObjectInFolderContainer> Children { get; set; }
}
+ /// <summary>
+ /// Object Parent Data implementation.
+ /// </summary>
public class ObjectParentData : ExtensionsData, IObjectParentData
{
/// <inheritdoc/>
@@ -767,6 +794,9 @@ namespace PortCMIS.Data
public string RelativePathSegment { get; set; }
}
+ /// <summary>
+ /// Properties implementation.
+ /// </summary>
public class Properties : ExtensionsData, IProperties
{
private List<IPropertyData> propertyList = new List<IPropertyData>();
@@ -783,8 +813,15 @@ namespace PortCMIS.Data
}
}
+ /// <summary>
+ /// Constructor.
+ /// </summary>
public Properties() { }
+ /// <summary>
+ /// Copy constructor.
+ /// </summary>
+ /// <param name="properties">source properties object</param>
public Properties(IProperties properties)
{
if (properties == null)
@@ -805,6 +842,10 @@ namespace PortCMIS.Data
}
}
+ /// <summary>
+ /// Adds a collection of properties.
+ /// </summary>
+ /// <param name="properties">the collection of properties to
add</param>
protected void AddProperties(ICollection<IPropertyData> properties)
{
if (properties != null)
@@ -816,19 +857,24 @@ namespace PortCMIS.Data
}
}
+ /// <summary>
+ /// Adds a property.
+ /// </summary>
+ /// <param name="property">the property to add.</param>
public void AddProperty(IPropertyData property)
{
- if (property == null)
+ if (property == null || property.Id == null)
{
return;
}
propertyList.Add(property);
- if (property.Id != null)
- {
- propertyDict[property.Id] = property;
- }
+ propertyDict[property.Id] = property;
}
+ /// <summary>
+ /// Replaces a property.
+ /// </summary>
+ /// <param name="property">the property to replace</param>
public void ReplaceProperty(IPropertyData property)
{
if (property == null || property.Id == null)
@@ -842,6 +888,10 @@ namespace PortCMIS.Data
propertyDict[property.Id] = property;
}
+ /// <summary>
+ /// Removes a property.
+ /// </summary>
+ /// <param name="id">the ID of the property that should be
removed</param>
public void RemoveProperty(string id)
{
if (id == null)
@@ -858,6 +908,7 @@ namespace PortCMIS.Data
propertyDict.Remove(id);
}
+ /// <inheritdoc/>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
@@ -872,13 +923,22 @@ namespace PortCMIS.Data
}
}
+ /// <summary>
+ /// Property Data implementation.
+ /// </summary>
public class PropertyData : ExtensionsData, IPropertyData
{
private IList<object> values;
+
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <param name="propertyType">The property type of this
property</param>
public PropertyData(PropertyType propertyType)
{
PropertyType = propertyType;
}
+
/// <inheritdoc/>
public string Id { get; set; }
@@ -918,6 +978,10 @@ namespace PortCMIS.Data
/// <inheritdoc/>
public object FirstValue { get { return values == null || Values.Count
< 1 ? null : values[0]; } }
+ /// <summary>
+ /// Adds a value to this property.
+ /// </summary>
+ /// <param name="value">the value</param>
public void AddValue(object value)
{
object newValue = CheckValue(value);
@@ -928,6 +992,11 @@ namespace PortCMIS.Data
Values.Add(newValue);
}
+ /// <summary>
+ /// Checks if the given value matches the property type and converts
the value if necessary.
+ /// </summary>
+ /// <param name="value">the value</param>
+ /// <returns>the converted value</returns>
public object CheckValue(object value)
{
switch (PropertyType)
@@ -992,18 +1061,25 @@ namespace PortCMIS.Data
}
}
+ /// <inheritdoc/>
public override string ToString()
{
return Id + ": " + values;
}
}
+ /// <summary>
+ /// Principal implementation.
+ /// </summary>
public class Principal : ExtensionsData, IPrincipal
{
/// <inheritdoc/>
public string Id { get; set; }
}
+ /// <summary>
+ /// ACE implementation.
+ /// </summary>
public class Ace : ExtensionsData, IAce
{
/// <inheritdoc/>
@@ -1019,6 +1095,9 @@ namespace PortCMIS.Data
public bool IsDirect { get; set; }
}
+ /// <summary>
+ /// ACL implementation.
+ /// </summary>
public class Acl : ExtensionsData, IAcl
{
/// <inheritdoc/>
@@ -1028,6 +1107,9 @@ namespace PortCMIS.Data
public bool? IsExact { get; set; }
}
+ /// <summary>
+ /// Simple Content Stream implementation.
+ /// </summary>
public class ContentStream : ExtensionsData, IContentStream
{
/// <inheritdoc/>
@@ -1042,17 +1124,25 @@ namespace PortCMIS.Data
/// <inheritdoc/>
public Stream Stream { get; set; }
}
-
+ /// <summary>
+ /// Simple Content Stream implementation that indicates a partial stream.
+ /// </summary>
public class PartialContentStream : ContentStream, IPartialContentStream
{
}
+ /// <summary>
+ /// Allowable Actions implementation.
+ /// </summary>
public class AllowableActions : ExtensionsData, IAllowableActions
{
/// <inheritdoc/>
public ISet<PortCMIS.Enums.Action> Actions { get; set; }
}
+ /// <summary>
+ /// Rendition Data implementation.
+ /// </summary>
public class RenditionData : ExtensionsData, IRenditionData
{
/// <inheritdoc/>
@@ -1080,6 +1170,9 @@ namespace PortCMIS.Data
public string RenditionDocumentId { get; set; }
}
+ /// <summary>
+ /// Chang Event Info implementation.
+ /// </summary>
public class ChangeEventInfo : ExtensionsData, IChangeEventInfo
{
/// <inheritdoc/>
@@ -1089,19 +1182,25 @@ namespace PortCMIS.Data
public DateTime? ChangeTime { get; set; }
}
+ /// <summary>
+ /// Policy ID List implementation.
+ /// </summary>
public class PolicyIdList : ExtensionsData, IPolicyIdList
{
/// <inheritdoc/>
public IList<string> PolicyIds { get; set; }
}
- internal class FailedToDeleteData : ExtensionsData, IFailedToDeleteData
+ /// <summary>
+ /// Failed To Delete implementation.
+ /// </summary>
+ public class FailedToDeleteData : ExtensionsData, IFailedToDeleteData
{
/// <inheritdoc/>
public IList<string> Ids { get; set; }
}
- public class QueryType : ExtensionsData
+ internal class QueryType : ExtensionsData
{
public string Statement { get; set; }
public bool? SearchAllVersions { get; set; }
@@ -1112,6 +1211,9 @@ namespace PortCMIS.Data
public BigInteger? SkipCount { get; set; }
}
+ /// <summary>
+ /// Bulk Update data implementation.
+ /// </summary>
public class BulkUpdateObjectIdAndChangeToken : ExtensionsData,
IBulkUpdateObjectIdAndChangeToken
{
/// <inheritdoc/>
Modified: chemistry/portcmis/trunk/PortCMIS/data/DataIntf.cs
URL:
http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/data/DataIntf.cs?rev=1741970&r1=1741969&r2=1741970&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/data/DataIntf.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/data/DataIntf.cs Mon May 2 12:02:11 2016
@@ -361,20 +361,56 @@ namespace PortCMIS.Data
/// </summary>
public interface IRelationshipTypeDefinition : ITypeDefinition
{
+ /// <value>
+ /// Gets the list of allowed source types.
+ /// If the list is empty all types are allowed.
+ /// </value>
IList<string> AllowedSourceTypeIds { get; }
+
+ /// <value>
+ /// Gets the list of allowed target types.
+ /// If the list is empty all types are allowed.
+ /// </value>
IList<string> AllowedTargetTypeIds { get; }
}
+ /// <summary>
+ /// List of type definitions.
+ /// </summary>
+ /// <remarks>
+ /// The list may be incomplete if paging was used to fetch the list.
+ /// </remarks>
public interface ITypeDefinitionList : IExtensionsData
{
+ /// <value>
+ /// Gets the (partial) list of type definitions.
+ /// </value>
IList<ITypeDefinition> List { get; }
+
+ /// <value>
+ /// Gets whether there are more type definitions; <c>null</c> if
unknown.
+ /// </value>
bool? HasMoreItems { get; }
+
+ /// <value>
+ /// Gets the total number of type definitions; <c>null</c> if unknown.
+ /// </value>
BigInteger? NumItems { get; }
}
+ /// <summary>
+ /// Type Definition Container for trees of type definitions.
+ /// </summary>
public interface ITypeDefinitionContainer : IExtensionsData
{
+ /// <summary>
+ /// Gets the type definition.
+ /// </summary>
ITypeDefinition TypeDefinition { get; }
+
+ /// <summary>
+ /// Gets the children of this type definition, if requested.
+ /// </summary>
IList<ITypeDefinitionContainer> Children { get; }
}
@@ -383,26 +419,96 @@ namespace PortCMIS.Data
/// </summary>
public interface IPropertyDefinition : IExtensionsData
{
+ /// <value>
+ /// Gets the property ID.
+ /// </value>
string Id { get; }
+
+ /// <value>
+ /// Gets the local name.
+ /// </value>
string LocalName { get; }
+
+ /// <value>
+ /// Gets the local namespace.
+ /// </value>
string LocalNamespace { get; }
+
+ /// <value>
+ /// Gets the display name.
+ /// </value>
string DisplayName { get; }
+
+ /// <value>
+ /// Gets the query name.
+ /// </value>
string QueryName { get; }
+
+ /// <value>
+ /// Gets the description.
+ /// </value>
string Description { get; }
+
+ /// <value>
+ /// Get the property type.
+ /// </value>
PropertyType PropertyType { get; }
+
+ /// <value>
+ /// Gets the cardinality.
+ /// </value>
Cardinality? Cardinality { get; }
+
+ /// <value>
+ /// Gets the updatability.
+ /// </value>
Updatability? Updatability { get; }
+
+ /// <value>
+ /// Gets whether the property has been inherited from a super type or
not.
+ /// </value>
bool? IsInherited { get; }
+
+ /// <value>
+ /// Gets whether a value for this property required or not.
+ /// </value>
bool? IsRequired { get; }
+
+ /// <value>
+ /// Gets whether this property is queryable or not.
+ /// </value>
bool? IsQueryable { get; }
+
+ /// <value>
+ /// Gets whether this property is orderable or not.
+ /// </value>
bool? IsOrderable { get; }
+
+ /// <value>
+ /// Gets whether this property is an open choice property or not.
+ /// </value>
bool? IsOpenChoice { get; }
}
+ /// <summary>
+ /// A choice value.
+ /// </summary>
+ /// <typeparam name="T">type of the choice</typeparam>
public interface IChoice<T>
{
+ /// <value>
+ /// Gets the display name.
+ /// </value>
string DisplayName { get; }
+
+ /// <value>
+ /// Gets the value.
+ /// </value>
IList<T> Value { get; }
+
+ /// <value>
+ /// Gets the children of this choice.
+ /// </value>
IList<IChoice<T>> Choices { get; }
}
@@ -411,7 +517,14 @@ namespace PortCMIS.Data
/// </summary>
public interface IPropertyBooleanDefinition : IPropertyDefinition
{
+ /// <value>
+ /// Gets the default value.
+ /// </value>
IList<bool?> DefaultValue { get; }
+
+ /// <value>
+ /// Gets the choices of this property.
+ /// </value>
IList<IChoice<bool?>> Choices { get; }
}
@@ -420,8 +533,19 @@ namespace PortCMIS.Data
/// </summary>
public interface IPropertyDateTimeDefinition : IPropertyDefinition
{
+ /// <value>
+ /// Gets the default value.
+ /// </value>
IList<DateTime?> DefaultValue { get; }
+
+ /// <value>
+ /// Gets the choices of this property.
+ /// </value>
IList<IChoice<DateTime?>> Choices { get; }
+
+ /// <value>
+ /// Gets the supported resolution.
+ /// </value>
DateTimeResolution? DateTimeResolution { get; }
}
@@ -430,10 +554,29 @@ namespace PortCMIS.Data
/// </summary>
public interface IPropertyDecimalDefinition : IPropertyDefinition
{
+ /// <value>
+ /// Gets the default value.
+ /// </value>
IList<decimal?> DefaultValue { get; }
+
+ /// <value>
+ /// Gets the choices of this property.
+ /// </value>
IList<IChoice<decimal?>> Choices { get; }
+
+ /// <summary>
+ /// Gets the min value for this property.
+ /// </summary>
decimal? MinValue { get; }
+
+ /// <summary>
+ /// Gets the max value for this property.
+ /// </summary>
decimal? MaxValue { get; }
+
+ /// <summary>
+ /// Gets the supported precision.
+ /// </summary>
DecimalPrecision? Precision { get; }
}
@@ -442,7 +585,14 @@ namespace PortCMIS.Data
/// </summary>
public interface IPropertyHtmlDefinition : IPropertyDefinition
{
+ /// <value>
+ /// Gets the default value.
+ /// </value>
IList<string> DefaultValue { get; }
+
+ /// <value>
+ /// Gets the choices of this property.
+ /// </value>
IList<IChoice<string>> Choices { get; }
}
@@ -451,7 +601,14 @@ namespace PortCMIS.Data
/// </summary>
public interface IPropertyIdDefinition : IPropertyDefinition
{
+ /// <value>
+ /// Gets the default value.
+ /// </value>
IList<string> DefaultValue { get; }
+
+ /// <value>
+ /// Gets the choices of this property.
+ /// </value>
IList<IChoice<string>> Choices { get; }
}
@@ -460,9 +617,24 @@ namespace PortCMIS.Data
/// </summary>
public interface IPropertyIntegerDefinition : IPropertyDefinition
{
+ /// <value>
+ /// Gets the default value.
+ /// </value>
IList<BigInteger?> DefaultValue { get; }
+
+ /// <value>
+ /// Gets the choices of this property.
+ /// </value>
IList<IChoice<BigInteger?>> Choices { get; }
+
+ /// <summary>
+ /// Gets the min value for this property.
+ /// </summary>
BigInteger? MinValue { get; }
+
+ /// <summary>
+ /// Gets the max value for this property.
+ /// </summary>
BigInteger? MaxValue { get; }
}
@@ -471,8 +643,19 @@ namespace PortCMIS.Data
/// </summary>
public interface IPropertyStringDefinition : IPropertyDefinition
{
+ /// <value>
+ /// Gets the default value.
+ /// </value>
IList<string> DefaultValue { get; }
+
+ /// <value>
+ /// Gets the choices of this property.
+ /// </value>
IList<IChoice<string>> Choices { get; }
+
+ /// <value>
+ /// Gets the max length of the string.
+ /// </value>
BigInteger? MaxLength { get; }
}
@@ -481,24 +664,76 @@ namespace PortCMIS.Data
/// </summary>
public interface IPropertyUriDefinition : IPropertyDefinition
{
+ /// <value>
+ /// Gets the default value.
+ /// </value>
IList<string> DefaultValue { get; }
+
+ /// <value>
+ /// Gets the choices of this property.
+ /// </value>
IList<IChoice<string>> Choices { get; }
}
+ /// <summary>
+ /// Object data.
+ /// </summary>
public interface IObjectData : IExtensionsData
{
+ /// <value>
+ /// Gets the ID of this object.
+ /// </value>
string Id { get; }
+
+ /// <value>
+ /// Gets the base type ID of this object.
+ /// </value>
BaseTypeId? BaseTypeId { get; }
+
+ /// <value>
+ /// Gets the properties of this object.
+ /// </value>
IProperties Properties { get; }
+
+ /// <value>
+ /// Gets the allowable actions of this object.
+ /// </value>
IAllowableActions AllowableActions { get; }
+
+ /// <value>
+ /// Gets the relationships of this object.
+ /// </value>
IList<IObjectData> Relationships { get; }
+
+ /// <value>
+ /// Gets the change events of this object.
+ /// </value>
IChangeEventInfo ChangeEventInfo { get; }
+
+ /// <value>
+ /// Gets the ACL of this object.
+ /// </value>
IAcl Acl { get; }
+
+ /// <value>
+ /// Gets whether the ACL is exact or not.
+ /// </value>
bool? IsExactAcl { get; }
+
+ /// <value>
+ /// Gets the policy IDs of this object.
+ /// </value>
IPolicyIdList PolicyIds { get; }
+
+ /// <value>
+ /// Gets the renditions of this object.
+ /// </value>
IList<IRenditionData> Renditions { get; }
}
+ /// <summary>
+ /// Object List.
+ /// </summary>
public interface IObjectList : IExtensionsData
{
IList<IObjectData> Objects { get; }
@@ -531,20 +766,62 @@ namespace PortCMIS.Data
string RelativePathSegment { get; }
}
+ /// <summary>
+ /// Collection of property data.
+ /// </summary>
public interface IProperties : IExtensionsData
{
+ /// <value>
+ /// Gets a property by property ID.
+ /// </value>
+ /// <param name="propertyId">the property ID</param>
+ /// <returns>the property or <c>null</c> if the property doesn't
exist</returns>
IPropertyData this[string propertyId] { get; }
+
+ /// <value>
+ /// Gets the list of properties.
+ /// </value>
IList<IPropertyData> PropertyList { get; }
}
+ /// <summary>
+ /// Property Data.
+ /// </summary>
public interface IPropertyData : IExtensionsData
{
+ /// <value>
+ /// Gets the property ID.
+ /// </value>
string Id { get; }
+
+ /// <value>
+ /// Gets the local name.
+ /// </value>
string LocalName { get; }
+
+ /// <value>
+ /// Gets the display name.
+ /// </value>
string DisplayName { get; }
+
+ /// <value>
+ /// Gets the query name.
+ /// </value>
string QueryName { get; }
+
+ /// <value>
+ /// Gets the property type.
+ /// </value>
PropertyType PropertyType { get; }
+
+ /// <value>
+ /// Gets the property values.
+ /// </value>
IList<object> Values { get; }
+
+ /// <value>
+ /// Gets the first property value.
+ /// </value>
object FirstValue { get; }
}
@@ -553,7 +830,9 @@ namespace PortCMIS.Data
/// </summary>
public interface IPrincipal : IExtensionsData
{
- /// <value>The principal ID</value>
+ /// <value>
+ /// Gets the principal ID.
+ /// </value>
string Id { get; }
}
@@ -562,16 +841,24 @@ namespace PortCMIS.Data
/// </summary>
public interface IAce : IExtensionsData
{
- /// <value>The principal</value>
+ /// <value>
+ /// Gets the principal
+ /// </value>
IPrincipal Principal { get; }
- /// <value>The principal ID</value>
+ /// <value>
+ /// Gets the principal ID
+ /// </value>
string PrincipalId { get; }
- /// <value>The list of permissions</value>
+ /// <value>
+ /// Gets the list of permissions
+ /// </value>
IList<string> Permissions { get; }
- /// <value>Indicates whether the ACE is a direct ACE or not</value>
+ /// <value>
+ /// Gets whether the ACE is a direct ACE or not
+ /// </value>
bool IsDirect { get; }
}
@@ -580,10 +867,14 @@ namespace PortCMIS.Data
/// </summary>
public interface IAcl : IExtensionsData
{
- /// <value>The list of ACEs</value>
+ /// <value>
+ /// Gets the list of ACEs.
+ /// </value>
IList<IAce> Aces { get; }
- /// <value>Indicates whether the ACL is exact or not</value>
+ /// <value>
+ /// Gets whether the ACL is exact or not.
+ /// </value>
bool? IsExact { get; }
}
@@ -592,16 +883,24 @@ namespace PortCMIS.Data
/// </summary>
public interface IContentStream : IExtensionsData
{
- /// <value>The stream length, if known</value>
+ /// <value>
+ /// Gets the stream length, if known.
+ /// </value>
BigInteger? Length { get; }
- /// <value>The MIME type, if known</value>
+ /// <value>
+ /// Gets the MIME type, if known.
+ /// </value>
string MimeType { get; }
- /// <value>The file name, if known</value>
+ /// <value>
+ /// Gets the file name, if known.
+ /// </value>
string FileName { get; }
- /// <value>The stream</value>
+ /// <value>
+ /// Gets the stream.
+ /// </value>
Stream Stream { get; }
}
@@ -612,43 +911,119 @@ namespace PortCMIS.Data
{
}
+ /// <summary>
+ /// Allowable Actions.
+ /// </summary>
public interface IAllowableActions : IExtensionsData
{
+ /// <value>
+ /// Gets the set of Allowable Actions.
+ /// </value>
ISet<PortCMIS.Enums.Action> Actions { get; }
}
+ /// <summary>
+ /// Rendition Data.
+ /// </summary>
public interface IRenditionData : IExtensionsData
{
+ /// <value>
+ /// Gets the stream ID.
+ /// </value>
string StreamId { get; }
+
+ /// <value>
+ /// Gets the MIME type.
+ /// </value>
string MimeType { get; }
+
+ /// <value>
+ /// Gets the stream length, if known.
+ /// </value>
BigInteger? Length { get; }
+
+ /// <value>
+ /// Gets the kind.
+ /// </value>
string Kind { get; }
+
+ /// <value>
+ /// Gets the title.
+ /// </value>
string Title { get; }
+
+ /// <value>
+ /// Gets the height, if the rendition is an image.
+ /// </value>
BigInteger? Height { get; }
+
+ /// <value>
+ /// Gets the width, if the rendition is an image.
+ /// </value>
BigInteger? Width { get; }
+
+ /// <value>
+ /// Gets the rendition document ID, if the rendition is a standalone
document.
+ /// </value>
string RenditionDocumentId { get; }
}
+ /// <summary>
+ /// Change event.
+ /// </summary>
public interface IChangeEventInfo : IExtensionsData
{
+ /// <value>
+ /// Gets the type of the change.
+ /// </value>
ChangeType? ChangeType { get; }
+
+ /// <value>
+ /// Gets the date and time of the change.
+ /// </value>
DateTime? ChangeTime { get; }
}
+ /// <summary>
+ /// Policy ID List.
+ /// </summary>
public interface IPolicyIdList : IExtensionsData
{
+ /// <value>
+ /// Gets the IDs of policies.
+ /// </value>
IList<string> PolicyIds { get; }
}
+ /// <summary>
+ /// Failed to Delete data.
+ /// </summary>
public interface IFailedToDeleteData : IExtensionsData
{
+ /// <value>
+ /// Gets the IDs of objects that couldn't be deleted.
+ /// </value>
IList<string> Ids { get; }
}
+ /// <summary>
+ /// Bulk Update data.
+ /// </summary>
public interface IBulkUpdateObjectIdAndChangeToken : IExtensionsData
{
+ /// <value>
+ /// Gets the original object ID.
+ /// </value>
string Id { get; }
+
+ /// <value>
+ /// Gets the new object ID, if available.
+ /// </value>
string NewId { get; }
+
+ /// <value>
+ /// Gets the change token.
+ /// </value>
string ChangeToken { get; }
}
}
Modified: chemistry/portcmis/trunk/PortCMIS/enum/Enums.cs
URL:
http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/enum/Enums.cs?rev=1741970&r1=1741969&r2=1741970&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/enum/Enums.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/enum/Enums.cs Mon May 2 12:02:11 2016
@@ -409,12 +409,12 @@ namespace PortCMIS.Enums
public enum DecimalPrecision
{
/// <summary>
- /// 32 bit precision.
+ /// 32 bit precision. ("single" as specified in IEEE-754-1985).
/// </summary>
[CmisValue("32")]
Bits32,
/// <summary>
- /// 64 bit precision.
+ /// 64 bit precision. ("double" as specified in IEEE-754-1985).
/// </summary>
[CmisValue("64")]
Bits64
@@ -589,64 +589,154 @@ namespace PortCMIS.Enums
/// </summary>
public enum Action
{
+ /// <summary>
+ /// User can delete this object.
+ /// </summary>
[CmisValue("canDeleteObject")]
CanDeleteObject,
+ /// <summary>
+ /// Use can update properties of this object.
+ /// </summary>
[CmisValue("canUpdateProperties")]
CanUpdateProperties,
+ /// <summary>
+ /// User can get the folder tree of this folder.
+ /// </summary>
[CmisValue("canGetFolderTree")]
CanGetFolderTree,
+ /// <summary>
+ /// User can get the properties of this object.
+ /// </summary>
[CmisValue("canGetProperties")]
CanGetProperties,
+ /// <summary>
+ /// User can get the relationships of this object.
+ /// </summary>
[CmisValue("canGetObjectRelationships")]
CanGetObjectRelationships,
+ /// <summary>
+ /// User can get the parents of this object.
+ /// </summary>
[CmisValue("canGetObjectParents")]
CanGetObjectParents,
+ /// <summary>
+ /// User can get the parent of this folder.
+ /// </summary>
[CmisValue("canGetFolderParent")]
CanGetFolderParent,
+ /// <summary>
+ /// User can get the descendants of this folder.
+ /// </summary>
[CmisValue("canGetDescendants")]
CanGetDescendants,
+ /// <summary>
+ /// User can move this object.
+ /// </summary>
[CmisValue("canMoveObject")]
CanMoveObject,
+ /// <summary>
+ /// User can delete the content stream of this document.
+ /// </summary>
[CmisValue("canDeleteContentStream")]
CanDeleteContentStream,
+ /// <summary>
+ /// User can checkout this document.
+ /// </summary>
[CmisValue("canCheckOut")]
CanCheckOut,
+ /// <summary>
+ /// User can cancel the check out of this PWC.
+ /// </summary>
[CmisValue("canCancelCheckOut")]
CanCancelCheckOut,
+ /// <summary>
+ /// User can check in this PWC.
+ /// </summary>
[CmisValue("canCheckIn")]
CanCheckIn,
+ /// <summary>
+ /// User can set a content stream of this document.
+ /// </summary>
[CmisValue("canSetContentStream")]
CanSetContentStream,
+ /// <summary>
+ /// User can get the versions of this document.
+ /// </summary>
[CmisValue("canGetAllVersions")]
CanGetAllVersions,
+ /// <summary>
+ /// User can add thi object to a folder.
+ /// </summary>
[CmisValue("canAddObjectToFolder")]
CanAddObjectToFolder,
+ /// <summary>
+ /// User can remove this object form a folder.
+ /// </summary>
[CmisValue("canRemoveObjectFromFolder")]
CanRemoveObjectFromFolder,
+ /// <summary>
+ /// User can get the content stream of this document.
+ /// </summary>
[CmisValue("canGetContentStream")]
CanGetContentStream,
+ /// <summary>
+ /// User can apply policies to this object.
+ /// </summary>
[CmisValue("canApplyPolicy")]
CanApplyPolicy,
+ /// <summary>
+ /// User can get the policies applied to this object.
+ /// </summary>
[CmisValue("canGetAppliedPolicies")]
CanGetAppliedPolicies,
+ /// <summary>
+ /// User can remove policies from this object.
+ /// </summary>
[CmisValue("canRemovePolicy")]
CanRemovePolicy,
+ /// <summary>
+ /// User can get the children of this object.
+ /// </summary>
[CmisValue("canGetChildren")]
CanGetChildren,
+ /// <summary>
+ /// User can create documents in this folder.
+ /// </summary>
[CmisValue("canCreateDocument")]
CanCreateDocument,
+ /// <summary>
+ /// User can create folders in this folder.
+ /// </summary>
[CmisValue("canCreateFolder")]
CanCreateFolder,
+ /// <summary>
+ /// USer can create relationships from and to this object.
+ /// </summary>
[CmisValue("canCreateRelationship")]
CanCreateRelationship,
+ /// <summary>
+ /// User can create items in this folder.
+ /// </summary>
[CmisValue("canCreateItem")]
CanCreateItem,
+ /// <summary>
+ /// User can delete this folder and all descendants.
+ /// </summary>
[CmisValue("canDeleteTree")]
CanDeleteTree,
+ /// <summary>
+ /// User can get the renditions of this object.
+ /// </summary>
[CmisValue("canGetRenditions")]
CanGetRenditions,
+ /// <summary>
+ /// User can get the ACL of this object.
+ /// </summary>
[CmisValue("canGetAcl")]
CanGetAcl,
+ /// <summary>
+ /// User can apply an ACL to this object.
+ /// </summary>
[CmisValue("canApplyAcl")]
CanApplyAcl
}
Modified: chemistry/portcmis/trunk/PortCMIS/utils/Logger.cs
URL:
http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/utils/Logger.cs?rev=1741970&r1=1741969&r2=1741970&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/utils/Logger.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/utils/Logger.cs Mon May 2 12:02:11 2016
@@ -29,15 +29,40 @@ namespace PortCMIS.Utils
public class Logger
{
+ /// <summary>
+ /// The log levels
+ /// </summary>
public enum LogLevel
{
- Error, Warn, Info, Debug, Trace
+ /// <summary>
+ /// Log level Error
+ /// </summary>
+ Error,
+ /// <summary>
+ /// Log level Warn
+ /// </summary>
+ Warn,
+ /// <summary>
+ /// Log level Info
+ /// </summary>
+ Info,
+ /// <summary>
+ /// Log level Debug
+ /// </summary>
+ Debug,
+ /// <summary>
+ /// Log level Trace
+ /// </summary>
+ Trace
}
- /// <value>the log level</value>
+ /// <value>Gets or sets the log level</value>
public static LogLevel Level { get; set; }
+ /// <value>Gets or sets whether the log messages should go to
System.Diagnostics.Debug</value>
public static bool ToDebug { get; set; }
+ /// <value>Gets or sets whether the log messages should go to a
writer</value>
public static bool ToWriter { get; set; }
+ /// <value>Sets the log writer</value>
public static TextWriter Writer { private get; set; }
/// <value>Is the error log level enabled?</value>
@@ -136,7 +161,7 @@ namespace PortCMIS.Utils
{
if (IsTraceEnabled)
{
- Write("Trace", message, e);
+ Write("TRACE", message, e);
}
}
}