chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1134772 - in /chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub: LinkCache.java VersioningServiceImpl.java
Date Sat, 11 Jun 2011 21:29:01 GMT
Author: fmui
Date: Sat Jun 11 21:29:00 2011
New Revision: 1134772

URL: http://svn.apache.org/viewvc?rev=1134772&view=rev
Log:
working copy workaround

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java?rev=1134772&r1=1134771&r2=1134772&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
Sat Jun 11 21:29:00 2011
@@ -55,6 +55,7 @@ public class LinkCache implements Serial
         KNOWN_LINKS.add(Constants.REL_EDITMEDIA);
         KNOWN_LINKS.add(Constants.REL_POLICIES);
         KNOWN_LINKS.add(Constants.REL_VERSIONHISTORY);
+        KNOWN_LINKS.add(Constants.REL_WORKINGCOPY);
         KNOWN_LINKS.add(AtomPubParser.LINK_REL_CONTENT);
     }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java?rev=1134772&r1=1134771&r2=1134772&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java
Sat Jun 11 21:29:00 2011
@@ -118,6 +118,13 @@ public class VersioningServiceImpl exten
             throwLinkException(repositoryId, objectId, Constants.REL_SELF, Constants.MEDIATYPE_ENTRY);
         }
 
+        // prefer working copy link if available
+        // (workaround for non-compliant repositories)
+        String wcLink = getLink(repositoryId, objectId, Constants.REL_WORKINGCOPY, Constants.MEDIATYPE_ENTRY);
+        if (wcLink != null) {
+            link = wcLink;
+        }
+
         delete(new UrlBuilder(link));
     }
 
@@ -136,6 +143,13 @@ public class VersioningServiceImpl exten
             throwLinkException(repositoryId, objectId.getValue(), Constants.REL_SELF, Constants.MEDIATYPE_ENTRY);
         }
 
+        // prefer working copy link if available
+        // (workaround for non-compliant repositories)
+        String wcLink = getLink(repositoryId, objectId.getValue(), Constants.REL_WORKINGCOPY,
Constants.MEDIATYPE_ENTRY);
+        if (wcLink != null) {
+            link = wcLink;
+        }
+
         UrlBuilder url = new UrlBuilder(link);
         url.addParameter(Constants.PARAM_CHECKIN_COMMENT, checkinComment);
         url.addParameter(Constants.PARAM_MAJOR, major);



Mime
View raw message