Author: fmui
Date: Thu Oct 14 15:16:38 2010
New Revision: 1022574

URL: http://svn.apache.org/viewvc?rev=1022574&view=rev
Log:
- fixed minor bug in workbench
- tried to fix packing of workbench on hudson (let's see if that works)
- improved exception handling wih deleted objects in content changes lists

Modified:
    
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ObjectIdImpl.java
    
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomPubUtils.java
    
incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml
    
incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/RelationshipTable.java

Modified: 
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ObjectIdImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ObjectIdImpl.java?rev=1022574&r1=1022573&r2=1022574&view=diff
==============================================================================
--- 
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ObjectIdImpl.java
 (original)
+++ 
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/ObjectIdImpl.java
 Thu Oct 14 15:16:38 2010
@@ -53,4 +53,9 @@ public class ObjectIdImpl implements Obj
 
         this.id = id;
     }
+
+    @Override
+    public String toString() {
+        return "Object Id: " + id;
+    }
 }

Modified: 
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomPubUtils.java
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomPubUtils.java?rev=1022574&r1=1022573&r2=1022574&view=diff
==============================================================================
--- 
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomPubUtils.java
 (original)
+++ 
incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomPubUtils.java
 Thu Oct 14 15:16:38 2010
@@ -253,7 +253,13 @@ public final class AtomPubUtils {
             throw new CmisRuntimeException("Object not set!");
         }
 
-        ObjectInfo info = service.getObjectInfo(repositoryId, object.getId());
+        ObjectInfo info = null;
+        try {
+            info = service.getObjectInfo(repositoryId, object.getId());
+        } catch (Exception e) {
+            // ignore all exceptions
+        }
+
         if (info != null) {
             writeObjectEntry(service, entry, object, children, repositoryId, 
pathSegment, relativePathSegment, baseUrl,
                     isRoot);

Modified: 
incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml?rev=1022574&r1=1022573&r2=1022574&view=diff
==============================================================================
--- 
incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml
 (original)
+++ 
incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml
 Thu Oct 14 15:16:38 2010
@@ -98,7 +98,7 @@
                                  <property name="timestamp" 
value="${maven.build.timestamp}"/>
                                  <property name="basedir" 
value="${maven.basedir}"/>
                                  <property name="targetdir" 
value="${project.build.directory}"/>
-                                 <property name="workbench.jar" 
value="${project.build.finalName}" />
+                                 <property name="workbench.jar" 
value="${project.artifactId}-${project.version}.${project.packaging}" />
                                  
                                  <!-- build timestamp -->
                                  <echo 
file="${targetdir}/generated-resources/META-INF/build-timestamp.txt">Version: 
${version} / Build: ${timestamp}</echo>
@@ -109,7 +109,7 @@
                                      <fileset dir="${basedir}/src/main/start"/>
                                  </copy>
                                  <replace dir="${targetdir}/start">
-                                     <replacefilter token="@workbench.jar@" 
value="${workbench.jar}.jar"/>
+                                     <replacefilter token="@workbench.jar@" 
value="${workbench.jar}"/>
                                      <replacefilter token="@version@" 
value="Version: ${version} / Build: ${timestamp}"/>
                                  </replace>
                                  <chmod dir="${targetdir}/start" perm="+x" 
includes="**/*.sh"/>

Modified: 
incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/RelationshipTable.java
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/RelationshipTable.java?rev=1022574&r1=1022573&r2=1022574&view=diff
==============================================================================
--- 
incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/RelationshipTable.java
 (original)
+++ 
incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/RelationshipTable.java
 Thu Oct 14 15:16:38 2010
@@ -23,42 +23,40 @@ import org.apache.chemistry.opencmis.wor
 
 public class RelationshipTable extends AbstractDetailsTable {
 
-       private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-       private static final String[] COLUMN_NAMES = { "Name", "Type", "Source",
-                       "Target" };
-       private static final int[] COLUMN_WIDTHS = { 200, 200, 200, 200 };
-
-       public RelationshipTable(ClientModel model) {
-               super();
-               init(model, COLUMN_NAMES, COLUMN_WIDTHS);
-       }
-
-       @Override
-       public int getDetailRowCount() {
-               if (getObject().getRelationships() == null) {
-                       return 0;
-               }
-
-               return getObject().getRelationships().size();
-       }
-
-       @Override
-       public Object getDetailValueAt(int rowIndex, int columnIndex) {
-               Relationship relationship = getObject().getRelationships()
-                               .get(rowIndex);
-
-               switch (columnIndex) {
-               case 0:
-                       return relationship.getName();
-               case 1:
-                       return relationship.getType().getId();
-               case 2:
-                       return relationship.getSourceId();
-               case 3:
-                       return relationship.getTargetId();
-               }
+    private static final String[] COLUMN_NAMES = { "Name", "Type", "Source", 
"Target" };
+    private static final int[] COLUMN_WIDTHS = { 200, 200, 200, 200 };
 
-               return null;
-       }
+    public RelationshipTable(ClientModel model) {
+        super();
+        init(model, COLUMN_NAMES, COLUMN_WIDTHS);
+    }
+
+    @Override
+    public int getDetailRowCount() {
+        if (getObject().getRelationships() == null) {
+            return 0;
+        }
+
+        return getObject().getRelationships().size();
+    }
+
+    @Override
+    public Object getDetailValueAt(int rowIndex, int columnIndex) {
+        Relationship relationship = 
getObject().getRelationships().get(rowIndex);
+
+        switch (columnIndex) {
+        case 0:
+            return relationship.getName();
+        case 1:
+            return relationship.getType().getId();
+        case 2:
+            return (relationship.getSourceId() == null ? "?" : 
relationship.getSourceId().getId());
+        case 3:
+            return (relationship.getTarget() == null ? "?" : 
relationship.getTarget().getId());
+        }
+
+        return null;
+    }
 }


Reply via email to