chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r800672 [3/3] - in /incubator/chemistry/trunk/chemistry: chemistry-api/src/main/java/org/apache/chemistry/ chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/ chemistry-atompub-client/src/main/java/org/apache/chemist...
Date Tue, 04 Aug 2009 04:26:34 GMT
Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java?rev=800672&r1=800671&r2=800672&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleType.java
Tue Aug  4 04:26:32 2009
@@ -140,9 +140,9 @@
             null, false, false, null, Updatability.READ_ONLY, true, true, 0,
             null, null, -1, null);
 
-    public static final SimplePropertyDefinition PROP_CHECKIN_COMMENT = new SimplePropertyDefinition(
-            Property.CHECKIN_COMMENT, "def:checkincomment", null,
-            Property.CHECKIN_COMMENT, "Checkin Comment", "", false,
+    public static final SimplePropertyDefinition PROP_CHECK_IN_COMMENT = new SimplePropertyDefinition(
+            Property.CHECK_IN_COMMENT, "def:checkincomment", null,
+            Property.CHECK_IN_COMMENT, "Check In Comment", "", false,
             PropertyType.STRING, false, null, false, false, null,
             Updatability.READ_ONLY, true, true, 0, null, null, -1, null);
 
@@ -159,11 +159,12 @@
             null, false, false, null, Updatability.READ_ONLY, true, true, 0,
             null, null, -1, null);
 
