chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r917558 - in /incubator/chemistry/trunk/opencmis: opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/ opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/ opencmis-client...
Date Mon, 01 Mar 2010 15:41:24 GMT
Author: fmui
Date: Mon Mar  1 15:41:23 2010
New Revision: 917558

URL: http://svn.apache.org/viewvc?rev=917558&view=rev
Log:
- switched to latest and greatest CMIS schema
- added a tiny type test to the integration tests

Modified:
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/AllowableActions.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/ObjectType.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AllowableActionsImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/objecttype/AbstractObjectType.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/client/runtime/mock/MockSessionFactory.java
    incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-api/src/main/java/org/apache/opencmis/commons/provider/AllowableActionsData.java
    incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/Converter.java
    incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/FileShareRepository.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/DataObjectCreator.java
    incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/ObjectServiceTest.java
    incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AbstractSampleIT.java

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/AllowableActions.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/AllowableActions.java?rev=917558&r1=917557&r2=917558&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/AllowableActions.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/AllowableActions.java
Mon Mar  1 15:41:23 2010
@@ -75,8 +75,6 @@
 
   Boolean canCreateRelationship();
 
-  Boolean canCreatePolicy();
-
   Boolean canDeleteTree();
 
   Boolean canGetRenditions();

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/ObjectType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/ObjectType.java?rev=917558&r1=917557&r2=917558&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/ObjectType.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/objecttype/ObjectType.java
Mon Mar  1 15:41:23 2010
@@ -79,7 +79,7 @@
    * 
    * @return {@code true} if this type is a base type, {@code false} if this type is a derived
type.
    */
