chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r934728 [1/2] - in /incubator/chemistry/opencmis/trunk: chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/ chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/or...
Date Fri, 16 Apr 2010 09:59:20 GMT
Author: fguillaume
Date: Fri Apr 16 09:59:18 2010
New Revision: 934728

URL: http://svn.apache.org/viewvc?rev=934728&view=rev
Log:
Refactor to get rid of duplicate DTOs (and their interfaces): types

Added:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/ObjectTypeHelper.java   (with props)
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BaseTypeId.java   (contents, props changed)
      - copied, changed from r934710, incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BaseObjectTypeIds.java
Removed:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/AbstractObjectType.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BaseObjectTypeIds.java
Modified:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/objecttype/ObjectType.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/objecttype/RelationshipType.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadOnlyTests.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/misc/ConverterTest.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentCmisObject.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentSessionImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/DocumentTypeImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/FolderTypeImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/PolicyTypeImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/RelationshipTypeImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/ObjectData.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RelationshipTypeDefinition.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RepositoryInfo.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/TypeDefinition.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectDataImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RelationshipTypeDefinitionImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/ConverterTest.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-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/RepositoryService.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/DocumentInfo.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FolderInfo.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/TypeManager.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeManager.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeValidator.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AtomLinkInfoProvider.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/ServiceFactory.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ObjectStoreImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryDocumentTypeDefinition.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryFolderTypeDefinition.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryPolicyTypeDefinition.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryRelationshipTypeDefinition.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/MultiFilingTest.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/RepositoryServiceTest.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/ObjectInfo.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-spi/src/main/java/org/apache/chemistry/opencmis/server/spi/ObjectInfoImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/ObjectInfoHelper.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/AbstractSampleIT.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-util/src/main/java/org/apache/chemistry/opencmis/util/repository/ObjGenApp.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-util/src/main/java/org/apache/chemistry/opencmis/util/repository/ObjectGenerator.java

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/CmisObject.java Fri Apr 16 09:59:18 2010
@@ -28,7 +28,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.Acl;
 import org.apache.chemistry.opencmis.commons.api.AllowableActions;
 import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.commons.enums.RelationshipDirection;
 
 /**
@@ -90,7 +90,7 @@ public interface CmisObject extends Obje
    *
    * @return
    */
-  BaseObjectTypeIds getBaseTypeId();
+  BaseTypeId getBaseTypeId();
 
   /**
    * Get the change token for this object (maintained by the repository). {@code Property<String>

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/objecttype/ObjectType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/objecttype/ObjectType.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/objecttype/ObjectType.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/objecttype/ObjectType.java Fri Apr 16 09:59:18 2010
@@ -24,66 +24,32 @@ import java.util.Map;
 import org.apache.chemistry.opencmis.client.api.util.Container;
 import org.apache.chemistry.opencmis.client.api.util.PagingList;
 import org.apache.chemistry.opencmis.commons.api.PropertyDefinition;
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.api.TypeDefinition;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
 
 /**
  * Object Type.
- * 
+ *
  * See CMIS Domain Model - section 2.1.3.
  */