-    public static final SimplePropertyDefinition PROP_CONTENT_STREAM_FILENAME = new SimplePropertyDefinition(
-            Property.CONTENT_STREAM_FILENAME, "def:contentstreamfilename",
-            null, Property.CONTENT_STREAM_FILENAME, "Content Stream Filename",
-            "", false, PropertyType.STRING, false, null, false, false, null,
-            Updatability.READ_WRITE, true, true, 0, null, null, -1, null);
+    public static final SimplePropertyDefinition PROP_CONTENT_STREAM_FILE_NAME = new SimplePropertyDefinition(
+            Property.CONTENT_STREAM_FILE_NAME, "def:contentstreamfilename",
+            null, Property.CONTENT_STREAM_FILE_NAME,
+            "Content Stream File Name", "", false, PropertyType.STRING, false,
+            null, false, false, null, Updatability.READ_WRITE, true, true, 0,
+            null, null, -1, null);
 
     public static final SimplePropertyDefinition PROP_CONTENT_STREAM_ID = new SimplePropertyDefinition(
             Property.CONTENT_STREAM_ID, "def:contentstreamid", null,
@@ -228,10 +229,10 @@
             PROP_IS_VERSION_SERIES_CHECKED_OUT, //
             PROP_VERSION_SERIES_CHECKED_OUT_BY, //
             PROP_VERSION_SERIES_CHECKED_OUT_ID, //
-            PROP_CHECKIN_COMMENT, //
+            PROP_CHECK_IN_COMMENT, //
             PROP_CONTENT_STREAM_LENGTH, //
             PROP_CONTENT_STREAM_MIME_TYPE, //
-            PROP_CONTENT_STREAM_FILENAME, //
+            PROP_CONTENT_STREAM_FILE_NAME, //
             PROP_CONTENT_STREAM_ID);
 
     public static final List<PropertyDefinition> PROPS_FOLDER_BASE = commonPlus(

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite?rev=800672&r1=800671&r2=800672&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
Tue Aug  4 04:26:32 2009
@@ -143,6 +143,6 @@
 
 /* JOINs not working yet.
 <<SELECT Y.CLAIM_NUM, X.PROPERTY_ADDRESS, Y.DAMAGE_ESTIMATES
-FROM POLICY AS X JOIN CLAIMS AS Y ON ( X.POLICY_NUM = Y.POLICY_NUM )
+FROM POLICY AS X JOIN CLAIMS AS Y ON X.POLICY_NUM = Y.POLICY_NUM
 WHERE ( 100000 <= ANY Y.DAMAGE_ESTIMATES ) AND ( Y.CAUSE NOT LIKE '%Katrina%' )>>
OK
 */

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/impl/simple/TestSimpleRepository.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/impl/simple/TestSimpleRepository.java?rev=800672&r1=800671&r2=800672&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/impl/simple/TestSimpleRepository.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/impl/simple/TestSimpleRepository.java
Tue Aug  4 04:26:32 2009
@@ -29,11 +29,11 @@
 import org.apache.chemistry.ContentStreamPresence;
 import org.apache.chemistry.Document;
 import org.apache.chemistry.Folder;
-import org.apache.chemistry.JoinCapability;
+import org.apache.chemistry.CapabilityJoin;
 import org.apache.chemistry.Property;
 import org.apache.chemistry.PropertyDefinition;
 import org.apache.chemistry.PropertyType;
-import org.apache.chemistry.QueryCapability;
+import org.apache.chemistry.CapabilityQuery;
 import org.apache.chemistry.RepositoryCapabilities;
 import org.apache.chemistry.RepositoryInfo;
 import org.apache.chemistry.Type;
@@ -87,7 +87,7 @@
         assertEquals("Apache", info.getVendorName());
         assertEquals("Chemistry Simple Repository", info.getProductName());
         assertEquals("0.1-SNAPSHOT", info.getProductVersion());
-        assertEquals("0.61", info.getVersionSupported());
+        assertEquals("0.62", info.getVersionSupported());
         assertNull(info.getRepositorySpecificInformation());
 
         RepositoryCapabilities capabilities = info.getCapabilities();
@@ -97,8 +97,8 @@
         assertFalse(capabilities.isPWCUpdatable());
         assertFalse(capabilities.isPWCSearchable());
         assertFalse(capabilities.isAllVersionsSearchable());
-        assertEquals(JoinCapability.NONE, capabilities.getJoinCapability());
-        assertEquals(QueryCapability.BOTH_COMBINED,
+        assertEquals(CapabilityJoin.NONE, capabilities.getJoinCapability());
+        assertEquals(CapabilityQuery.BOTH_COMBINED,
                 capabilities.getQueryCapability());
     }
 
@@ -200,7 +200,7 @@
 
         assertEquals(29, cs.getLength());
         assertEquals("text/plain", cs.getMimeType());
-        assertEquals("houston.txt", cs.getFilename());
+        assertEquals("houston.txt", cs.getFileName());
 
         byte[] bytes = SimpleContentStream.getBytes(cs.getStream());
         assertEquals(string, new String(bytes, "UTF-8"));

Modified: incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java?rev=800672&r1=800671&r2=800672&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java
Tue Aug  4 04:26:32 2009
@@ -185,17 +185,17 @@
     }
 
     // TODO add IOException to throws clause