-  boolean isBase();
+  boolean isBaseType();
 
   /**
    * Get the type's base type, if the type is a derived (non-base) type.

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AllowableActionsImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AllowableActionsImpl.java?rev=917558&r1=917557&r2=917558&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AllowableActionsImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AllowableActionsImpl.java
Mon Mar  1 15:41:23 2010
@@ -70,10 +70,6 @@
     return actions.get(AllowableActionsData.ACTION_CAN_CREATE_FOLDER);
   }
 
-  public Boolean canCreatePolicy() {
-    return actions.get(AllowableActionsData.ACTION_CAN_CREATE_POLICY);
-  }
-
   public Boolean canCreateRelationship() {
     return actions.get(AllowableActionsData.ACTION_CAN_CREATE_RELATIONSHIP);
   }

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/objecttype/AbstractObjectType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/objecttype/AbstractObjectType.java?rev=917558&r1=917557&r2=917558&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/objecttype/AbstractObjectType.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/objecttype/AbstractObjectType.java
Mon Mar  1 15:41:23 2010
@@ -67,6 +67,10 @@
    * @see org.apache.opencmis.client.api.objecttype.ObjectType#getBaseType()
    */
   public ObjectType getBaseType() {
+    if (isBaseType()) {
+      return null;
+    }
+
     if (this.baseType != null) {
       return this.baseType;
     }
@@ -174,9 +178,9 @@
   /*
    * (non-Javadoc)
    * 
-   * @see org.apache.opencmis.client.api.objecttype.ObjectType#isBase()
+   * @see org.apache.opencmis.client.api.objecttype.ObjectType#isBaseType()
    */
-  public boolean isBase() {
+  public boolean isBaseType() {
     return (getTypeDefinition().getParentId() == null);
   }
 

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/client/runtime/mock/MockSessionFactory.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/client/runtime/mock/MockSessionFactory.java?rev=917558&r1=917557&r2=917558&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/client/runtime/mock/MockSessionFactory.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/test/java/org/apache/opencmis/client/runtime/mock/MockSessionFactory.java
Mon Mar  1 15:41:23 2010
@@ -586,34 +586,34 @@
 	private void createMockGlobalTypes() {
 		FolderType bft = createNiceMock(FolderType.class);
 		expect(bft.getId()).andReturn(ObjectType.FOLDER_BASETYPE_ID).anyTimes();
-		expect(bft.isBase()).andReturn(true);
+		expect(bft.isBaseType()).andReturn(true);
 		expect(bft.getBaseType()).andReturn(null).anyTimes();
 
 		FolderType ft = createNiceMock(FolderType.class);
 		expect(ft.getId()).andReturn(Fixture.FOLDER_TYPE_ID).anyTimes();
-		expect(ft.isBase()).andReturn(false);
+		expect(ft.isBaseType()).andReturn(false);
 		expect(ft.getBaseType()).andReturn(bft).anyTimes();
 
 		PolicyType bpt = createNiceMock(PolicyType.class);
 		expect(bpt.getId()).andReturn(ObjectType.POLICY_BASETYPE_ID).anyTimes();
-		expect(bpt.isBase()).andReturn(true);
+		expect(bpt.isBaseType()).andReturn(true);
 		expect(bpt.getBaseType()).andReturn(null).anyTimes();
 
 		RelationshipType brt = createNiceMock(RelationshipType.class);
 		expect(brt.getId()).andReturn(ObjectType.RELATIONSHIP_BASETYPE_ID)
 				.anyTimes();
-		expect(brt.isBase()).andReturn(true);
+		expect(brt.isBaseType()).andReturn(true);
 		expect(brt.getBaseType()).andReturn(null).anyTimes();
 
 		DocumentType bdt = createNiceMock(DocumentType.class);
 		expect(bdt.getId()).andReturn(ObjectType.DOCUMENT_BASETYPE_ID)
 				.anyTimes();
-		expect(bdt.isBase()).andReturn(true);
+		expect(bdt.isBaseType()).andReturn(true);
 		expect(bdt.getBaseType()).andReturn(null).anyTimes();
 
 		DocumentType dt = createNiceMock(DocumentType.class);
 		expect(dt.getId()).andReturn(Fixture.DOCUMENT_TYPE_ID).anyTimes();
-		expect(dt.isBase()).andReturn(false);
+		expect(dt.isBaseType()).andReturn(false);
 		expect(dt.getBaseType()).andReturn(bft).anyTimes();
 
 		replay(bft);

Modified: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-api/src/main/java/org/apache/opencmis/commons/provider/AllowableActionsData.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-api/src/main/java/org/apache/opencmis/commons/provider/AllowableActionsData.java?rev=917558&r1=917557&r2=917558&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-api/src/main/java/org/apache/opencmis/commons/provider/AllowableActionsData.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-api/src/main/java/org/apache/opencmis/commons/provider/AllowableActionsData.java
Mon Mar  1 15:41:23 2010
@@ -48,7 +48,6 @@
   String ACTION_CAN_CREATE_DOCUMENT = "canCreateDocument";
   String ACTION_CAN_CREATE_FOLDER = "canCreateFolder";
   String ACTION_CAN_CREATE_RELATIONSHIP = "canCreateRelationship";
-  String ACTION_CAN_CREATE_POLICY = "canCreatePolicy";
   String ACTION_CAN_DELETE_TREE = "canDeleteTree";
   String ACTION_CAN_GET_RENDITIONS = "canGetRenditions";
   String ACTION_CAN_GET_ACL = "canGetACL";

Modified: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/Converter.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/Converter.java?rev=917558&r1=917557&r2=917558&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/Converter.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/Converter.java
Mon Mar  1 15:41:23 2010
@@ -1765,8 +1765,6 @@
         .isCanCreateDocument());
     actionsMap.put(AllowableActionsData.ACTION_CAN_CREATE_FOLDER, allowableActions
         .isCanCreateFolder());
-    actionsMap.put(AllowableActionsData.ACTION_CAN_CREATE_POLICY, allowableActions
-        .isCanCreatePolicy());
     actionsMap.put(AllowableActionsData.ACTION_CAN_CREATE_RELATIONSHIP, allowableActions
         .isCanCreateRelationship());
     actionsMap.put(AllowableActionsData.ACTION_CAN_DELETE_CONTENT_STREAM, allowableActions
@@ -1837,7 +1835,6 @@
       result.setCanCheckOut(actionsMap.get(AllowableActionsData.ACTION_CAN_CHECK_OUT));
       result.setCanCreateDocument(actionsMap.get(AllowableActionsData.ACTION_CAN_CREATE_DOCUMENT));
       result.setCanCreateFolder(actionsMap.get(AllowableActionsData.ACTION_CAN_CREATE_FOLDER));
-      result.setCanCreatePolicy(actionsMap.get(AllowableActionsData.ACTION_CAN_CREATE_POLICY));
       result.setCanCreateRelationship(actionsMap
           .get(AllowableActionsData.ACTION_CAN_CREATE_RELATIONSHIP));
       result.setCanDeleteContentStream(actionsMap

Modified: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd?rev=917558&r1=917557&r2=917558&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
Mon Mar  1 15:41:23 2010
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 	<!--
-		$Revision: 149 $ $Date: 2009-12-22 17:01:48 +0100 (Di, 22 Dez 2009) $
-		$Author: fmueller $ $HeadURL:
+		$Revision: 169 $ $Date: 2010-01-25 19:34:39 +0100 (Mo, 25 Jan 2010) $
+		$Author: albertcbrown $ $HeadURL:
 		http://tools.oasis-open.org/version-control/svn/cmis/trunk/SchemaProject/schema/CMIS-Core.xsd
 		$
 	-->
@@ -556,8 +556,6 @@
 				minOccurs="0" maxOccurs="1" />
 			<xs:element name="canCreateRelationship" type="xs:boolean"
 				minOccurs="0" maxOccurs="1" />
-			<xs:element name="canCreatePolicy" type="xs:boolean"
-				minOccurs="0" maxOccurs="1" />
 			<xs:element name="canDeleteTree" type="xs:boolean"
 				minOccurs="0" maxOccurs="1" />
 

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/FileShareRepository.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/FileShareRepository.java?rev=917558&r1=917557&r2=917558&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/FileShareRepository.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-fileshare/src/main/java/org/apache/opencmis/fileshare/FileShareRepository.java
Mon Mar  1 15:41:23 2010
@@ -1853,7 +1853,6 @@
       aam.put(AllowableActionsData.ACTION_CAN_GET_FOLDER_TREE, true);
       aam.put(AllowableActionsData.ACTION_CAN_CREATE_DOCUMENT, !userReadOnly);
       aam.put(AllowableActionsData.ACTION_CAN_CREATE_FOLDER, !userReadOnly);
-      aam.put(AllowableActionsData.ACTION_CAN_CREATE_POLICY, false);
       aam.put(AllowableActionsData.ACTION_CAN_DELETE_TREE, !userReadOnly && !isReadOnly);
     }
     else {

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/DataObjectCreator.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/DataObjectCreator.java?rev=917558&r1=917557&r2=917558&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/DataObjectCreator.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/main/java/org/apache/opencmis/inmemory/DataObjectCreator.java
Mon Mar  1 15:41:23 2010
@@ -96,7 +96,6 @@
     actions.put(AllowableActionsData.ACTION_CAN_CREATE_DOCUMENT, isFolder);
     actions.put(AllowableActionsData.ACTION_CAN_CREATE_FOLDER, isFolder);
     actions.put(AllowableActionsData.ACTION_CAN_CREATE_RELATIONSHIP, Boolean.FALSE);
-    actions.put(AllowableActionsData.ACTION_CAN_CREATE_POLICY, Boolean.FALSE);
     actions.put(AllowableActionsData.ACTION_CAN_DELETE_TREE, isFolder);
     actions.put(AllowableActionsData.ACTION_CAN_GET_RENDITIONS, Boolean.FALSE);
     actions.put(AllowableActionsData.ACTION_CAN_GET_ACL, Boolean.FALSE);

Modified: incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/ObjectServiceTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/ObjectServiceTest.java?rev=917558&r1=917557&r2=917558&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/ObjectServiceTest.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-server/opencmis-server-inmemory/src/test/java/org/apache/opencmis/inmemory/ObjectServiceTest.java
Mon Mar  1 15:41:23 2010
@@ -684,7 +684,6 @@
     assertNotNull(actions.get(AllowableActionsData.ACTION_CAN_CREATE_DOCUMENT));
     assertNotNull(actions.get(AllowableActionsData.ACTION_CAN_CREATE_FOLDER));
     assertNotNull(actions.get(AllowableActionsData.ACTION_CAN_CREATE_RELATIONSHIP));
-    assertNotNull(actions.get(AllowableActionsData.ACTION_CAN_CREATE_POLICY));
     assertNotNull(actions.get(AllowableActionsData.ACTION_CAN_DELETE_TREE));
     assertNotNull(actions.get(AllowableActionsData.ACTION_CAN_GET_RENDITIONS));
     assertNotNull(actions.get(AllowableActionsData.ACTION_CAN_GET_ACL));

Modified: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AbstractSampleIT.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AbstractSampleIT.java?rev=917558&r1=917557&r2=917558&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AbstractSampleIT.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/src/test/java/org/apache/opencmis/fit/sample/AbstractSampleIT.java
Mon Mar  1 15:41:23 2010
@@ -18,10 +18,16 @@
  */
 package org.apache.opencmis.fit.sample;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.opencmis.client.api.Session;
+import org.apache.opencmis.client.api.objecttype.ObjectType;
 import org.apache.opencmis.client.api.repository.RepositoryInfo;
+import org.apache.opencmis.commons.enums.BaseObjectTypeIds;
 import org.apache.opencmis.fit.SessionFactory;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -62,7 +68,7 @@
   }
 
   /**
-   * Simple sample test.
+   * Simple repository info test.
    */
   @Test
   public void testRepositoryInfo() {
@@ -70,4 +76,33 @@
     assertNotNull(ri);
     assertEquals(SessionFactory.getRepositoryId(), ri.getId());
   }
+
+  /**
+   * Simple types test.
+   */
+  @Test
+  public void testTypes() {
+    String documnetBaseId = "cmis:document";
+    String folderBaseId = "cmis:folder";
+
+    ObjectType documentType = getSession().getTypeDefinition(documnetBaseId);
+    assertNotNull(documentType);
+    assertEquals(documnetBaseId, documentType.getId());
+    assertEquals(BaseObjectTypeIds.CMIS_DOCUMENT, documentType.getBaseTypeId());
+    assertTrue(documentType.isBaseType());
+    assertNull(documentType.getBaseType());
+    assertNull(documentType.getParent());
+    assertNotNull(documentType.getPropertyDefintions());
+    assertFalse(documentType.getPropertyDefintions().isEmpty());
+
+    ObjectType folderType = getSession().getTypeDefinition(folderBaseId);
+    assertNotNull(folderType);
+    assertEquals(folderBaseId, folderType.getId());
+    assertEquals(BaseObjectTypeIds.CMIS_FOLDER, folderType.getBaseTypeId());
+    assertTrue(folderType.isBaseType());
+    assertNull(folderType.getBaseType());
+    assertNull(folderType.getParent());
+    assertNotNull(folderType.getPropertyDefintions());
+    assertFalse(folderType.getPropertyDefintions().isEmpty());
+  }
 }



Mime
View raw message