chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1135254 - in /chemistry/dotcmis/trunk/DotCMIS: binding/atompub/atompub-linkcache.cs binding/atompub/atompub.cs data/data-impl.cs
Date Mon, 13 Jun 2011 20:03:58 GMT
Author: fmui
Date: Mon Jun 13 20:03:58 2011
New Revision: 1135254

URL: http://svn.apache.org/viewvc?rev=1135254&view=rev
Log:
DotCMIS interop fixes

Modified:
    chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub-linkcache.cs
    chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs
    chemistry/dotcmis/trunk/DotCMIS/data/data-impl.cs

Modified: chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub-linkcache.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub-linkcache.cs?rev=1135254&r1=1135253&r2=1135254&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub-linkcache.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub-linkcache.cs Mon Jun 13 20:03:58
2011
@@ -40,6 +40,7 @@ namespace DotCMIS.Binding.AtomPub
             KnownLinks.Add(AtomPubConstants.RelEditMedia);
             KnownLinks.Add(AtomPubConstants.RelPolicies);
             KnownLinks.Add(AtomPubConstants.RelVersionHistory);
+            KnownLinks.Add(AtomPubConstants.RelWorkingCopy);
             KnownLinks.Add(AtomPubConstants.LinkRelContent);
         }
 

Modified: chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs?rev=1135254&r1=1135253&r2=1135254&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs Mon Jun 13 20:03:58 2011
@@ -2128,6 +2128,14 @@ namespace DotCMIS.Binding.AtomPub
                 ThrowLinkException(repositoryId, objectId, AtomPubConstants.RelSelf, AtomPubConstants.MediatypeEntry);
             }
 
+            // prefer working copy link if available
+            // (workaround for non-compliant repositories)
+            string wcLink = GetLink(repositoryId, objectId, AtomPubConstants.RelWorkingCopy,
AtomPubConstants.MediatypeEntry);
+            if (wcLink != null)
+            {
+                link = wcLink;
+            }
+
             Delete(new UrlBuilder(link));
         }
 
@@ -2149,6 +2157,14 @@ namespace DotCMIS.Binding.AtomPub
                 ThrowLinkException(repositoryId, objectId, AtomPubConstants.RelSelf, AtomPubConstants.MediatypeEntry);
             }
 
+            // prefer working copy link if available
+            // (workaround for non-compliant repositories)
+            string wcLink = GetLink(repositoryId, objectId, AtomPubConstants.RelWorkingCopy,
AtomPubConstants.MediatypeEntry);
+            if (wcLink != null)
+            {
+                link = wcLink;
+            }
+
             UrlBuilder url = new UrlBuilder(link);
             url.AddParameter(AtomPubConstants.ParamCheckinComment, checkinComment);
             url.AddParameter(AtomPubConstants.ParamMajor, major);

Modified: chemistry/dotcmis/trunk/DotCMIS/data/data-impl.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/data/data-impl.cs?rev=1135254&r1=1135253&r2=1135254&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/data/data-impl.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/data/data-impl.cs Mon Jun 13 20:03:58 2011
@@ -111,6 +111,7 @@ namespace DotCMIS.Data.Impl
     {
         private List<IPropertyDefinition> propertyDefintionList = new List<IPropertyDefinition>();
         private Dictionary<string, IPropertyDefinition> propertyDefintionDict = new
Dictionary<string, IPropertyDefinition>();
+        private string parentTypeId;
 
         public string Id { get; set; }
         public string LocalName { get; set; }
@@ -119,7 +120,11 @@ namespace DotCMIS.Data.Impl
         public string QueryName { get; set; }
         public string Description { get; set; }
         public BaseTypeId BaseTypeId { get; set; }
-        public string ParentTypeId { get; set; }
+        public string ParentTypeId
+        {
+            get { return parentTypeId; }
+            set { parentTypeId = (value == null || value.Length == 0 ? null : value); }
+        }
         public bool? IsCreatable { get; set; }
         public bool? IsFileable { get; set; }
         public bool? IsQueryable { get; set; }



Mime
View raw message