-    public ObjectId createDocument(String typeId,
-            Map<String, Serializable> properties, ObjectId folderId,
-            ContentStream contentStream, VersioningState versioningState) {
+    public ObjectId createDocument(Map<String, Serializable> properties,
+            ObjectId folderId, ContentStream contentStream,
+            VersioningState versioningState) {
 
         try {
             JcrFolder folder = (JcrFolder) getObject(folderId);
             Document doc = folder.newDocument(null);
             doc.setValues(properties);
             if (contentStream != null) {
-                doc.setName(contentStream.getFilename());
-                doc.setValue("title", contentStream.getFilename());
+                doc.setName(contentStream.getFileName());
+                doc.setValue("title", contentStream.getFileName());
                 doc.setContentStream(contentStream);
             }
             doc.save();
@@ -207,21 +207,19 @@
         return null;
     }
 
-    public ObjectId createFolder(String typeId,
-            Map<String, Serializable> properties, ObjectId folderId) {
+    public ObjectId createFolder(Map<String, Serializable> properties,
+            ObjectId folderId) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }
 
-    public ObjectId createPolicy(String typeId,
-            Map<String, Serializable> properties, ObjectId folderId) {
+    public ObjectId createPolicy(Map<String, Serializable> properties,
+            ObjectId folderId) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }
 
-    public ObjectId createRelationship(String typeId,
-            Map<String, Serializable> properties, ObjectId sourceId,
-            ObjectId targetId) {
+    public ObjectId createRelationship(Map<String, Serializable> properties) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }
@@ -348,15 +346,13 @@
         throw new UnsupportedOperationException();
     }
 
-    public ObjectEntry getFolderParent(ObjectId folderId, String filter,
-            boolean includeAllowableActions, boolean includeRelationships) {
+    public ObjectEntry getFolderParent(ObjectId folderId, String filter) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }
 
     public Collection<ObjectEntry> getObjectParents(ObjectId objectId,
-            String filter, boolean includeAllowableActions,
-            boolean includeRelationships) {
+            String filter) {
         // TODO Auto-generated method stub
         throw new UnsupportedOperationException();
     }

Modified: incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrContentStream.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrContentStream.java?rev=800672&r1=800671&r2=800672&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrContentStream.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrContentStream.java
Tue Aug  4 04:26:32 2009
@@ -37,7 +37,7 @@
         this.content = content;
     }
 
