chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmpas...@apache.org
Subject svn commit: r1341865 [1/3] - in /chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis: client/bindings/spi/atompub/ client/bindings/spi/atompub/objects/ commons/impl/
Date Wed, 23 May 2012 14:03:45 GMT
Author: jmpascal
Date: Wed May 23 14:03:44 2012
New Revision: 1341865

URL: http://svn.apache.org/viewvc?rev=1341865&view=rev
Log:
Bug fix inside AtomPubParser : parsing extension 
Formatting Code to respect chemistry convention

Added:
    chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/HtmlDoc.java
Modified:
    chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
    chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AclServiceImpl.java
    chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java
    chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomPubParser.java
    chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/CmisAtomPubConstants.java
    chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/DiscoveryServiceImpl.java
    chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java
    chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java
    chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/AtomPubConverter.java

Modified: chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java?rev=1341865&r1=1341864&r2=1341865&view=diff
==============================================================================
--- chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
(original)
+++ chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
Wed May 23 14:03:44 2012
@@ -855,7 +855,6 @@ public abstract class AbstractAtomPubSer
         UrlBuilder aclUrl = new UrlBuilder(link);
         aclUrl.addParameter(Constants.PARAM_ACL_PROPAGATION, aclPropagation);
 
-
         // update
         HttpUtils.Response resp = put(aclUrl, Constants.MEDIATYPE_ACL, new HttpUtils.Output()
{
             public void write(OutputStream out) throws Exception {

Modified: chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AclServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AclServiceImpl.java?rev=1341865&r1=1341864&r2=1341865&view=diff
==============================================================================
--- chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AclServiceImpl.java
(original)
+++ chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AclServiceImpl.java
Wed May 23 14:03:44 2012
@@ -32,7 +32,7 @@ import org.apache.chemistry.opencmis.com
  * ACL Service AtomPub client.
  */
 public class AclServiceImpl extends AbstractAtomPubService implements AclService {
-    
+
     /**
      * Constructor.
      */
@@ -61,8 +61,7 @@ public class AclServiceImpl extends Abst
         return result;
     }
 
-    public Acl getAcl(String repositoryId, String objectId,
-            Boolean onlyBasicPermissions, ExtensionsData extension) {
+    public Acl getAcl(String repositoryId, String objectId, Boolean onlyBasicPermissions,
ExtensionsData extension) {
 
         // find the link
         String link = loadLink(repositoryId, objectId, Constants.REL_ACL, Constants.MEDIATYPE_ACL);

Modified: chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java?rev=1341865&r1=1341864&r2=1341865&view=diff
==============================================================================
--- chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java
(original)
+++ chemistry/opencmis/branches/android/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java
Wed May 23 14:03:44 2012
@@ -18,6 +18,7 @@
  */
 package org.apache.chemistry.opencmis.client.bindings.spi.atompub;
 
+import static org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubConstants.ATTR_PROPERTY_DEFINITION_ID;
 import static org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubConstants.TAG_ATOM_ID;
 import static org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubConstants.TAG_ATOM_TITLE;
 import static org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubConstants.TAG_ATOM_UPDATED;
@@ -25,16 +26,12 @@ import static org.apache.chemistry.openc
 import static org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubConstants.TAG_CONTENT_BASE64;
 import static org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubConstants.TAG_CONTENT_MEDIATYPE;
 import static org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubConstants.TAG_ENTRY;
-
-import static org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubConstants.TAG_VALUE;
 import static org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubConstants.TAG_QUERY;
 import static org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubConstants.TAG_QUERY_STATEMENT;
-import static org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubConstants.ATTR_PROPERTY_DEFINITION_ID;
-
+import static org.apache.chemistry.opencmis.client.bindings.spi.atompub.CmisAtomPubConstants.TAG_VALUE;
 
 import java.io.BufferedInputStream;
 import java.io.ByteArrayInputStream;
-import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.text.SimpleDateFormat;
@@ -200,8 +197,9 @@ public class AtomEntryWriter {
 
         writer.startTag(Constants.NAMESPACE_CMIS, "permission");
 
-        // TODO Implements 
-        //writeTag(writer, Constants.NAMESPACE_CMIS, "direct", acl.getAces().get(0).)
+        // TODO Implements
+        // writeTag(writer, Constants.NAMESPACE_CMIS, "direct",
+        // acl.getAces().get(0).)
 
         writer.endTag(Constants.NAMESPACE_CMIS, "permission");
 
@@ -253,11 +251,12 @@ public class AtomEntryWriter {
         if (object.getProperties() != null) {
             writer.startTag(Constants.NAMESPACE_CMIS, Constants.SELECTOR_PROPERTIES);
             writeProperties(writer, object.getProperties().getPropertyList());
-            
-            if (object.getProperties().getExtensions() != null && object.getProperties().getExtensions().isEmpty()
== false){
-            	writeExtensions(writer, object.getProperties().getExtensions());
+
+            if (object.getProperties().getExtensions() != null
+                    && object.getProperties().getExtensions().isEmpty() == false)
{
+                writeExtensions(writer, object.getProperties().getExtensions());
             }
-            
+
             writer.endTag(Constants.NAMESPACE_CMIS, Constants.SELECTOR_PROPERTIES);
         }
         writer.endTag(Constants.NAMESPACE_RESTATOM, Constants.SELECTOR_OBJECT);
@@ -289,24 +288,24 @@ public class AtomEntryWriter {
         writeValues(writer, prop.getValues());
         writer.endTag(Constants.NAMESPACE_CMIS, getPropertyTypeTag(prop));
     }
-    
-    private static void writeExtensions(XmlSerializer writer, List<CmisExtensionElement>
extensions) throws Exception{
-    	for (CmisExtensionElement cmisExtensionElement : extensions) {
-    		writer.startTag(cmisExtensionElement.getNamespace(), cmisExtensionElement.getName());
-    		writeAttributes(writer, cmisExtensionElement.getAttributes());
-    		if (cmisExtensionElement.getChildren() != null && cmisExtensionElement.getChildren().isEmpty()
== false){
-    			writeExtensions(writer, cmisExtensionElement.getChildren());
-    		} else if (cmisExtensionElement.getValue() != null){
-    			writer.text(cmisExtensionElement.getValue());
-    		}
+
+    private static void writeExtensions(XmlSerializer writer, List<CmisExtensionElement>
extensions) throws Exception {
+        for (CmisExtensionElement cmisExtensionElement : extensions) {
+            writer.startTag(cmisExtensionElement.getNamespace(), cmisExtensionElement.getName());
+            writeAttributes(writer, cmisExtensionElement.getAttributes());
+            if (cmisExtensionElement.getChildren() != null && cmisExtensionElement.getChildren().isEmpty()
== false) {
+                writeExtensions(writer, cmisExtensionElement.getChildren());
+            } else if (cmisExtensionElement.getValue() != null) {
+                writer.text(cmisExtensionElement.getValue());
+            }
             writer.endTag(cmisExtensionElement.getNamespace(), cmisExtensionElement.getName());
-		}
+        }
     }
-    
-    private static void writeAttributes(XmlSerializer writer,  Map<String, String>
values) throws Exception{
-    	for (Map.Entry<String, String> value : values.entrySet()) {
+
+    private static void writeAttributes(XmlSerializer writer, Map<String, String> values)
throws Exception {
+        for (Map.Entry<String, String> value : values.entrySet()) {
             writer.attribute(null, value.getKey(), value.getValue());
-		}
+        }
     }
 
     private static void writeValues(XmlSerializer writer, List<?> values) throws Exception
{



Mime
View raw message