-public interface ObjectType {
+public interface ObjectType extends TypeDefinition {
 
-  String DOCUMENT_BASETYPE_ID = BaseObjectTypeIds.CMIS_DOCUMENT.value();
-  String FOLDER_BASETYPE_ID = BaseObjectTypeIds.CMIS_FOLDER.value();
-  String RELATIONSHIP_BASETYPE_ID = BaseObjectTypeIds.CMIS_RELATIONSHIP.value();
-  String POLICY_BASETYPE_ID = BaseObjectTypeIds.CMIS_POLICY.value();
-
-  /**
-   * Get this type's id.
-   * 
-   * @return the id of this type.
-   */
-  String getId();
-
-  /**
-   * Get the type's local name as used in the repository.
-   * 
-   * @return the local name of the type.
-   */
-  String getLocalName();
-
-  /**
-   * Get the type's namespace as used in the repository.
-   * 
-   * @return the namespace for this type.
-   */
-  String getLocalNamespace();
-
-  /**
-   * Get the type's query name, used for query and filter operations.
-   * 
-   * @return the type's query name.
-   */
-  String getQueryName();
-
-  /**
-   * Get the type's display name, used to be presented to the user.
-   * 
-   * @return the type's display name.
-   */
-  String getDisplayName();
+  String DOCUMENT_BASETYPE_ID = BaseTypeId.CMIS_DOCUMENT.value();
+  String FOLDER_BASETYPE_ID = BaseTypeId.CMIS_FOLDER.value();
+  String RELATIONSHIP_BASETYPE_ID = BaseTypeId.CMIS_RELATIONSHIP.value();
+  String POLICY_BASETYPE_ID = BaseTypeId.CMIS_POLICY.value();
 
   /**
    * Indicates if this is base object type (i.e. if {@code getId()} returns ...{@code _BASETYPE_ID}.
-   * 
+   *
    * @return {@code true} if this type is a base type, {@code false} if this type is a derived type.
    */
   boolean isBaseType();
 
   /**
    * Get the type's base type, if the type is a derived (non-base) type.
-   * 
+   *
    * @return the base type this type is derived from, or {@code null} if it is a base type ({@code
    *         isBase()==true}).
    * @throws CmisRuntimeException
@@ -91,88 +57,18 @@ public interface ObjectType {
   ObjectType getBaseType(); // null if isBase == true
 
   /**
-   * Get the type's base type id.
-   * 
-   * @return
-   */
-  BaseObjectTypeIds getBaseTypeId();
-
-  /**
    * Get the type's parent type, if the type is a derived (non-base) type.
-   * 
+   *
    * @return the parent type from which this type is derived, or {@code null} if it is a base type (
    *         {@code isBase()==true}).
    * @throws CmisRuntimeException
    */
-  ObjectType getParent();
-
-  /**
-   * Additional description for this type.
-   * 
-   * @return the description, intended for the user. Might be {@code null}.
-   */
-  String getDescription();
-
-  /**
-   * Indicates that objects of this type can be created.
-   * 
-   * @return {@code true} if objects for this type can be created.
-   */
-  Boolean isCreatable();
-
-  /**
-   * Indicates that objects of this type can be filed/unfiled.
-   * 
-   * @return {@code true} if objects for this type can be used for filing operations.
-   */
-  Boolean isFileable();
-
-  /**
-   * Indicates that objects of this type can be queried.
-   * 
-   * @return {@code true} if objects for this type can be used for query operations.
-   */
-  Boolean isQueryable();
-
-  /**
-   * Indicates that objects of this type can be controlled by policies.
-   * 
-   * @return {@code true} if objects for this type can be used for policy operations.
-   */
-  Boolean isControllablePolicy();
-
-  /**
-   * Indicates that objects of this type can be controlled by ACLs.
-   * 
-   * @return {@code true} if objects for this type can be used for ACL operations.
-   */
-  Boolean isControllableAcl();
-
-  /**
-   * Indicates that objects of this type are indexed in the full text index.
-   * 
-   * @return {@code true} if objects for this type can be searched via full text searches.
-   */
-  Boolean isFulltextIndexed();
-
-  /**
-   * Indicates that objects of this type can be queried via its super type.
-   * 
-   * @return {@code true} if objects for this type are included in queries for their super type.
-   */
-  Boolean isIncludedInSupertypeQuery();
-
-  /**
-   * Get the {@code Map} of {@code PropertyDefinition}s, indexed by the property definition's ids.
-   * 
-   * @return the {@code Map} of property definitions. @
-   */
-  Map<String, PropertyDefinition<?>> getPropertyDefintions();
+  ObjectType getParentType();
 
   /**
    * Get the list of types directly derived from this type (which will return this type on {@code
    * getParent()}).
-   * 
+   *
    * @param itemsPerPage
    *          types per page
    * @return a {@code List} of types which are directly derived from this type. @
@@ -181,7 +77,7 @@ public interface ObjectType {
 
   /**
    * Get the list of all types somehow derived from this type.
-   * 
+   *
    * @param depth
    *          the depth to which the derived types should be resolved.
    * @return a {@code Tree} of types which are derived from this type (direct and via their

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/objecttype/RelationshipType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/objecttype/RelationshipType.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/objecttype/RelationshipType.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/objecttype/RelationshipType.java Fri Apr 16 09:59:18 2010
@@ -21,21 +21,21 @@ import java.util.List;
 
 /**
  * Relationship Object Type.
- * 
+ *
  * See CMIS Domain Model - section 2.1.6.1.
  */
 public interface RelationshipType extends ObjectType {
 
   /**
    * Get the list of object types, allowed as source for relationships of this type.
-   * 
+   *
    * @return the allowed source types for this relationship type.
    */
   List<ObjectType> getAllowedSourceTypes();
 
   /**
    * Get the list of object types, allowed as target for relationships of this type.
-   * 
+   *
    * @return the allowed target types for this relationship type.
    */
   List<ObjectType> getAllowedTargetTypes();

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java Fri Apr 16 09:59:18 2010
@@ -898,8 +898,8 @@ public abstract class AbstractCmisTestCa
     assertEquals("TypeDefinition display name:", expected.getDisplayName(), actual.getDisplayName());
     assertEquals("TypeDefinition description:", expected.getDescription(), actual.getDescription());
     assertEquals("TypeDefinition query name:", expected.getQueryName(), actual.getQueryName());
-    assertEquals("TypeDefinition parent id:", expected.getParentId(), actual.getParentId());
-    assertEquals("TypeDefinition base id:", expected.getBaseId(), actual.getBaseId());
+    assertEquals("TypeDefinition parent id:", expected.getParentTypeId(), actual.getParentTypeId());
+    assertEquals("TypeDefinition base id:", expected.getBaseTypeId(), actual.getBaseTypeId());
 
     if (!checkPropertyDefintions) {
       return;

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadOnlyTests.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadOnlyTests.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadOnlyTests.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadOnlyTests.java Fri Apr 16 09:59:18 2010
@@ -42,7 +42,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.TypeDefinitionContainer;
 import org.apache.chemistry.opencmis.commons.api.TypeDefinitionList;
 import org.apache.chemistry.opencmis.commons.enums.AllowableActionsEnum;
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
 import org.apache.chemistry.opencmis.commons.enums.RelationshipDirection;
 
@@ -94,18 +94,18 @@ public abstract class AbstractSimpleRead
     TypeDefinition docType = getTypeDefinition("cmis:document");
     assertTrue(docType instanceof DocumentTypeDefinition);
     assertEquals("cmis:document", docType.getId());
-    assertEquals(BaseObjectTypeIds.CMIS_DOCUMENT, docType.getBaseId());
+    assertEquals(BaseTypeId.CMIS_DOCUMENT, docType.getBaseTypeId());
 
     TypeDefinition folderType = getTypeDefinition("cmis:folder");
     assertTrue(folderType instanceof FolderTypeDefinition);
     assertEquals("cmis:folder", folderType.getId());
-    assertEquals(BaseObjectTypeIds.CMIS_FOLDER, folderType.getBaseId());
+    assertEquals(BaseTypeId.CMIS_FOLDER, folderType.getBaseTypeId());
 
     try {
       TypeDefinition relationshipType = getTypeDefinition("cmis:relationship");
       assertTrue(relationshipType instanceof RelationshipTypeDefinition);
       assertEquals("cmis:relationship", relationshipType.getId());
-      assertEquals(BaseObjectTypeIds.CMIS_RELATIONSHIP, relationshipType.getBaseId());
+      assertEquals(BaseTypeId.CMIS_RELATIONSHIP, relationshipType.getBaseTypeId());
     }
     catch (Exception e) {
       warning("Relationships type: " + e);
@@ -115,7 +115,7 @@ public abstract class AbstractSimpleRead
       TypeDefinition policyType = getTypeDefinition("cmis:policy");
       assertTrue(policyType instanceof PolicyTypeDefinition);
       assertEquals("cmis:policy", policyType.getId());
-      assertEquals(BaseObjectTypeIds.CMIS_POLICY, policyType.getBaseId());
+      assertEquals(BaseTypeId.CMIS_POLICY, policyType.getBaseTypeId());
     }
     catch (Exception e) {
       warning("Policy type: " + e);
@@ -247,13 +247,13 @@ public abstract class AbstractSimpleRead
 
       checkObject(object.getObject().getId());
 
-      if (object.getObject().getBaseTypeId() == BaseObjectTypeIds.CMIS_FOLDER) {
+      if (object.getObject().getBaseTypeId() == BaseTypeId.CMIS_FOLDER) {
         ObjectInFolderList children2 = getBinding().getNavigationService().getChildren(repId,
             object.getObject().getId(), null, null, Boolean.TRUE, IncludeRelationships.BOTH, null,
             Boolean.TRUE, null, null, null);
         assertNotNull(children2);
       }
-      else if (object.getObject().getBaseTypeId() == BaseObjectTypeIds.CMIS_DOCUMENT) {
+      else if (object.getObject().getBaseTypeId() == BaseTypeId.CMIS_DOCUMENT) {
         checkObjectVersions(object.getObject().getId());
       }
     }
@@ -306,7 +306,7 @@ public abstract class AbstractSimpleRead
       assertNotNull(object.getObject().getId());
       assertNotNull(object.getObject().getBaseTypeId());
 
-      if (object.getObject().getBaseTypeId() == BaseObjectTypeIds.CMIS_DOCUMENT) {
+      if (object.getObject().getBaseTypeId() == BaseTypeId.CMIS_DOCUMENT) {
         ContentStream contentStream = getContent(object.getObject().getId(), null);
         readContent(contentStream);
 
@@ -367,7 +367,7 @@ public abstract class AbstractSimpleRead
       for (ObjectData object : co.getObjects()) {
         assertNotNull(object);
         assertNotNull(object.getId());
-        assertEquals(BaseObjectTypeIds.CMIS_DOCUMENT, object.getBaseTypeId());
+        assertEquals(BaseTypeId.CMIS_DOCUMENT, object.getBaseTypeId());
       }
     }
   }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/misc/ConverterTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/misc/ConverterTest.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/misc/ConverterTest.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/misc/ConverterTest.java Fri Apr 16 09:59:18 2010
@@ -37,7 +37,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.RepositoryInfo;
 import org.apache.chemistry.opencmis.commons.api.TypeDefinition;
 import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.commons.enums.CapabilityAcl;
 import org.apache.chemistry.opencmis.commons.enums.CapabilityChanges;
 import org.apache.chemistry.opencmis.commons.enums.CapabilityContentStreamUpdates;
@@ -72,7 +72,7 @@ public class ConverterTest extends TestC
     // values
     obj1 = new RepositoryInfoImpl();
     obj1.setChangesIncomplete(Boolean.TRUE);
-    obj1.setChangesOnType(Collections.singletonList(BaseObjectTypeIds.CMIS_DOCUMENT));
+    obj1.setChangesOnType(Collections.singletonList(BaseTypeId.CMIS_DOCUMENT));
     obj1.setCmisVersionSupported("1.0");
     obj1.setLatestChangeLogToken("changeLogToken");
     obj1.setPrincipalAnonymous("principalAnonymous");
@@ -141,7 +141,7 @@ public class ConverterTest extends TestC
 
     // simple values
     obj1 = new DocumentTypeDefinitionImpl();
-    obj1.setBaseId(BaseObjectTypeIds.CMIS_DOCUMENT);
+    obj1.setBaseTypeId(BaseTypeId.CMIS_DOCUMENT);
     obj1.setContentStreamAllowed(ContentStreamAllowed.ALLOWED);
     obj1.setDescription("description");
     obj1.setDisplayName("displayName");
@@ -155,7 +155,7 @@ public class ConverterTest extends TestC
     obj1.setIsVersionable(Boolean.TRUE);
     obj1.setLocalName("localName");
     obj1.setLocalNamespace("localNamespace");
-    obj1.setParentId("parentId");
+    obj1.setParentTypeId("parentId");
     obj1.setQueryName("queryName");
 
     obj2 = Converter.convert(Converter.convert(obj1));

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentCmisObject.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/AbstractPersistentCmisObject.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentCmisObject.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractPersistentCmisObject.java Fri Apr 16 09:59:18 2010
@@ -39,7 +39,6 @@ import org.apache.chemistry.opencmis.cli
 import org.apache.chemistry.opencmis.client.api.objecttype.ObjectType;
 import org.apache.chemistry.opencmis.client.api.repository.ObjectFactory;
 import org.apache.chemistry.opencmis.client.api.util.PagingList;
-import org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomAllowableActions;
 import org.apache.chemistry.opencmis.client.runtime.util.AbstractPagingList;
 import org.apache.chemistry.opencmis.commons.PropertyIds;
 import org.apache.chemistry.opencmis.commons.api.Ace;
@@ -53,7 +52,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.RelationshipService;
 import org.apache.chemistry.opencmis.commons.api.RenditionData;
 import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.commons.enums.Cardinality;
 import org.apache.chemistry.opencmis.commons.enums.RelationshipDirection;
 import org.apache.chemistry.opencmis.commons.enums.Updatability;
@@ -90,7 +89,7 @@ public abstract class AbstractPersistent
       throw new IllegalArgumentException("Object type must be set!");
     }
 
-    if (objectType.getPropertyDefintions().size() < 9) {
+    if (objectType.getPropertyDefinitions().size() < 9) {
       // there must be at least the 9 standard properties that all objects have
       throw new IllegalArgumentException("Object type must have property defintions!");
     }
@@ -336,7 +335,7 @@ public abstract class AbstractPersistent
    * @see org.apache.opencmis.client.api.CmisObject#getBaseType()
    */
   public ObjectType getBaseType() {
-    BaseObjectTypeIds baseTypeId = getBaseTypeId();
+    BaseTypeId baseTypeId = getBaseTypeId();
     if (baseTypeId == null) {
       return null;
     }
@@ -349,13 +348,13 @@ public abstract class AbstractPersistent
    *
    * @see org.apache.opencmis.client.api.CmisObject#getBaseTypeId()
    */
-  public BaseObjectTypeIds getBaseTypeId() {
+  public BaseTypeId getBaseTypeId() {
     String baseType = getPropertyValue(PropertyIds.BASE_TYPE_ID);
     if (baseType == null) {
       return null;
     }
 
-    return BaseObjectTypeIds.fromValue(baseType);
+    return BaseTypeId.fromValue(baseType);
   }
 
   /*
@@ -876,7 +875,7 @@ public abstract class AbstractPersistent
    * Checks if a value matches a property definition.
    */
   private PropertyDefinition<?> checkProperty(String id, Object value) {
-    PropertyDefinition<?> propertyDefinition = getObjectType().getPropertyDefintions().get(id);
+    PropertyDefinition<?> propertyDefinition = getObjectType().getPropertyDefinitions().get(id);
     if (propertyDefinition == null) {
       throw new IllegalArgumentException("Unknown property '" + id + "'!");
     }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.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/PersistentFolderImpl.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentFolderImpl.java Fri Apr 16 09:59:18 2010
@@ -51,7 +51,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.ObjectList;
 import org.apache.chemistry.opencmis.commons.api.PropertyData;
 import org.apache.chemistry.opencmis.commons.api.PropertyStringData;
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
 import org.apache.chemistry.opencmis.commons.enums.UnfileObjects;
 import org.apache.chemistry.opencmis.commons.enums.Updatability;
@@ -135,7 +135,7 @@ public class PersistentFolderImpl extend
       type = sourceObj.getType();
     }
 
-    if (type.getBaseTypeId() != BaseObjectTypeIds.CMIS_DOCUMENT) {
+    if (type.getBaseTypeId() != BaseTypeId.CMIS_DOCUMENT) {
       throw new IllegalArgumentException("Source object must be a document!");
     }
 

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentSessionImpl.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/PersistentSessionImpl.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentSessionImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/PersistentSessionImpl.java Fri Apr 16 09:59:18 2010
@@ -60,7 +60,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.TypeDefinition;
 import org.apache.chemistry.opencmis.commons.api.TypeDefinitionContainer;
 import org.apache.chemistry.opencmis.commons.api.TypeDefinitionList;
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
 import org.apache.chemistry.opencmis.commons.enums.Updatability;
 import org.apache.chemistry.opencmis.commons.enums.VersioningState;
@@ -757,7 +757,7 @@ public class PersistentSessionImpl imple
       type = sourceObj.getType();
     }
 
-    if (type.getBaseTypeId() != BaseObjectTypeIds.CMIS_DOCUMENT) {
+    if (type.getBaseTypeId() != BaseTypeId.CMIS_DOCUMENT) {
       throw new IllegalArgumentException("Source object must be a document!");
     }
 

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/DocumentTypeImpl.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/objecttype/DocumentTypeImpl.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/DocumentTypeImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/DocumentTypeImpl.java Fri Apr 16 09:59:18 2010
@@ -18,39 +18,50 @@
  */
 package org.apache.chemistry.opencmis.client.runtime.objecttype;
 
+import java.util.List;
+
 import org.apache.chemistry.opencmis.client.api.Session;
 import org.apache.chemistry.opencmis.client.api.objecttype.DocumentType;
+import org.apache.chemistry.opencmis.client.api.objecttype.ObjectType;
+import org.apache.chemistry.opencmis.client.api.util.Container;
+import org.apache.chemistry.opencmis.client.api.util.PagingList;
 import org.apache.chemistry.opencmis.commons.api.DocumentTypeDefinition;
-import org.apache.chemistry.opencmis.commons.api.TypeDefinition;
-import org.apache.chemistry.opencmis.commons.enums.ContentStreamAllowed;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.DocumentTypeDefinitionImpl;
 
 /**
  * Document type.
  */
-public class DocumentTypeImpl extends AbstractObjectType implements DocumentType {
+public class DocumentTypeImpl extends DocumentTypeDefinitionImpl implements
+        DocumentType {
+
+    private static final long serialVersionUID = 1L;
+
+    private ObjectTypeHelper helper;
+
+    public DocumentTypeImpl(Session session,
+            DocumentTypeDefinition typeDefinition) {
+        initialize(typeDefinition);
+        helper = new ObjectTypeHelper(session, this);
+    }
+
+    public ObjectType getBaseType() {
+        return helper.getBaseType();
+    }
+
+    public PagingList<ObjectType> getChildren(int itemsPerPage) {
+        return helper.getChildren(itemsPerPage);
+    }
+
+    public List<Container<ObjectType>> getDescendants(int depth) {
+        return helper.getDescendants(depth);
+    }
+
+    public ObjectType getParentType() {
+        return helper.getParentType();
+    }
+
+    public boolean isBaseType() {
+        return helper.isBaseType();
+    }
 
-  /**
-   * Constructor.
-   */
-  public DocumentTypeImpl(Session session, TypeDefinition typeDefinition) {
-    initialize(session, typeDefinition);
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.api.objecttype.DocumentType#getContentStreamAllowed()
-   */
-  public ContentStreamAllowed getContentStreamAllowed() {
-    return ((DocumentTypeDefinition) getTypeDefinition()).getContentStreamAllowed();
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.api.objecttype.DocumentType#isVersionable()
-   */
-  public Boolean isVersionable() {
-    return ((DocumentTypeDefinition) getTypeDefinition()).isVersionable();
-  }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/FolderTypeImpl.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/objecttype/FolderTypeImpl.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/FolderTypeImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/FolderTypeImpl.java Fri Apr 16 09:59:18 2010
@@ -18,19 +18,50 @@
  */
 package org.apache.chemistry.opencmis.client.runtime.objecttype;
 
+import java.util.List;
+
 import org.apache.chemistry.opencmis.client.api.Session;
 import org.apache.chemistry.opencmis.client.api.objecttype.FolderType;
-import org.apache.chemistry.opencmis.commons.api.TypeDefinition;
+import org.apache.chemistry.opencmis.client.api.objecttype.ObjectType;
+import org.apache.chemistry.opencmis.client.api.util.Container;
+import org.apache.chemistry.opencmis.client.api.util.PagingList;
+import org.apache.chemistry.opencmis.commons.api.FolderTypeDefinition;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.FolderTypeDefinitionImpl;
 
 /**
  * Folder type.
  */
-public class FolderTypeImpl extends AbstractObjectType implements FolderType {
+public class FolderTypeImpl extends FolderTypeDefinitionImpl implements
+        FolderType {
+
+    private static final long serialVersionUID = 1L;
+
+    private ObjectTypeHelper helper;
+
+    public FolderTypeImpl(Session session,
+            FolderTypeDefinition typeDefinition) {
+        initialize(typeDefinition);
+        helper = new ObjectTypeHelper(session, this);
+    }
+
+    public ObjectType getBaseType() {
+        return helper.getBaseType();
+    }
+
+    public PagingList<ObjectType> getChildren(int itemsPerPage) {
+        return helper.getChildren(itemsPerPage);
+    }
+
+    public List<Container<ObjectType>> getDescendants(int depth) {
+        return helper.getDescendants(depth);
+    }
+
+    public ObjectType getParentType() {
+        return helper.getParentType();
+    }
+
+    public boolean isBaseType() {
+        return helper.isBaseType();
+    }
 
-  /**
-   * Constructor.
-   */
-  public FolderTypeImpl(Session session, TypeDefinition typeDefinition) {
-    initialize(session, typeDefinition);
-  }
 }

Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/ObjectTypeHelper.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/objecttype/ObjectTypeHelper.java?rev=934728&view=auto
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/ObjectTypeHelper.java (added)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/ObjectTypeHelper.java Fri Apr 16 09:59:18 2010
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.runtime.objecttype;
+
+import java.util.List;
+
+import org.apache.chemistry.opencmis.client.api.Session;
+import org.apache.chemistry.opencmis.client.api.objecttype.ObjectType;
+import org.apache.chemistry.opencmis.client.api.util.Container;
+import org.apache.chemistry.opencmis.client.api.util.PagingList;
+
+/**
+ * Helper for object types, containing session-related info.
+ * <p>
+ * This is needed because Java doesn't support multiple inheritance.
+ */
+public class ObjectTypeHelper {
+
+    private Session session;
+    private ObjectType objectType;
+    private ObjectType baseType;
+    private ObjectType parentType;
+
+    public ObjectTypeHelper(Session session, ObjectType objectType) {
+        this.session = session;
+        this.objectType = objectType;
+    }
+
+    public Session getSession() {
+        return session;
+    }
+
+    public boolean isBaseType() {
+        return objectType.getParentTypeId() == null;
+    }
+
+    public ObjectType getBaseType() {
+        if (isBaseType()) {
+            return null;
+        }
+        if (baseType != null) {
+            return baseType;
+        }
+        if (objectType.getBaseTypeId() == null) {
+            return null;
+        }
+        baseType = session
+                .getTypeDefinition(objectType.getBaseTypeId().value());
+        return baseType;
+    }
+
+    public ObjectType getParentType() {
+        if (parentType != null) {
+            return parentType;
+        }
+        if (objectType.getParentTypeId() == null) {
+            return null;
+        }
+        parentType = session.getTypeDefinition(objectType.getParentTypeId());
+        return parentType;
+    }
+
+    public PagingList<ObjectType> getChildren(int itemsPerPage) {
+        return session.getTypeChildren(objectType.getId(), true, itemsPerPage);
+    }
+
+    public List<Container<ObjectType>> getDescendants(int depth) {
+        return session.getTypeDescendants(objectType.getId(), depth, true);
+    }
+}

Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/ObjectTypeHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/ObjectTypeHelper.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/ObjectTypeHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/PolicyTypeImpl.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/objecttype/PolicyTypeImpl.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/PolicyTypeImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/PolicyTypeImpl.java Fri Apr 16 09:59:18 2010
@@ -18,19 +18,50 @@
  */
 package org.apache.chemistry.opencmis.client.runtime.objecttype;
 
+import java.util.List;
+
 import org.apache.chemistry.opencmis.client.api.Session;
 import org.apache.chemistry.opencmis.client.api.objecttype.PolicyType;
-import org.apache.chemistry.opencmis.commons.api.TypeDefinition;
+import org.apache.chemistry.opencmis.client.api.objecttype.ObjectType;
+import org.apache.chemistry.opencmis.client.api.util.Container;
+import org.apache.chemistry.opencmis.client.api.util.PagingList;
+import org.apache.chemistry.opencmis.commons.api.PolicyTypeDefinition;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.PolicyTypeDefinitionImpl;
 
 /**
  * Policy type.
  */
-public class PolicyTypeImpl extends AbstractObjectType implements PolicyType {
+public class PolicyTypeImpl extends PolicyTypeDefinitionImpl implements
+        PolicyType {
+
+    private static final long serialVersionUID = 1L;
+
+    private ObjectTypeHelper helper;
+
+    public PolicyTypeImpl(Session session,
+            PolicyTypeDefinition typeDefinition) {
+        initialize(typeDefinition);
+        helper = new ObjectTypeHelper(session, this);
+    }
+
+    public ObjectType getBaseType() {
+        return helper.getBaseType();
+    }
+
+    public PagingList<ObjectType> getChildren(int itemsPerPage) {
+        return helper.getChildren(itemsPerPage);
+    }
+
+    public List<Container<ObjectType>> getDescendants(int depth) {
+        return helper.getDescendants(depth);
+    }
+
+    public ObjectType getParentType() {
+        return helper.getParentType();
+    }
+
+    public boolean isBaseType() {
+        return helper.isBaseType();
+    }
 
-  /**
-   * Constructor.
-   */
-  public PolicyTypeImpl(Session session, TypeDefinition typeDefinition) {
-    initialize(session, typeDefinition);
-  }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/RelationshipTypeImpl.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/objecttype/RelationshipTypeImpl.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/RelationshipTypeImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/objecttype/RelationshipTypeImpl.java Fri Apr 16 09:59:18 2010
@@ -22,68 +22,79 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.chemistry.opencmis.client.api.Session;
-import org.apache.chemistry.opencmis.client.api.objecttype.ObjectType;
 import org.apache.chemistry.opencmis.client.api.objecttype.RelationshipType;
+import org.apache.chemistry.opencmis.client.api.objecttype.ObjectType;
+import org.apache.chemistry.opencmis.client.api.util.Container;
+import org.apache.chemistry.opencmis.client.api.util.PagingList;
 import org.apache.chemistry.opencmis.commons.api.RelationshipTypeDefinition;
-import org.apache.chemistry.opencmis.commons.api.TypeDefinition;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.RelationshipTypeDefinitionImpl;
 
 /**
  * Relationship type.
  */
-public class RelationshipTypeImpl extends AbstractObjectType implements RelationshipType {
+public class RelationshipTypeImpl extends RelationshipTypeDefinitionImpl
+        implements RelationshipType {
 
-  private List<ObjectType> allowedSourceTypes;
-  private List<ObjectType> allowedTargetTypes;
+    private static final long serialVersionUID = 1L;
 
-  /**
-   * Constructor.
-   */
-  public RelationshipTypeImpl(Session session, TypeDefinition typeDefinition) {
-    initialize(session, typeDefinition);
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.api.objecttype.RelationshipType#getAllowedSourceTypes()
-   */
-  public List<ObjectType> getAllowedSourceTypes() {
-    if (allowedSourceTypes == null) {
-      List<ObjectType> types = new ArrayList<ObjectType>();
-
-      List<String> ids = ((RelationshipTypeDefinition) getTypeDefinition()).getAllowedSourceTypes();
-      if (ids != null) {
-        for (String id : ids) {
-          types.add(getSession().getTypeDefinition(id));
-        }
-      }
+    private ObjectTypeHelper helper;
+    private List<ObjectType> allowedSourceTypes;
+    private List<ObjectType> allowedTargetTypes;
+
+    public RelationshipTypeImpl(Session session,
+            RelationshipTypeDefinition typeDefinition) {
+        initialize(typeDefinition);
+        helper = new ObjectTypeHelper(session, this);
+    }
 
-      allowedSourceTypes = types;
+    public ObjectType getBaseType() {
+        return helper.getBaseType();
     }
 
-    return allowedSourceTypes;
-  }
+    public PagingList<ObjectType> getChildren(int itemsPerPage) {
+        return helper.getChildren(itemsPerPage);
+    }
 
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.api.objecttype.RelationshipType#getAllowedTargetTypes()
-   */
-  public List<ObjectType> getAllowedTargetTypes() {
-    if (allowedTargetTypes == null) {
-      List<ObjectType> types = new ArrayList<ObjectType>();
-
-      List<String> ids = ((RelationshipTypeDefinition) getTypeDefinition()).getAllowedTargetTypes();
-      if (ids != null) {
-        for (String id : ids) {
-          types.add(getSession().getTypeDefinition(id));
-        }
-      }
+    public List<Container<ObjectType>> getDescendants(int depth) {
+        return helper.getDescendants(depth);
+    }
 
-      allowedTargetTypes = types;
+    public ObjectType getParentType() {
+        return helper.getParentType();
     }
 
-    return allowedTargetTypes;
-  }
+    public boolean isBaseType() {
+        return helper.isBaseType();
+    }
+
+    public List<ObjectType> getAllowedSourceTypes() {
+        if (allowedSourceTypes == null) {
+            List<String> ids = getAllowedSourceTypeIds();
+            List<ObjectType> types = new ArrayList<ObjectType>(ids == null ? 0
+                    : ids.size());
+            if (ids != null) {
+                for (String id : ids) {
+                    types.add(helper.getSession().getTypeDefinition(id));
+                }
+            }
+            allowedSourceTypes = types;
+        }
+        return allowedSourceTypes;
+    }
+
+    public List<ObjectType> getAllowedTargetTypes() {
+        if (allowedTargetTypes == null) {
+            List<String> ids = getAllowedTargetTypeIds();
+            List<ObjectType> types = new ArrayList<ObjectType>(ids == null ? 0
+                    : ids.size());
+            if (ids != null) {
+                for (String id : ids) {
+                    types.add(helper.getSession().getTypeDefinition(id));
+                }
+            }
+            allowedTargetTypes = types;
+        }
+        return allowedTargetTypes;
+    }
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.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/repository/PersistentObjectFactoryImpl.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java Fri Apr 16 09:59:18 2010
@@ -227,16 +227,16 @@ public class PersistentObjectFactoryImpl
    */
   public ObjectType convertTypeDefinition(TypeDefinition typeDefinition) {
     if (typeDefinition instanceof DocumentTypeDefinition) {
-      return new DocumentTypeImpl(this.session, typeDefinition);
+      return new DocumentTypeImpl(this.session, (DocumentTypeDefinition) typeDefinition);
     }
     else if (typeDefinition instanceof FolderTypeDefinition) {
-      return new FolderTypeImpl(this.session, typeDefinition);
+      return new FolderTypeImpl(this.session, (FolderTypeDefinition) typeDefinition);
     }
     else if (typeDefinition instanceof RelationshipTypeDefinition) {
-      return new RelationshipTypeImpl(this.session, typeDefinition);
+      return new RelationshipTypeImpl(this.session, (RelationshipTypeDefinition) typeDefinition);
     }
     else if (typeDefinition instanceof PolicyTypeDefinition) {
-      return new PolicyTypeImpl(this.session, typeDefinition);
+      return new PolicyTypeImpl(this.session, (PolicyTypeDefinition) typeDefinition);
     }
     else {
       throw new CmisRuntimeException("Unknown base type!");
@@ -303,7 +303,7 @@ public class PersistentObjectFactoryImpl
       throw new IllegalArgumentException("Object type must set!");
     }
 
-    if (objectType.getPropertyDefintions() == null) {
+    if (objectType.getPropertyDefinitions() == null) {
       throw new IllegalArgumentException("Object type has no property defintions!");
     }
 
@@ -315,7 +315,7 @@ public class PersistentObjectFactoryImpl
     Map<String, Property<?>> result = new LinkedHashMap<String, Property<?>>();
     for (Map.Entry<String, PropertyData<?>> property : properties.getProperties().entrySet()) {
       // find property definition
-      PropertyDefinition<?> definition = objectType.getPropertyDefintions().get(property.getKey());
+      PropertyDefinition<?> definition = objectType.getPropertyDefinitions().get(property.getKey());
       if (definition == null) {
         // property without definition
         throw new CmisRuntimeException("Property '" + property.getKey() + "' doesn't exist!");
@@ -410,7 +410,7 @@ public class PersistentObjectFactoryImpl
       }
 
       // get the property definition
-      PropertyDefinition<?> definition = type.getPropertyDefintions().get(id);
+      PropertyDefinition<?> definition = type.getPropertyDefinitions().get(id);
       if (definition == null) {
         throw new IllegalArgumentException("Property +'" + id + "' is not valid for this type!");
       }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/ObjectData.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/ObjectData.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/ObjectData.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/ObjectData.java Fri Apr 16 09:59:18 2010
@@ -20,7 +20,7 @@ package org.apache.chemistry.opencmis.co
 
 import java.util.List;
 
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 
 /**
  * Base object for CMIS documents, folders, relationships and policies.
@@ -42,7 +42,7 @@ public interface ObjectData extends Exte
    * 
    * @return the base object type or <code>null</code> if the base object type is unknown
    */
-  BaseObjectTypeIds getBaseTypeId();
+  BaseTypeId getBaseTypeId();
 
   /**
    * Returns the object properties. The properties can be incomplete if a property filter was used.

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RelationshipTypeDefinition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RelationshipTypeDefinition.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RelationshipTypeDefinition.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RelationshipTypeDefinition.java Fri Apr 16 09:59:18 2010
@@ -22,7 +22,7 @@ import java.util.List;
 
 public interface RelationshipTypeDefinition extends TypeDefinition {
 
-  List<String> getAllowedSourceTypes();
+  List<String> getAllowedSourceTypeIds();
 
-  List<String> getAllowedTargetTypes();
+  List<String> getAllowedTargetTypeIds();
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RepositoryInfo.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RepositoryInfo.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RepositoryInfo.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/RepositoryInfo.java Fri Apr 16 09:59:18 2010
@@ -21,7 +21,7 @@ package org.apache.chemistry.opencmis.co
 import java.io.Serializable;
 import java.util.List;
 
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 
 public interface RepositoryInfo extends Serializable, ExtensionsData {
 
@@ -51,7 +51,7 @@ public interface RepositoryInfo extends 
 
   Boolean getChangesIncomplete();
 
-  List<BaseObjectTypeIds> getChangesOnType();
+  List<BaseTypeId> getChangesOnType();
 
   String getPrincipalIdAnonymous();
 

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/TypeDefinition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/TypeDefinition.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/TypeDefinition.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/api/TypeDefinition.java Fri Apr 16 09:59:18 2010
@@ -21,7 +21,7 @@ package org.apache.chemistry.opencmis.co
 import java.io.Serializable;
 import java.util.Map;
 
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 
 /**
  * Base type definition interface.
@@ -78,14 +78,14 @@ public interface TypeDefinition extends 
    * 
    * @return the base object type id
    */
-  BaseObjectTypeIds getBaseId();
+  BaseTypeId getBaseTypeId();
 
   /**
    * Returns the parent type id.
    * 
    * @return the parent type id or <code>null</code> if the type is a base type
    */
-  String getParentId();
+  String getParentTypeId();
 
   /**
    * Returns if an object of this type can be created.

Copied: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BaseTypeId.java (from r934710, incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BaseObjectTypeIds.java)
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BaseTypeId.java?p2=incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BaseTypeId.java&p1=incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BaseObjectTypeIds.java&r1=934710&r2=934728&rev=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BaseObjectTypeIds.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BaseTypeId.java Fri Apr 16 09:59:18 2010
@@ -20,17 +20,20 @@ package org.apache.chemistry.opencmis.co
 
 /**
  * Base Object Type Ids Enum.
- * 
+ *
  * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
- * 
+ *
  */
-public enum BaseObjectTypeIds {
+public enum BaseTypeId {
+
+  CMIS_DOCUMENT("cmis:document"), //
+  CMIS_FOLDER("cmis:folder"), //
+  CMIS_RELATIONSHIP("cmis:relationship"), //
+  CMIS_POLICY("cmis:policy");
 
-  CMIS_DOCUMENT("cmis:document"), CMIS_FOLDER("cmis:folder"), CMIS_RELATIONSHIP("cmis:relationship"), CMIS_POLICY(
-      "cmis:policy");
   private final String value;
 
-  BaseObjectTypeIds(String v) {
+  BaseTypeId(String v) {
     value = v;
   }
 
@@ -38,8 +41,8 @@ public enum BaseObjectTypeIds {
     return value;
   }
 
-  public static BaseObjectTypeIds fromValue(String v) {
-    for (BaseObjectTypeIds c : BaseObjectTypeIds.values()) {
+  public static BaseTypeId fromValue(String v) {
+    for (BaseTypeId c : BaseTypeId.values()) {
       if (c.value.equals(v)) {
         return c;
       }

Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/enums/BaseTypeId.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Converter.java Fri Apr 16 09:59:18 2010
@@ -88,7 +88,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.TypeDefinitionList;
 import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
 import org.apache.chemistry.opencmis.commons.enums.AllowableActionsEnum;
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.commons.enums.CapabilityAcl;
 import org.apache.chemistry.opencmis.commons.enums.CapabilityChanges;
 import org.apache.chemistry.opencmis.commons.enums.CapabilityContentStreamUpdates;
@@ -256,9 +256,9 @@ public final class Converter {
 
     result.setAclCapabilities(convert(repositoryInfo.getAclCapability()));
     result.setChangesIncomplete(repositoryInfo.isChangesIncomplete());
-    List<BaseObjectTypeIds> baseObjectTypeIds = new ArrayList<BaseObjectTypeIds>();
+    List<BaseTypeId> baseObjectTypeIds = new ArrayList<BaseTypeId>();
     for (EnumBaseObjectTypeIds bot : repositoryInfo.getChangesOnType()) {
-      baseObjectTypeIds.add(convert(BaseObjectTypeIds.class, bot));
+      baseObjectTypeIds.add(convert(BaseTypeId.class, bot));
     }
     result.setChangesOnType(baseObjectTypeIds);
     result.setCmisVersionSupported(repositoryInfo.getCmisVersionSupported());
@@ -387,7 +387,7 @@ public final class Converter {
     result.setVendorName(repositoryInfo.getVendorName());
 
     if (repositoryInfo.getChangesOnType() != null) {
-      for (BaseObjectTypeIds boti : repositoryInfo.getChangesOnType()) {
+      for (BaseTypeId boti : repositoryInfo.getChangesOnType()) {
         result.getChangesOnType().add(convert(EnumBaseObjectTypeIds.class, boti));
       }
     }
@@ -526,7 +526,7 @@ public final class Converter {
           + "' does not match a base type!");
     }
 
-    result.setBaseId(convert(BaseObjectTypeIds.class, typeDefinition.getBaseId()));
+    result.setBaseTypeId(convert(BaseTypeId.class, typeDefinition.getBaseId()));
     result.setDescription(typeDefinition.getDescription());
     result.setDisplayName(typeDefinition.getDisplayName());
     result.setId(typeDefinition.getId());
@@ -539,7 +539,7 @@ public final class Converter {
     result.setIsQueryable(typeDefinition.isQueryable());
     result.setLocalName(typeDefinition.getLocalName());
     result.setLocalNamespace(typeDefinition.getLocalNamespace());
-    result.setParentId(typeDefinition.getParentId());
+    result.setParentTypeId(typeDefinition.getParentId());
     result.setQueryName(typeDefinition.getQueryName());
 
     for (CmisPropertyDefinitionType propertyDefinition : typeDefinition.getPropertyDefinition()) {
@@ -739,14 +739,14 @@ public final class Converter {
 
       RelationshipTypeDefinition relationshipTypeDefinition = (RelationshipTypeDefinition) typeDefinition;
 
-      if (relationshipTypeDefinition.getAllowedSourceTypes() != null) {
-        for (String type : relationshipTypeDefinition.getAllowedSourceTypes()) {
+      if (relationshipTypeDefinition.getAllowedSourceTypeIds() != null) {
+        for (String type : relationshipTypeDefinition.getAllowedSourceTypeIds()) {
           ((CmisTypeRelationshipDefinitionType) result).getAllowedSourceTypes().add(type);
         }
       }
 
-      if (relationshipTypeDefinition.getAllowedTargetTypes() != null) {
-        for (String type : relationshipTypeDefinition.getAllowedTargetTypes()) {
+      if (relationshipTypeDefinition.getAllowedTargetTypeIds() != null) {
+        for (String type : relationshipTypeDefinition.getAllowedTargetTypeIds()) {
           ((CmisTypeRelationshipDefinitionType) result).getAllowedTargetTypes().add(type);
         }
       }
@@ -758,7 +758,7 @@ public final class Converter {
       return null;
     }
 
-    result.setBaseId(convert(EnumBaseObjectTypeIds.class, typeDefinition.getBaseId()));
+    result.setBaseId(convert(EnumBaseObjectTypeIds.class, typeDefinition.getBaseTypeId()));
     result.setControllableACL(convertBoolean(typeDefinition.isControllableAcl(), false));
     result.setControllablePolicy(convertBoolean(typeDefinition.isControllablePolicy(), false));
     result.setCreatable(convertBoolean(typeDefinition.isCreatable(), false));
@@ -771,7 +771,7 @@ public final class Converter {
         false));
     result.setLocalName(typeDefinition.getLocalName());
     result.setLocalNamespace(typeDefinition.getLocalNamespace());
-    result.setParentId(typeDefinition.getParentId());
+    result.setParentId(typeDefinition.getParentTypeId());
     result.setQueryable(convertBoolean(typeDefinition.isQueryable(), false));
     result.setQueryName(typeDefinition.getQueryName());
 

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java Fri Apr 16 09:59:18 2010
@@ -23,13 +23,13 @@ import java.util.Map;
 
 import org.apache.chemistry.opencmis.commons.api.PropertyDefinition;
 import org.apache.chemistry.opencmis.commons.api.TypeDefinition;
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 
 /**
  * Abstract type definition data implementation.
- * 
+ *
  * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
- * 
+ *
  */
 public abstract class AbstractTypeDefinition extends AbstractExtensionData implements
     TypeDefinition, Cloneable {
@@ -42,7 +42,7 @@ public abstract class AbstractTypeDefini
   private String fQueryName;
   private String fDisplayName;
   private String fDescription;
-  private BaseObjectTypeIds fBaseId;
+  private BaseTypeId fBaseId;
   private String fParentId;
   private Boolean fIsCreatable;
   private Boolean fIsFileable;
@@ -53,9 +53,28 @@ public abstract class AbstractTypeDefini
   private Boolean fIsControllablePolicy;
   private Map<String, PropertyDefinition<?>> fPropertyDefinitions;
 
+  public void initialize(TypeDefinition typeDefinition) {
+    setId(typeDefinition.getId());
+    setLocalName(typeDefinition.getLocalName());
+    setLocalNamespace(typeDefinition.getLocalNamespace());
+    setQueryName(typeDefinition.getQueryName());
+    setDisplayName(typeDefinition.getDisplayName());
+    setDescription(typeDefinition.getDescription());
+    setBaseTypeId(typeDefinition.getBaseTypeId());
+    setParentTypeId(typeDefinition.getParentTypeId());
+    setIsCreatable(typeDefinition.isCreatable());
+    setIsFileable(typeDefinition.isFileable());
+    setIsQueryable(typeDefinition.isQueryable());
+    setIsIncludedInSupertypeQuery(typeDefinition.isIncludedInSupertypeQuery());
+    setIsFulltextIndexed(typeDefinition.isFulltextIndexed());
+    setIsControllableAcl(typeDefinition.isControllableAcl());
+    setIsControllablePolicy(typeDefinition.isControllablePolicy());
+    setPropertyDefinitions(typeDefinition.getPropertyDefinitions());
+  }
+
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#getId()
    */
   public String getId() {
@@ -68,7 +87,7 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#getLocalName()
    */
   public String getLocalName() {
@@ -81,7 +100,7 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#getLocalNamespace()
    */
   public String getLocalNamespace() {
@@ -94,7 +113,7 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#getQueryName()
    */
   public String getQueryName() {
@@ -107,7 +126,7 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#getDisplayName()
    */
   public String getDisplayName() {
@@ -120,7 +139,7 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#getDescription()
    */
   public String getDescription() {
@@ -133,33 +152,33 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#getBaseId()
    */
-  public BaseObjectTypeIds getBaseId() {
+  public BaseTypeId getBaseTypeId() {
     return fBaseId;
   }
 
-  public void setBaseId(BaseObjectTypeIds baseId) {
+  public void setBaseTypeId(BaseTypeId baseId) {
     fBaseId = baseId;
   }
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#getParentId()
    */
-  public String getParentId() {
+  public String getParentTypeId() {
     return fParentId;
   }
 
-  public void setParentId(String parentId) {
+  public void setParentTypeId(String parentId) {
     fParentId = parentId;
   }
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#isCreatable()
    */
   public Boolean isCreatable() {
@@ -172,7 +191,7 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#isFileable()
    */
   public Boolean isFileable() {
@@ -185,7 +204,7 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#isQueryable()
    */
   public Boolean isQueryable() {
@@ -198,7 +217,7 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#isIncludedInSupertypeQuery()
    */
   public Boolean isIncludedInSupertypeQuery() {
@@ -211,7 +230,7 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#isFulltextIndexed()
    */
   public Boolean isFulltextIndexed() {
@@ -224,7 +243,7 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#isControllableACL()
    */
   public Boolean isControllableAcl() {
@@ -237,7 +256,7 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#isControllablePolicy()
    */
   public Boolean isControllablePolicy() {
@@ -250,8 +269,8 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
-   * 
+   *
+   *
    * @see org.apache.opencmis.client.provider.TypeDefinitionData#getPropertyDefintions()
    */
   public Map<String, PropertyDefinition<?>> getPropertyDefinitions() {
@@ -264,7 +283,7 @@ public abstract class AbstractTypeDefini
 
   /**
    * Adds a property definition.
-   * 
+   *
    * @param propertyDefinition
    *          the property definition
    */
@@ -292,7 +311,7 @@ public abstract class AbstractTypeDefini
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see java.lang.Object#toString()
    */
   @Override

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java Fri Apr 16 09:59:18 2010
@@ -23,9 +23,9 @@ import org.apache.chemistry.opencmis.com
 
 /**
  * Document type definition.
- * 
+ *
  * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
- * 
+ *
  */
 public class DocumentTypeDefinitionImpl extends AbstractTypeDefinition implements
     DocumentTypeDefinition {
@@ -37,7 +37,7 @@ public class DocumentTypeDefinitionImpl 
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.DocumentTypeDefinitionData#getContentStreamAllowed()
    */
   public ContentStreamAllowed getContentStreamAllowed() {
@@ -50,7 +50,7 @@ public class DocumentTypeDefinitionImpl 
 
   /*
    * (non-Javadoc)
-   * 
+   *
    * @see org.apache.opencmis.client.provider.DocumentTypeDefinitionData#isVersionable()
    */
   public Boolean isVersionable() {

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectDataImpl.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectDataImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectDataImpl.java Fri Apr 16 09:59:18 2010
@@ -29,7 +29,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.PropertiesData;
 import org.apache.chemistry.opencmis.commons.api.PropertyData;
 import org.apache.chemistry.opencmis.commons.api.RenditionData;
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 
 /**
  * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
@@ -65,11 +65,11 @@ public class ObjectDataImpl extends Abst
    * 
    * @see org.apache.opencmis.client.provider.ObjectData#getBaseTypeId()
    */
-  public BaseObjectTypeIds getBaseTypeId() {
+  public BaseTypeId getBaseTypeId() {
     Object value = getFirstValue(PropertyIds.BASE_TYPE_ID);
     if (value instanceof String) {
       try {
-        return BaseObjectTypeIds.fromValue((String) value);
+        return BaseTypeId.fromValue((String) value);
       }
       catch (Exception e) {
       }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RelationshipTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RelationshipTypeDefinitionImpl.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RelationshipTypeDefinitionImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RelationshipTypeDefinitionImpl.java Fri Apr 16 09:59:18 2010
@@ -41,7 +41,7 @@ public class RelationshipTypeDefinitionI
    * 
    * @see org.apache.opencmis.client.provider.RelationshipTypeDefinitionData#getAllowedSourceTypes()
    */
-  public List<String> getAllowedSourceTypes() {
+  public List<String> getAllowedSourceTypeIds() {
     return fAllowedSourceTypes;
   }
 
@@ -54,7 +54,7 @@ public class RelationshipTypeDefinitionI
    * 
    * @see org.apache.opencmis.client.provider.RelationshipTypeDefinitionData#getAllowedTargetTypes()
    */
-  public List<String> getAllowedTargetTypes() {
+  public List<String> getAllowedTargetTypeIds() {
     return fAllowedTargetTypes;
   }
 

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java?rev=934728&r1=934727&r2=934728&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java Fri Apr 16 09:59:18 2010
@@ -23,7 +23,7 @@ import java.util.List;
 import org.apache.chemistry.opencmis.commons.api.AclCapabilities;
 import org.apache.chemistry.opencmis.commons.api.RepositoryCapabilities;
 import org.apache.chemistry.opencmis.commons.api.RepositoryInfo;
-import org.apache.chemistry.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 
 /**
  * Repository info data implementation.
@@ -46,7 +46,7 @@ public class RepositoryInfoImpl extends 
   private String fPrincipalAnyone;
   private String fThinClientUri;
   private Boolean fChangesIncomplete;
-  private List<BaseObjectTypeIds> fChangesOnType;
+  private List<BaseTypeId> fChangesOnType;
   private String fLatestChangeLogToken;
   private String fVendorName;
   private String fProductName;
@@ -165,11 +165,11 @@ public String getId() {
     fChangesIncomplete = changesIncomplete;
   }
 
-  public List<BaseObjectTypeIds> getChangesOnType() {
+  public List<BaseTypeId> getChangesOnType() {
     return fChangesOnType;
   }
 
-  public void setChangesOnType(List<BaseObjectTypeIds> changesOnType) {
+  public void setChangesOnType(List<BaseTypeId> changesOnType) {
     fChangesOnType = changesOnType;
   }
 



Mime
View raw message