-    public String getFilename() {
+    public String getFileName() {
         try {
             return content.getName();
         } catch (RepositoryException e) {

Modified: incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrNewDocument.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrNewDocument.java?rev=800672&r1=800671&r2=800672&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrNewDocument.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrNewDocument.java
Tue Aug  4 04:26:32 2009
@@ -140,7 +140,7 @@
         try {
             String name = this.name;
             if (cs != null) {
-                name = cs.getFilename();
+                name = cs.getFileName();
             }
             if (name == null) {
                 Serializable val = getValue("title");

Modified: incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrObjectEntry.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrObjectEntry.java?rev=800672&r1=800671&r2=800672&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrObjectEntry.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrObjectEntry.java
Tue Aug  4 04:26:32 2009
@@ -31,6 +31,7 @@
 import javax.jcr.PathNotFoundException;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
+import javax.xml.namespace.QName;
 
 import org.apache.chemistry.Document;
 import org.apache.chemistry.Folder;
@@ -62,7 +63,7 @@
     public JcrObjectEntry() {
     }
 
-    public Collection<String> getAllowableActions() {
+    public Map<QName, Boolean> getAllowableActions() {
         throw new UnsupportedOperationException();
     }
 
@@ -99,8 +100,8 @@
         return getString(Property.CHANGE_TOKEN);
     }
 
-    public String getCheckinComment() {
-        return getString(Property.CHECKIN_COMMENT);
+    public String getCheckInComment() {
+        return getString(Property.CHECK_IN_COMMENT);
     }
 
     public String getCreatedBy() {

Modified: incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrRepository.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrRepository.java?rev=800672&r1=800671&r2=800672&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrRepository.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrRepository.java
Tue Aug  4 04:26:32 2009
@@ -21,6 +21,7 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -31,15 +32,15 @@
 import javax.jcr.nodetype.NodeType;
 import javax.jcr.nodetype.NodeTypeManager;
 
-import org.apache.chemistry.ACLCapability;
+import org.apache.chemistry.CapabilityACL;
 import org.apache.chemistry.ACLCapabilityType;
 import org.apache.chemistry.BaseType;
-import org.apache.chemistry.ChangeCapability;
+import org.apache.chemistry.CapabilityChange;
 import org.apache.chemistry.Connection;
-import org.apache.chemistry.JoinCapability;
+import org.apache.chemistry.CapabilityJoin;
 import org.apache.chemistry.ObjectId;
-import org.apache.chemistry.QueryCapability;
-import org.apache.chemistry.RenditionCapability;
+import org.apache.chemistry.CapabilityQuery;
+import org.apache.chemistry.CapabilityRendition;
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.RepositoryCapabilities;
 import org.apache.chemistry.RepositoryEntry;
@@ -171,8 +172,7 @@
         return null;
     }
 
-    public URI getURI() {
-        // TODO Auto-generated method stub
+    public URI getThinClientURI() {
         return null;
     }
 
@@ -183,7 +183,13 @@
     }
 
     public Set<BaseType> getChangeLogBaseTypes() {
-        return Collections.emptySet();
+        // TODO-0.63 TCK checks 0.62 schema which has minOccurs=1
+        Set<BaseType> changeLogBaseTypes = new HashSet<BaseType>();
+        changeLogBaseTypes.add(BaseType.DOCUMENT);
+        changeLogBaseTypes.add(BaseType.FOLDER);
+        changeLogBaseTypes.add(BaseType.RELATIONSHIP);
+        changeLogBaseTypes.add(BaseType.POLICY);
+        return changeLogBaseTypes;
     }
 
     public boolean isChangeLogIncomplete() {
@@ -228,25 +234,25 @@
     }
 
     public String getVersionSupported() {
-        return "0.61";
+        return "0.62";
     }
 
     // -------------------------------------------------- RepositoryCapabilities
 
-    public JoinCapability getJoinCapability() {
-        return JoinCapability.NONE;
+    public CapabilityJoin getJoinCapability() {
+        return CapabilityJoin.NONE;
     }
 
-    public QueryCapability getQueryCapability() {
-        return QueryCapability.BOTH_SEPARATE;
+    public CapabilityQuery getQueryCapability() {
+        return CapabilityQuery.BOTH_SEPARATE;
     }
 
-    public RenditionCapability getRenditionCapability() {
-        return RenditionCapability.NONE;
+    public CapabilityRendition getRenditionCapability() {
+        return CapabilityRendition.NONE;
     }
 
-    public ChangeCapability getChangeCapability() {
-        return ChangeCapability.NONE;
+    public CapabilityChange getChangeCapability() {
+        return CapabilityChange.NONE;
     }
 
     public boolean hasMultifiling() {
@@ -281,8 +287,8 @@
         return false;
     }
 
-    public ACLCapability getACLCapability() {
+    public CapabilityACL getACLCapability() {
         // TODO Auto-generated method stub
-        return ACLCapability.NONE;
+        return CapabilityACL.NONE;
     }
 }

Modified: incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java?rev=800672&r1=800671&r2=800672&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
Tue Aug  4 04:26:32 2009
@@ -198,9 +198,9 @@
 
     public void testGetFolderParent() {
         Folder root = conn.getRootFolder();
-        assertNull(spi.getFolderParent(root, null, false, false));
+        assertNull(spi.getFolderParent(root, null));
         ObjectId folder1 = root.getChildren().get(0);
-        ObjectEntry p1 = spi.getFolderParent(folder1, null, false, false);
+        ObjectEntry p1 = spi.getFolderParent(folder1, null);
         assertNotNull(p1);
         assertEquals(root.getId(), p1.getId());
     }
@@ -210,8 +210,7 @@
         ObjectId folder1Id = root.getChildren().get(0);
         Folder folder1 = (Folder) conn.getObject(folder1Id);
         Document doc = getDocumentChild(folder1);
-        Collection<ObjectEntry> parents = spi.getObjectParents(doc, null,
-                false, false);
+        Collection<ObjectEntry> parents = spi.getObjectParents(doc, null);
         assertEquals(1, parents.size());
     }
 
@@ -235,7 +234,7 @@
         assertNotNull("dog not found", dog);
         ContentStream cs = dog.getContentStream();
         assertTrue(cs.getLength() != 0);
-        assertEquals("dog.jpg", cs.getFilename());
+        assertEquals("dog.jpg", cs.getFileName());
         assertEquals("image/jpeg", cs.getMimeType());
         assertNotNull(cs.getStream());
         InputStream in = dog.getContentStream().getStream();



Mime
View raw message