chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r934878 [8/13] - in /incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src: main/java/org/apache/chemistry/opencmis/inmemory/ main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/ mai...
Date Fri, 16 Apr 2010 14:00:25 GMT
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java Fri Apr 16 14:00:23 2010
@@ -36,228 +36,219 @@ import org.apache.chemistry.opencmis.com
 
 public class DocumentTypeCreationHelper {
 
-  static private  List<TypeDefinition> defaultTypes = createCmisDefaultTypes();
-  
-  static public List<TypeDefinition> createMapWithDefaultTypes() {
-    List<TypeDefinition> typesList = new LinkedList<TypeDefinition>();
-    typesList.addAll(defaultTypes);
-    return typesList;
-  }
-  
-  static public final List<TypeDefinition> getDefaultTypes() {
-    return defaultTypes;
-  }  
-  
-  static private List<TypeDefinition> createCmisDefaultTypes() {
-    List<TypeDefinition> typesList = new LinkedList<TypeDefinition>();
-
-    // create root types:
-    TypeDefinition cmisType = InMemoryDocumentTypeDefinition.getRootDocumentType();
-    typesList.add(cmisType);
-
-    cmisType = InMemoryFolderTypeDefinition.getRootFolderType();
-    typesList.add(cmisType);
-
-//    cmisType = RelationshipTypeDefinition.getRootRelationshipType();
-//    typesList.add(cmisType);
-//
-//    cmisType = PolicyTypeDefinition.getRootPolicyType();
-//    typesList.add(cmisType);
-
-    return typesList;
-  }
-  
-  /**
-   * create root types and a collection of sample types
-   * 
-   * @return typesMap map filled with created types
-   */
-  static public  List<TypeDefinition> createDefaultTypes() {
-    List<TypeDefinition> typesList = createCmisDefaultTypes();
-
-    return typesList;
-  }
-
-  public static void setBasicPropertyDefinitions(
-      Map<String, PropertyDefinition<?>> propertyDefinitions) {
-
-    PropertyStringDefinitionImpl propS = PropertyCreationHelper.createStringDefinition(
-        PropertyIds.NAME, "CMIS Name Property");
-    propS.setUpdatability(Updatability.READWRITE);
-    propertyDefinitions.put(propS.getId(), propS);
-    
-    PropertyIdDefinitionImpl propId = PropertyCreationHelper.createIdDefinition(
-        PropertyIds.OBJECT_ID, "CMIS Object Id Property");
-    propId.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propId.getId(), propId);
-    
-    propId = PropertyCreationHelper.createIdDefinition(
-        PropertyIds.OBJECT_TYPE_ID, "CMIS Object Type Id Property");
-    propId.setUpdatability(Updatability.ONCREATE);
-    propId.setIsRequired(true);
-    propertyDefinitions.put(propId.getId(), propId);
-    
-    propId = PropertyCreationHelper.createIdDefinition(
-        PropertyIds.BASE_TYPE_ID, "CMIS Base Type Id Property");
-    propId.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propId.getId(), propId);
-    
-    propS = PropertyCreationHelper.createStringDefinition(
-        PropertyIds.CREATED_BY, "CMIS Created By Property");
-    propS.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propS.getId(), propS);
-    
-    PropertyDateTimeDefinitionImpl propD = PropertyCreationHelper.createDateTimeDefinition(
-        PropertyIds.CREATION_DATE, "CMIS Creation Date Property");
-    propD.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propD.getId(), propD);
-    
-    propS = PropertyCreationHelper.createStringDefinition(
-        PropertyIds.LAST_MODIFIED_BY, "CMIS Last Modified By Property");
-    propS.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propS.getId(), propS);
-    
-    propD = PropertyCreationHelper.createDateTimeDefinition(
-        PropertyIds.LAST_MODIFICATION_DATE, "CMIS Last Modification Date Property");
-    propD.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propD.getId(), propD);
-    
-    propS = PropertyCreationHelper.createStringDefinition(
-        PropertyIds.CHANGE_TOKEN, "CMIS Change Token Property");
-    propS.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propS.getId(), propS);
-  }
-
-  public static void setBasicDocumentPropertyDefinitions(
-      Map<String, PropertyDefinition<?>> propertyDefinitions) {
-    
-    setBasicPropertyDefinitions(propertyDefinitions);
-    PropertyBooleanDefinitionImpl propB = PropertyCreationHelper.createBooleanDefinition(
-        PropertyIds.IS_IMMUTABLE, "CMIS Is Immutable Property");
-    propB.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propB.getId(), propB);
-    
-    propB = PropertyCreationHelper.createBooleanDefinition(
-        PropertyIds.IS_LATEST_VERSION, "CMIS Is Latest Version Property");
-    propB.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propB.getId(), propB);
-    
-    propB = PropertyCreationHelper.createBooleanDefinition(
-        PropertyIds.IS_MAJOR_VERSION, "CMIS Is Major Version Property");
-    propB.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propB.getId(), propB);
-    
-    propB = PropertyCreationHelper.createBooleanDefinition(
-        PropertyIds.IS_LATEST_MAJOR_VERSION, "CMIS Is Latest Major Version Property");
-    propB.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propB.getId(), propB);
-    
-    PropertyStringDefinitionImpl propS = PropertyCreationHelper.createStringDefinition(
-        PropertyIds.VERSION_LABEL, "CMIS Version Label Property");
-    propS.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propS.getId(), propS);
-    
-    PropertyIdDefinitionImpl propId = PropertyCreationHelper.createIdDefinition(
-        PropertyIds.VERSION_SERIES_ID, "CMIS Version Series Id Property");
-    propId.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propId.getId(), propId);
-    
-    propB = PropertyCreationHelper.createBooleanDefinition(
-        PropertyIds.IS_VERSION_SERIES_CHECKED_OUT, "CMIS Is Version Series Checked Out Property");
-    propB.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propB.getId(), propB);
-        
-    propS = PropertyCreationHelper.createStringDefinition(
-        PropertyIds.VERSION_SERIES_CHECKED_OUT_BY, "CMIS Version Series Checked Out By Property");
-    propS.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propS.getId(), propS);
-    
-    propId = PropertyCreationHelper.createIdDefinition(
-        PropertyIds.VERSION_SERIES_CHECKED_OUT_ID, "CMIS Version Series Checked Out Id Property");
-    propId.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propId.getId(), propId);
-    
-    propS = PropertyCreationHelper.createStringDefinition(
-        PropertyIds.CHECKIN_COMMENT, "CMIS Checkin Comment Property");
-    propId.setUpdatability(Updatability.READONLY); // Note: spec says read-only, because not set as property
-    propertyDefinitions.put(propS.getId(), propS);
-    
-    PropertyIntegerDefinitionImpl propI= PropertyCreationHelper.createIntegerDefinition(
-        PropertyIds.CONTENT_STREAM_LENGTH, "CMIS Content Stream Length Property");
-    propI.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propI.getId(), propI);
-    
-    propS = PropertyCreationHelper.createStringDefinition(
-        PropertyIds.CONTENT_STREAM_MIME_TYPE, "CMIS Content Stream Mime Type Property");
-    propS.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propS.getId(), propS);
-    
-    propS = PropertyCreationHelper.createStringDefinition(
-        PropertyIds.CONTENT_STREAM_FILE_NAME, "CMIS Content Stream File Name Property");
-    propertyDefinitions.put(propS.getId(), propS);
-    
-    propId = PropertyCreationHelper.createIdDefinition(
-        PropertyIds.CONTENT_STREAM_ID, "CMIS Stream Id Property");
-    propId.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propId.getId(), propId);
-    
-
-  }
-
-  public static void setBasicFolderPropertyDefinitions(
-      Map<String, PropertyDefinition<?>> propertyDefinitions) {
-
-    setBasicPropertyDefinitions(propertyDefinitions);
-    PropertyIdDefinitionImpl propId = PropertyCreationHelper.createIdDefinition(
-        PropertyIds.PARENT_ID, "CMIS Parent Id Property");
-    propId.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propId.getId(), propId);
-    
-    propId = PropertyCreationHelper.createIdDefinition(
-        PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS, "CMIS Allowed Childe Object Type Ids Property");
-    propId.setUpdatability(Updatability.READONLY);
-    propId.setCardinality(Cardinality.MULTI);
-    propertyDefinitions.put(propId.getId(), propId);
-    
-    PropertyStringDefinitionImpl propS = PropertyCreationHelper.createStringDefinition(
-        PropertyIds.PATH, "CMIS Path Property");
-    propId.setUpdatability(Updatability.READONLY);
-    propertyDefinitions.put(propS.getId(), propS);
-
-  }
-
-  public static void setBasicPolicyPropertyDefinitions(
-      Map<String, PropertyDefinition<?>> propertyDefinitions) {
-
-    setBasicPropertyDefinitions(propertyDefinitions);
-    PropertyStringDefinitionImpl propS = PropertyCreationHelper.createStringDefinition(
-        PropertyIds.POLICY_TEXT, "CMIS Policy Text Property");
-    propS.setIsRequired(true);
-    propertyDefinitions.put(propS.getId(), propS);    
-  }
-
-  public static void setBasicRelationshipPropertyDefinitions(
-      Map<String, PropertyDefinition<?>> propertyDefinitions) {
-  
-    setBasicPropertyDefinitions(propertyDefinitions);
-    PropertyIdDefinitionImpl propId = PropertyCreationHelper.createIdDefinition(
-        PropertyIds.SOURCE_ID, "CMIS Source Id Property");
-    propId.setIsRequired(true);
-    propertyDefinitions.put(propId.getId(), propId);
-    
-    propId = PropertyCreationHelper.createIdDefinition(
-        PropertyIds.TARGET_ID, "CMIS Target Id Property");
-    propId.setIsRequired(true);
-    propertyDefinitions.put(propId.getId(), propId);
-  }
-
-  public static void mergePropertyDefinitions(Map<String, PropertyDefinition<?>> existingPpropertyDefinitions, Map<String, PropertyDefinition<?>> newPropertyDefinitions) {
-    for (String propId : newPropertyDefinitions.keySet()) {
-      if (existingPpropertyDefinitions.containsKey(propId))
-        throw new RuntimeException("You can't set a property with id " + propId
-            + ". This property id already exists already or exists in supertype");
-    }
-    existingPpropertyDefinitions.putAll(newPropertyDefinitions);
-  }
+	static private List<TypeDefinition> defaultTypes = createCmisDefaultTypes();
+
+	static public List<TypeDefinition> createMapWithDefaultTypes() {
+		List<TypeDefinition> typesList = new LinkedList<TypeDefinition>();
+		typesList.addAll(defaultTypes);
+		return typesList;
+	}
+
+	static public final List<TypeDefinition> getDefaultTypes() {
+		return defaultTypes;
+	}
+
+	static private List<TypeDefinition> createCmisDefaultTypes() {
+		List<TypeDefinition> typesList = new LinkedList<TypeDefinition>();
+
+		// create root types:
+		TypeDefinition cmisType = InMemoryDocumentTypeDefinition.getRootDocumentType();
+		typesList.add(cmisType);
+
+		cmisType = InMemoryFolderTypeDefinition.getRootFolderType();
+		typesList.add(cmisType);
+
+		// cmisType = RelationshipTypeDefinition.getRootRelationshipType();
+		// typesList.add(cmisType);
+		//
+		// cmisType = PolicyTypeDefinition.getRootPolicyType();
+		// typesList.add(cmisType);
+
+		return typesList;
+	}
+
+	/**
+	 * create root types and a collection of sample types
+	 * 
+	 * @return typesMap map filled with created types
+	 */
+	static public List<TypeDefinition> createDefaultTypes() {
+		List<TypeDefinition> typesList = createCmisDefaultTypes();
+
+		return typesList;
+	}
+
+	public static void setBasicPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
+
+		PropertyStringDefinitionImpl propS = PropertyCreationHelper.createStringDefinition(PropertyIds.NAME,
+				"CMIS Name Property");
+		propS.setUpdatability(Updatability.READWRITE);
+		propertyDefinitions.put(propS.getId(), propS);
+
+		PropertyIdDefinitionImpl propId = PropertyCreationHelper.createIdDefinition(PropertyIds.OBJECT_ID,
+				"CMIS Object Id Property");
+		propId.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propId.getId(), propId);
+
+		propId = PropertyCreationHelper.createIdDefinition(PropertyIds.OBJECT_TYPE_ID, "CMIS Object Type Id Property");
+		propId.setUpdatability(Updatability.ONCREATE);
+		propId.setIsRequired(true);
+		propertyDefinitions.put(propId.getId(), propId);
+
+		propId = PropertyCreationHelper.createIdDefinition(PropertyIds.BASE_TYPE_ID, "CMIS Base Type Id Property");
+		propId.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propId.getId(), propId);
+
+		propS = PropertyCreationHelper.createStringDefinition(PropertyIds.CREATED_BY, "CMIS Created By Property");
+		propS.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propS.getId(), propS);
+
+		PropertyDateTimeDefinitionImpl propD = PropertyCreationHelper.createDateTimeDefinition(
+				PropertyIds.CREATION_DATE, "CMIS Creation Date Property");
+		propD.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propD.getId(), propD);
+
+		propS = PropertyCreationHelper.createStringDefinition(PropertyIds.LAST_MODIFIED_BY,
+				"CMIS Last Modified By Property");
+		propS.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propS.getId(), propS);
+
+		propD = PropertyCreationHelper.createDateTimeDefinition(PropertyIds.LAST_MODIFICATION_DATE,
+				"CMIS Last Modification Date Property");
+		propD.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propD.getId(), propD);
+
+		propS = PropertyCreationHelper.createStringDefinition(PropertyIds.CHANGE_TOKEN, "CMIS Change Token Property");
+		propS.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propS.getId(), propS);
+	}
+
+	public static void setBasicDocumentPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
+
+		setBasicPropertyDefinitions(propertyDefinitions);
+		PropertyBooleanDefinitionImpl propB = PropertyCreationHelper.createBooleanDefinition(PropertyIds.IS_IMMUTABLE,
+				"CMIS Is Immutable Property");
+		propB.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propB.getId(), propB);
+
+		propB = PropertyCreationHelper.createBooleanDefinition(PropertyIds.IS_LATEST_VERSION,
+				"CMIS Is Latest Version Property");
+		propB.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propB.getId(), propB);
+
+		propB = PropertyCreationHelper.createBooleanDefinition(PropertyIds.IS_MAJOR_VERSION,
+				"CMIS Is Major Version Property");
+		propB.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propB.getId(), propB);
+
+		propB = PropertyCreationHelper.createBooleanDefinition(PropertyIds.IS_LATEST_MAJOR_VERSION,
+				"CMIS Is Latest Major Version Property");
+		propB.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propB.getId(), propB);
+
+		PropertyStringDefinitionImpl propS = PropertyCreationHelper.createStringDefinition(PropertyIds.VERSION_LABEL,
+				"CMIS Version Label Property");
+		propS.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propS.getId(), propS);
+
+		PropertyIdDefinitionImpl propId = PropertyCreationHelper.createIdDefinition(PropertyIds.VERSION_SERIES_ID,
+				"CMIS Version Series Id Property");
+		propId.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propId.getId(), propId);
+
+		propB = PropertyCreationHelper.createBooleanDefinition(PropertyIds.IS_VERSION_SERIES_CHECKED_OUT,
+				"CMIS Is Version Series Checked Out Property");
+		propB.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propB.getId(), propB);
+
+		propS = PropertyCreationHelper.createStringDefinition(PropertyIds.VERSION_SERIES_CHECKED_OUT_BY,
+				"CMIS Version Series Checked Out By Property");
+		propS.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propS.getId(), propS);
+
+		propId = PropertyCreationHelper.createIdDefinition(PropertyIds.VERSION_SERIES_CHECKED_OUT_ID,
+				"CMIS Version Series Checked Out Id Property");
+		propId.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propId.getId(), propId);
+
+		propS = PropertyCreationHelper.createStringDefinition(PropertyIds.CHECKIN_COMMENT,
+				"CMIS Checkin Comment Property");
+		propId.setUpdatability(Updatability.READONLY); // Note: spec says
+														// read-only, because
+														// not set as property
+		propertyDefinitions.put(propS.getId(), propS);
+
+		PropertyIntegerDefinitionImpl propI = PropertyCreationHelper.createIntegerDefinition(
+				PropertyIds.CONTENT_STREAM_LENGTH, "CMIS Content Stream Length Property");
+		propI.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propI.getId(), propI);
+
+		propS = PropertyCreationHelper.createStringDefinition(PropertyIds.CONTENT_STREAM_MIME_TYPE,
+				"CMIS Content Stream Mime Type Property");
+		propS.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propS.getId(), propS);
+
+		propS = PropertyCreationHelper.createStringDefinition(PropertyIds.CONTENT_STREAM_FILE_NAME,
+				"CMIS Content Stream File Name Property");
+		propertyDefinitions.put(propS.getId(), propS);
+
+		propId = PropertyCreationHelper.createIdDefinition(PropertyIds.CONTENT_STREAM_ID, "CMIS Stream Id Property");
+		propId.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propId.getId(), propId);
+
+	}
+
+	public static void setBasicFolderPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
+
+		setBasicPropertyDefinitions(propertyDefinitions);
+		PropertyIdDefinitionImpl propId = PropertyCreationHelper.createIdDefinition(PropertyIds.PARENT_ID,
+				"CMIS Parent Id Property");
+		propId.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propId.getId(), propId);
+
+		propId = PropertyCreationHelper.createIdDefinition(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS,
+				"CMIS Allowed Childe Object Type Ids Property");
+		propId.setUpdatability(Updatability.READONLY);
+		propId.setCardinality(Cardinality.MULTI);
+		propertyDefinitions.put(propId.getId(), propId);
+
+		PropertyStringDefinitionImpl propS = PropertyCreationHelper.createStringDefinition(PropertyIds.PATH,
+				"CMIS Path Property");
+		propId.setUpdatability(Updatability.READONLY);
+		propertyDefinitions.put(propS.getId(), propS);
+
+	}
+
+	public static void setBasicPolicyPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
+
+		setBasicPropertyDefinitions(propertyDefinitions);
+		PropertyStringDefinitionImpl propS = PropertyCreationHelper.createStringDefinition(PropertyIds.POLICY_TEXT,
+				"CMIS Policy Text Property");
+		propS.setIsRequired(true);
+		propertyDefinitions.put(propS.getId(), propS);
+	}
+
+	public static void setBasicRelationshipPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
+
+		setBasicPropertyDefinitions(propertyDefinitions);
+		PropertyIdDefinitionImpl propId = PropertyCreationHelper.createIdDefinition(PropertyIds.SOURCE_ID,
+				"CMIS Source Id Property");
+		propId.setIsRequired(true);
+		propertyDefinitions.put(propId.getId(), propId);
+
+		propId = PropertyCreationHelper.createIdDefinition(PropertyIds.TARGET_ID, "CMIS Target Id Property");
+		propId.setIsRequired(true);
+		propertyDefinitions.put(propId.getId(), propId);
+	}
+
+	public static void mergePropertyDefinitions(Map<String, PropertyDefinition<?>> existingPpropertyDefinitions,
+			Map<String, PropertyDefinition<?>> newPropertyDefinitions) {
+		for (String propId : newPropertyDefinitions.keySet()) {
+			if (existingPpropertyDefinitions.containsKey(propId))
+				throw new RuntimeException("You can't set a property with id " + propId
+						+ ". This property id already exists already or exists in supertype");
+		}
+		existingPpropertyDefinitions.putAll(newPropertyDefinitions);
+	}
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryDocumentTypeDefinition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryDocumentTypeDefinition.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryDocumentTypeDefinition.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryDocumentTypeDefinition.java Fri Apr 16 14:00:23 2010
@@ -36,80 +36,82 @@ import org.apache.chemistry.opencmis.inm
 
 public class InMemoryDocumentTypeDefinition extends DocumentTypeDefinitionImpl {
 
-  private static final long serialVersionUID = 1L;
-  private static InMemoryDocumentTypeDefinition DOCUMENT_TYPE = new InMemoryDocumentTypeDefinition();
+	private static final long serialVersionUID = 1L;
+	private static InMemoryDocumentTypeDefinition DOCUMENT_TYPE = new InMemoryDocumentTypeDefinition();
 
-  public static InMemoryDocumentTypeDefinition getRootDocumentType() {
-    return DOCUMENT_TYPE;
-  }
-
-  /* This constructor is just for creating the root document */
-  public InMemoryDocumentTypeDefinition() {
-    init(BaseTypeId.CMIS_DOCUMENT.value(), "CMIS Document");
-    setParentTypeId(null);
-    // set base properties
-    Map<String, PropertyDefinition<?>> props = getPropertyDefinitions();
-    DocumentTypeCreationHelper.setBasicDocumentPropertyDefinitions(props);
-  }
-
-  public InMemoryDocumentTypeDefinition(String id, String displayName) {
-    init(id, displayName);
-    setParentTypeId(DOCUMENT_TYPE.getId());
-  }
-
-  public InMemoryDocumentTypeDefinition(String id, String displayName, InMemoryDocumentTypeDefinition parentType) {
-    // get root type
-    init(id, displayName);
-    if (parentType != null)
-      setBaseTypeId(parentType.getBaseTypeId());
-    else
-      throw new IllegalArgumentException(
-          "Must provide a parent type when creating a document type definition");
-    setParentTypeId(parentType.getId());
-  }
-
-  /* 
-   * Set the property definitions for this type. The parameter propertyDefinitions should only
-   * contain the custom property definitions for this type. The standard property definitions are
-   * added automatically.
-   * @see org.apache.opencmis.commons.impl.dataobjects.AbstractTypeDefinition#setPropertyDefinitions(java.util.Map)
-   */
-  public void addCustomPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
-    DocumentTypeCreationHelper.mergePropertyDefinitions(getPropertyDefinitions(), propertyDefinitions);
-  }
-
-//  public void setProperties() {
-//    Map<String, PropertyDefinition<?>> propertyDefinitions = new HashMap<String, PropertyDefinition<?>>();
-//    this.setPropertyDefinitions(propertyDefinitions);    
-//  }
-  
-  private void init(String id, String displayName) {
-    if (!NameValidator.isValidId(id))
-      throw new CmisInvalidArgumentException(NameValidator.ERROR_ILLEGAL_ID);
-
-    setBaseTypeId(BaseTypeId.CMIS_DOCUMENT);
-    setId(id);
-    if (displayName == null)
-      displayName = '#' + id + '#';
-    setDisplayName(displayName);
-    // create some suitable defaults for convenience
-    setDescription("Description of " + getDisplayName() + " Type");
-    setLocalName(id);
-    setLocalNamespace("local");
-    setQueryName(id);
-    setIsControllableAcl(false);
-    setIsControllablePolicy(false);
-    setIsCreatable(true);
-    setIsFileable(true);
-    setIsFulltextIndexed(false);
-    setIsIncludedInSupertypeQuery(true);
-    setIsQueryable(false);
-    
-    Map<String, PropertyDefinition<?>> props = new HashMap<String, PropertyDefinition<?>>();
-    setPropertyDefinitions(props); // set initial empty set of properties
-
-    // document specifics:
-    setContentStreamAllowed(ContentStreamAllowed.ALLOWED);
-    setIsVersionable(false);    
-  }
+	public static InMemoryDocumentTypeDefinition getRootDocumentType() {
+		return DOCUMENT_TYPE;
+	}
+
+	/* This constructor is just for creating the root document */
+	public InMemoryDocumentTypeDefinition() {
+		init(BaseTypeId.CMIS_DOCUMENT.value(), "CMIS Document");
+		setParentTypeId(null);
+		// set base properties
+		Map<String, PropertyDefinition<?>> props = getPropertyDefinitions();
+		DocumentTypeCreationHelper.setBasicDocumentPropertyDefinitions(props);
+	}
+
+	public InMemoryDocumentTypeDefinition(String id, String displayName) {
+		init(id, displayName);
+		setParentTypeId(DOCUMENT_TYPE.getId());
+	}
+
+	public InMemoryDocumentTypeDefinition(String id, String displayName, InMemoryDocumentTypeDefinition parentType) {
+		// get root type
+		init(id, displayName);
+		if (parentType != null)
+			setBaseTypeId(parentType.getBaseTypeId());
+		else
+			throw new IllegalArgumentException("Must provide a parent type when creating a document type definition");
+		setParentTypeId(parentType.getId());
+	}
+
+	/*
+	 * Set the property definitions for this type. The parameter
+	 * propertyDefinitions should only contain the custom property definitions
+	 * for this type. The standard property definitions are added automatically.
+	 * 
+	 * @seeorg.apache.opencmis.commons.impl.dataobjects.AbstractTypeDefinition#
+	 * setPropertyDefinitions(java.util.Map)
+	 */
+	public void addCustomPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
+		DocumentTypeCreationHelper.mergePropertyDefinitions(getPropertyDefinitions(), propertyDefinitions);
+	}
+
+	// public void setProperties() {
+	// Map<String, PropertyDefinition<?>> propertyDefinitions = new
+	// HashMap<String, PropertyDefinition<?>>();
+	// this.setPropertyDefinitions(propertyDefinitions);
+	// }
+
+	private void init(String id, String displayName) {
+		if (!NameValidator.isValidId(id))
+			throw new CmisInvalidArgumentException(NameValidator.ERROR_ILLEGAL_ID);
+
+		setBaseTypeId(BaseTypeId.CMIS_DOCUMENT);
+		setId(id);
+		if (displayName == null)
+			displayName = '#' + id + '#';
+		setDisplayName(displayName);
+		// create some suitable defaults for convenience
+		setDescription("Description of " + getDisplayName() + " Type");
+		setLocalName(id);
+		setLocalNamespace("local");
+		setQueryName(id);
+		setIsControllableAcl(false);
+		setIsControllablePolicy(false);
+		setIsCreatable(true);
+		setIsFileable(true);
+		setIsFulltextIndexed(false);
+		setIsIncludedInSupertypeQuery(true);
+		setIsQueryable(false);
+
+		Map<String, PropertyDefinition<?>> props = new HashMap<String, PropertyDefinition<?>>();
+		setPropertyDefinitions(props); // set initial empty set of properties
+
+		// document specifics:
+		setContentStreamAllowed(ContentStreamAllowed.ALLOWED);
+		setIsVersionable(false);
+	}
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryFolderTypeDefinition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryFolderTypeDefinition.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryFolderTypeDefinition.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryFolderTypeDefinition.java Fri Apr 16 14:00:23 2010
@@ -30,71 +30,72 @@ import org.apache.chemistry.opencmis.inm
 
 public class InMemoryFolderTypeDefinition extends FolderTypeDefinitionImpl {
 
-  private static final long serialVersionUID = 1L;
-  private static InMemoryFolderTypeDefinition FOLDER_TYPE = new InMemoryFolderTypeDefinition();
+	private static final long serialVersionUID = 1L;
+	private static InMemoryFolderTypeDefinition FOLDER_TYPE = new InMemoryFolderTypeDefinition();
 
-  public static InMemoryFolderTypeDefinition getRootFolderType() {
-    return FOLDER_TYPE;
-  }
-
-  /* This constructor is just for creating the root document */
-  public InMemoryFolderTypeDefinition() {
-    init(BaseTypeId.CMIS_FOLDER.value(), "CMIS Folder");
-    setParentTypeId(null);
-    // set base properties
-    Map<String, PropertyDefinition<?>> props = getPropertyDefinitions();
-    DocumentTypeCreationHelper.setBasicFolderPropertyDefinitions(props);
-  }
-
-  public InMemoryFolderTypeDefinition(String id, String displayName) {
-    init(id, displayName);
-    setParentTypeId(FOLDER_TYPE.getId());
-  }
-
-  public InMemoryFolderTypeDefinition(String id, String displayName, InMemoryFolderTypeDefinition parentType) {
-    // get root type
-    init(id, displayName);
-    if (parentType != null)
-      setBaseTypeId(parentType.getBaseTypeId());
-    else
-      throw new IllegalArgumentException(
-          "Must provide a parent type when creating a folder type definition");
-    setParentTypeId(parentType.getId());
-  }
-
-  /* 
-   * Set the property definitions for this type. The parameter propertyDefinitions should only
-   * contain the custom property definitions for this type. The standard property definitions are
-   * added automatically.
-   * @see org.apache.opencmis.commons.impl.dataobjects.AbstractTypeDefinition#setPropertyDefinitions(java.util.Map)
-   */
-  public void addCustomPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
-    DocumentTypeCreationHelper.mergePropertyDefinitions(getPropertyDefinitions(), propertyDefinitions);
-  }
-
-  private void init(String id, String displayName) {
-    if (!NameValidator.isValidId(id))
-        throw new CmisInvalidArgumentException(NameValidator.ERROR_ILLEGAL_NAME);
-
-    setBaseTypeId(BaseTypeId.CMIS_FOLDER);
-    setId(id);
-    if (displayName == null)
-      displayName = '#' + id + '#';
-    setDisplayName(displayName);
-    // create some suitable defaults for convenience
-    setDescription("Description of " + getDisplayName() + " Type");
-    setLocalName(id);
-    setLocalNamespace("local");
-    setQueryName(id);
-    setIsControllableAcl(false);
-    setIsControllablePolicy(false);
-    setIsCreatable(true);
-    setIsFileable(true);
-    setIsFulltextIndexed(false);
-    setIsIncludedInSupertypeQuery(true);
-    setIsQueryable(false);
-
-    Map<String, PropertyDefinition<?>> props = new HashMap<String, PropertyDefinition<?>>();
-    setPropertyDefinitions(props); // set initial empty set of properties    
-  }
+	public static InMemoryFolderTypeDefinition getRootFolderType() {
+		return FOLDER_TYPE;
+	}
+
+	/* This constructor is just for creating the root document */
+	public InMemoryFolderTypeDefinition() {
+		init(BaseTypeId.CMIS_FOLDER.value(), "CMIS Folder");
+		setParentTypeId(null);
+		// set base properties
+		Map<String, PropertyDefinition<?>> props = getPropertyDefinitions();
+		DocumentTypeCreationHelper.setBasicFolderPropertyDefinitions(props);
+	}
+
+	public InMemoryFolderTypeDefinition(String id, String displayName) {
+		init(id, displayName);
+		setParentTypeId(FOLDER_TYPE.getId());
+	}
+
+	public InMemoryFolderTypeDefinition(String id, String displayName, InMemoryFolderTypeDefinition parentType) {
+		// get root type
+		init(id, displayName);
+		if (parentType != null)
+			setBaseTypeId(parentType.getBaseTypeId());
+		else
+			throw new IllegalArgumentException("Must provide a parent type when creating a folder type definition");
+		setParentTypeId(parentType.getId());
+	}
+
+	/*
+	 * Set the property definitions for this type. The parameter
+	 * propertyDefinitions should only contain the custom property definitions
+	 * for this type. The standard property definitions are added automatically.
+	 * 
+	 * @seeorg.apache.opencmis.commons.impl.dataobjects.AbstractTypeDefinition#
+	 * setPropertyDefinitions(java.util.Map)
+	 */
+	public void addCustomPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
+		DocumentTypeCreationHelper.mergePropertyDefinitions(getPropertyDefinitions(), propertyDefinitions);
+	}
+
+	private void init(String id, String displayName) {
+		if (!NameValidator.isValidId(id))
+			throw new CmisInvalidArgumentException(NameValidator.ERROR_ILLEGAL_NAME);
+
+		setBaseTypeId(BaseTypeId.CMIS_FOLDER);
+		setId(id);
+		if (displayName == null)
+			displayName = '#' + id + '#';
+		setDisplayName(displayName);
+		// create some suitable defaults for convenience
+		setDescription("Description of " + getDisplayName() + " Type");
+		setLocalName(id);
+		setLocalNamespace("local");
+		setQueryName(id);
+		setIsControllableAcl(false);
+		setIsControllablePolicy(false);
+		setIsCreatable(true);
+		setIsFileable(true);
+		setIsFulltextIndexed(false);
+		setIsIncludedInSupertypeQuery(true);
+		setIsQueryable(false);
+
+		Map<String, PropertyDefinition<?>> props = new HashMap<String, PropertyDefinition<?>>();
+		setPropertyDefinitions(props); // set initial empty set of properties
+	}
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryPolicyTypeDefinition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryPolicyTypeDefinition.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryPolicyTypeDefinition.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryPolicyTypeDefinition.java Fri Apr 16 14:00:23 2010
@@ -30,74 +30,75 @@ import org.apache.chemistry.opencmis.inm
 
 public class InMemoryPolicyTypeDefinition extends PolicyTypeDefinitionImpl {
 
-  private static final long serialVersionUID = 1L;
-  private static InMemoryPolicyTypeDefinition POLICY_TYPE = new InMemoryPolicyTypeDefinition();
+	private static final long serialVersionUID = 1L;
+	private static InMemoryPolicyTypeDefinition POLICY_TYPE = new InMemoryPolicyTypeDefinition();
 
-  public static InMemoryPolicyTypeDefinition getRootPolicyType() {
-    return POLICY_TYPE;
-  }
-
-  /* This constructor is just for creating the root document */
-  public InMemoryPolicyTypeDefinition() {
-    init(BaseTypeId.CMIS_POLICY.value(), "CMIS Policy");
-    setParentTypeId(null);
-
-    Map<String, PropertyDefinition<?>> props = getPropertyDefinitions();
-    DocumentTypeCreationHelper.setBasicPolicyPropertyDefinitions(props);
-  }
-
-  public InMemoryPolicyTypeDefinition(String id, String displayName) {
-    init(id, displayName);
-    setParentTypeId(POLICY_TYPE.getId());
-  }
-
-  public InMemoryPolicyTypeDefinition(String id, String displayName, InMemoryPolicyTypeDefinition parentType) {
-    // get root type
-    init(id, displayName);
-    if (parentType != null)
-      setBaseTypeId(parentType.getBaseTypeId());
-    else
-      throw new IllegalArgumentException(
-          "Must provide a parent type when creating a policy definition");
-    setParentTypeId(parentType.getId());
-  }
-
-  /* 
-   * Set the property definitions for this type. The parameter propertyDefinitions should only
-   * contain the custom property definitions for this type. The standard property definitions are
-   * added automatically.
-   * @see org.apache.opencmis.commons.impl.dataobjects.AbstractTypeDefinition#setPropertyDefinitions(java.util.Map)
-   */
-  public void addCustomPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
-    DocumentTypeCreationHelper.mergePropertyDefinitions(getPropertyDefinitions(), propertyDefinitions);
-  }
-
-  private void init(String id, String displayName) {
-    if (!NameValidator.isValidId(id))
-      throw new CmisInvalidArgumentException(NameValidator.ERROR_ILLEGAL_NAME);
-
-    setBaseTypeId(BaseTypeId.CMIS_POLICY);
-    setId(id);
-    if (displayName == null)
-      displayName = '#' + id + '#';
-    setDisplayName(displayName);
-    // create some suitable defaults for convenience
-    setDescription("Description of " + getDisplayName() + " Type");
-    setLocalName(id);
-    setLocalNamespace("local");
-    setQueryName(id);
-    setIsControllableAcl(false);
-    setIsControllablePolicy(false);
-    setIsCreatable(true);
-    setIsFileable(true);
-    setIsFulltextIndexed(false);
-    setIsIncludedInSupertypeQuery(true);
-    setIsQueryable(false);
-    
-    // set base properties
-    Map<String, PropertyDefinition<?>> props = new HashMap<String, PropertyDefinition<?>>();
-    setPropertyDefinitions(props); // set initial empty set of properties 
+	public static InMemoryPolicyTypeDefinition getRootPolicyType() {
+		return POLICY_TYPE;
+	}
+
+	/* This constructor is just for creating the root document */
+	public InMemoryPolicyTypeDefinition() {
+		init(BaseTypeId.CMIS_POLICY.value(), "CMIS Policy");
+		setParentTypeId(null);
+
+		Map<String, PropertyDefinition<?>> props = getPropertyDefinitions();
+		DocumentTypeCreationHelper.setBasicPolicyPropertyDefinitions(props);
+	}
+
+	public InMemoryPolicyTypeDefinition(String id, String displayName) {
+		init(id, displayName);
+		setParentTypeId(POLICY_TYPE.getId());
+	}
+
+	public InMemoryPolicyTypeDefinition(String id, String displayName, InMemoryPolicyTypeDefinition parentType) {
+		// get root type
+		init(id, displayName);
+		if (parentType != null)
+			setBaseTypeId(parentType.getBaseTypeId());
+		else
+			throw new IllegalArgumentException("Must provide a parent type when creating a policy definition");
+		setParentTypeId(parentType.getId());
+	}
+
+	/*
+	 * Set the property definitions for this type. The parameter
+	 * propertyDefinitions should only contain the custom property definitions
+	 * for this type. The standard property definitions are added automatically.
+	 * 
+	 * @seeorg.apache.opencmis.commons.impl.dataobjects.AbstractTypeDefinition#
+	 * setPropertyDefinitions(java.util.Map)
+	 */
+	public void addCustomPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
+		DocumentTypeCreationHelper.mergePropertyDefinitions(getPropertyDefinitions(), propertyDefinitions);
+	}
+
+	private void init(String id, String displayName) {
+		if (!NameValidator.isValidId(id))
+			throw new CmisInvalidArgumentException(NameValidator.ERROR_ILLEGAL_NAME);
+
+		setBaseTypeId(BaseTypeId.CMIS_POLICY);
+		setId(id);
+		if (displayName == null)
+			displayName = '#' + id + '#';
+		setDisplayName(displayName);
+		// create some suitable defaults for convenience
+		setDescription("Description of " + getDisplayName() + " Type");
+		setLocalName(id);
+		setLocalNamespace("local");
+		setQueryName(id);
+		setIsControllableAcl(false);
+		setIsControllablePolicy(false);
+		setIsCreatable(true);
+		setIsFileable(true);
+		setIsFulltextIndexed(false);
+		setIsIncludedInSupertypeQuery(true);
+		setIsQueryable(false);
+
+		// set base properties
+		Map<String, PropertyDefinition<?>> props = new HashMap<String, PropertyDefinition<?>>();
+		setPropertyDefinitions(props); // set initial empty set of properties
 
-    // policy specifics: none
-  }
+		// policy specifics: none
+	}
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryRelationshipTypeDefinition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryRelationshipTypeDefinition.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryRelationshipTypeDefinition.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryRelationshipTypeDefinition.java Fri Apr 16 14:00:23 2010
@@ -30,78 +30,79 @@ import org.apache.chemistry.opencmis.inm
 
 public class InMemoryRelationshipTypeDefinition extends RelationshipTypeDefinitionImpl {
 
-  private static final long serialVersionUID = 1L;
-  private static InMemoryRelationshipTypeDefinition RELATIONSHIP_TYPE = new InMemoryRelationshipTypeDefinition();
+	private static final long serialVersionUID = 1L;
+	private static InMemoryRelationshipTypeDefinition RELATIONSHIP_TYPE = new InMemoryRelationshipTypeDefinition();
 
-  public static InMemoryRelationshipTypeDefinition getRootRelationshipType() {
-    return RELATIONSHIP_TYPE;
-  }
-
-  /* This constructor is just for creating the root document */
-  public InMemoryRelationshipTypeDefinition() {
-    init(BaseTypeId.CMIS_RELATIONSHIP.value(), "CMIS Relation");
-    setParentTypeId(null);
-
-    Map<String, PropertyDefinition<?>> props = getPropertyDefinitions();
-    DocumentTypeCreationHelper.setBasicRelationshipPropertyDefinitions(props);
-  }
-
-  public InMemoryRelationshipTypeDefinition(String id, String displayName) {
-    init(id, displayName);
-    setParentTypeId(RELATIONSHIP_TYPE.getId());
-  }
-
-  public InMemoryRelationshipTypeDefinition(String id, String displayName,
-      InMemoryRelationshipTypeDefinition parentType) {
-    // get root type
-    init(id, displayName);
-    if (parentType != null)
-      setBaseTypeId(parentType.getBaseTypeId());
-    else
-      throw new IllegalArgumentException(
-          "Must provide a parent type when creating a relationship definition");
-    setParentTypeId(parentType.getId());
-  }
-
-  /* 
-   * Set the property definitions for this type. The parameter propertyDefinitions should only
-   * contain the custom property definitions for this type. The standard property definitions are
-   * added automatically.
-   * @see org.apache.opencmis.commons.impl.dataobjects.AbstractTypeDefinition#setPropertyDefinitions(java.util.Map)
-   */
-  public void addCustomPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
-    DocumentTypeCreationHelper.mergePropertyDefinitions(getPropertyDefinitions(), propertyDefinitions);
-  }
-
-  private void init(String id, String displayName) {
-    if (!NameValidator.isValidId(id))
-      throw new CmisInvalidArgumentException(NameValidator.ERROR_ILLEGAL_NAME);
-
-    setBaseTypeId(BaseTypeId.CMIS_RELATIONSHIP);
-    setId(id);
-    if (displayName == null)
-      displayName = '#' + id + '#';
-    setDisplayName(displayName);
-    // create some suitable defaults for convenience
-    setDescription("Description of " + getDisplayName() + " Type");
-    setLocalName(id);
-    setLocalNamespace("local");
-    setQueryName(id);
-    setIsControllableAcl(false);
-    setIsControllablePolicy(false);
-    setIsCreatable(true);
-    setIsFileable(true);
-    setIsFulltextIndexed(false);
-    setIsIncludedInSupertypeQuery(true);
-    setIsQueryable(false);
-
-    // relationship specifics
-    setAllowedSourceTypes(null);
-    setAllowedTargetTypes(null);
-    
-    // set base properties
-    Map<String, PropertyDefinition<?>> props = new HashMap<String, PropertyDefinition<?>>();
-    setPropertyDefinitions(props); // set initial empty set of properties
-  }
+	public static InMemoryRelationshipTypeDefinition getRootRelationshipType() {
+		return RELATIONSHIP_TYPE;
+	}
+
+	/* This constructor is just for creating the root document */
+	public InMemoryRelationshipTypeDefinition() {
+		init(BaseTypeId.CMIS_RELATIONSHIP.value(), "CMIS Relation");
+		setParentTypeId(null);
+
+		Map<String, PropertyDefinition<?>> props = getPropertyDefinitions();
+		DocumentTypeCreationHelper.setBasicRelationshipPropertyDefinitions(props);
+	}
+
+	public InMemoryRelationshipTypeDefinition(String id, String displayName) {
+		init(id, displayName);
+		setParentTypeId(RELATIONSHIP_TYPE.getId());
+	}
+
+	public InMemoryRelationshipTypeDefinition(String id, String displayName,
+			InMemoryRelationshipTypeDefinition parentType) {
+		// get root type
+		init(id, displayName);
+		if (parentType != null)
+			setBaseTypeId(parentType.getBaseTypeId());
+		else
+			throw new IllegalArgumentException("Must provide a parent type when creating a relationship definition");
+		setParentTypeId(parentType.getId());
+	}
+
+	/*
+	 * Set the property definitions for this type. The parameter
+	 * propertyDefinitions should only contain the custom property definitions
+	 * for this type. The standard property definitions are added automatically.
+	 * 
+	 * @seeorg.apache.opencmis.commons.impl.dataobjects.AbstractTypeDefinition#
+	 * setPropertyDefinitions(java.util.Map)
+	 */
+	public void addCustomPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
+		DocumentTypeCreationHelper.mergePropertyDefinitions(getPropertyDefinitions(), propertyDefinitions);
+	}
+
+	private void init(String id, String displayName) {
+		if (!NameValidator.isValidId(id))
+			throw new CmisInvalidArgumentException(NameValidator.ERROR_ILLEGAL_NAME);
+
+		setBaseTypeId(BaseTypeId.CMIS_RELATIONSHIP);
+		setId(id);
+		if (displayName == null)
+			displayName = '#' + id + '#';
+		setDisplayName(displayName);
+		// create some suitable defaults for convenience
+		setDescription("Description of " + getDisplayName() + " Type");
+		setLocalName(id);
+		setLocalNamespace("local");
+		setQueryName(id);
+		setIsControllableAcl(false);
+		setIsControllablePolicy(false);
+		setIsCreatable(true);
+		setIsFileable(true);
+		setIsFulltextIndexed(false);
+		setIsIncludedInSupertypeQuery(true);
+		setIsQueryable(false);
+
+		// relationship specifics
+		setAllowedSourceTypes(null);
+		setAllowedTargetTypes(null);
+
+		// set base properties
+		Map<String, PropertyDefinition<?>> props = new HashMap<String, PropertyDefinition<?>>();
+		setPropertyDefinitions(props); // set initial empty set of properties
+	}
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java Fri Apr 16 14:00:23 2010
@@ -66,209 +66,208 @@ import org.apache.commons.logging.LogFac
  */
 
 public class PropertyCreationHelper {
-  private static Log log = LogFactory.getLog(PropertyCreationHelper.class);
-  
-  public static PropertyBooleanDefinitionImpl createBooleanDefinition(String id, String displayName) {    
-    PropertyBooleanDefinitionImpl prop = new PropertyBooleanDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.BOOLEAN, displayName, Cardinality.SINGLE);    
-    return prop;
-  }
-
-  public static PropertyBooleanDefinitionImpl createBooleanMultiDefinition(String id, String displayName) {
-    PropertyBooleanDefinitionImpl prop = new PropertyBooleanDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.BOOLEAN, displayName, Cardinality.MULTI);
-    return prop;
-  }
-  
-  public static PropertyDateTimeDefinitionImpl createDateTimeDefinition(String id, String displayName) {    
-    PropertyDateTimeDefinitionImpl prop = new PropertyDateTimeDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.DATETIME, displayName, Cardinality.SINGLE);    
-    return prop;
-  }
-
-  public static PropertyDateTimeDefinitionImpl createDateTimeMultiDefinition(String id, String displayName) {
-    PropertyDateTimeDefinitionImpl prop = new PropertyDateTimeDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.DATETIME, displayName, Cardinality.MULTI);
-    return prop;
-  }
-  
-  public static PropertyDecimalDefinitionImpl createDecimalDefinition(String id, String displayName) {    
-    PropertyDecimalDefinitionImpl prop = new PropertyDecimalDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.DECIMAL, displayName, Cardinality.SINGLE);    
-    return prop;
-  }
-
-  public static PropertyDecimalDefinitionImpl createDecimalMultiDefinition(String id, String displayName) {
-    PropertyDecimalDefinitionImpl prop = new PropertyDecimalDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.DECIMAL, displayName, Cardinality.MULTI);
-    return prop;
-  }
-  
-  public static PropertyHtmlDefinitionImpl createHtmlDefinition(String id, String displayName) {    
-    PropertyHtmlDefinitionImpl prop = new PropertyHtmlDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.HTML, displayName, Cardinality.SINGLE);    
-    return prop;
-  }
-
-  public static PropertyHtmlDefinitionImpl createHtmlMultiDefinition(String id, String displayName) {
-    PropertyHtmlDefinitionImpl prop = new PropertyHtmlDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.HTML, displayName, Cardinality.MULTI);
-    return prop;
-  }
-
-  public static PropertyIdDefinitionImpl createIdDefinition(String id, String displayName) {    
-    PropertyIdDefinitionImpl prop = new PropertyIdDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.ID, displayName, Cardinality.SINGLE);    
-    return prop;
-  }
-
-  public static PropertyIdDefinitionImpl createIdMultiDefinition(String id, String displayName) {
-    PropertyIdDefinitionImpl prop = new PropertyIdDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.ID, displayName, Cardinality.MULTI);
-    return prop;
-  }
-
-  public static PropertyIntegerDefinitionImpl createIntegerDefinition(String id, String displayName) {    
-    PropertyIntegerDefinitionImpl prop = new PropertyIntegerDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.INTEGER, displayName, Cardinality.SINGLE);    
-    return prop;
-  }
-
-  public static PropertyIntegerDefinitionImpl createIntegerMultiDefinition(String id, String displayName) {
-    PropertyIntegerDefinitionImpl prop = new PropertyIntegerDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.INTEGER, displayName, Cardinality.MULTI);
-    return prop;
-  }
-  
-  public static PropertyStringDefinitionImpl createStringDefinition(String id, String displayName) {    
-    PropertyStringDefinitionImpl prop = new PropertyStringDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.STRING, displayName, Cardinality.SINGLE);    
-    return prop;
-  }
-
-  public static PropertyStringDefinitionImpl createStringMultiDefinition(String id, String displayName) {
-    PropertyStringDefinitionImpl prop = new PropertyStringDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.STRING, displayName, Cardinality.MULTI);
-    return prop;
-  }
-
-  public static PropertyUriDefinitionImpl createUriDefinition(String id, String displayName) {    
-    PropertyUriDefinitionImpl prop = new PropertyUriDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.URI, displayName, Cardinality.SINGLE);    
-    return prop;
-  }
-
-  public static PropertyUriDefinitionImpl createUriMultiDefinition(String id, String displayName) {
-    PropertyUriDefinitionImpl prop = new PropertyUriDefinitionImpl();
-    createStandardDefinition(prop, id, PropertyType.URI, displayName, Cardinality.MULTI);
-    return prop;
-  }
-  
-  
-    public static<T> void  addElemToPicklist(AbstractPropertyDefinition<T> prop, T value) {
-      List<Choice<T>> choiceList = prop.getChoices();
-      if (choiceList == null)
-        choiceList = new ArrayList<Choice<T>>();
-
-      ChoiceImpl<T> elem = new ChoiceImpl<T>();
-      elem.setValue( Collections.singletonList(value));
-      choiceList.add(elem);
-    }    
-    
-    public static<T> void setDefaultValue(AbstractPropertyDefinition<T> prop , T defVal) {
-      prop.setDefaultValue(Collections.singletonList(defVal));
-    }    
-
-  
-  // internal helpers
-  private static void createStandardDefinition(AbstractPropertyDefinition<?> prop,
-      String id, PropertyType propType, String displayName, Cardinality card) {
-
-    if (!NameValidator.isValidId(id))
-      if (!NameValidator.isValidId(id))
-        throw new CmisInvalidArgumentException(NameValidator.ERROR_ILLEGAL_NAME);
-
-    prop.setId(id);
-    if (displayName == null)
-      prop.setDisplayName("Sample " + prop.getId() + " boolean property");
-    else
-      prop.setDisplayName(displayName);
-    prop.setLocalName(id);
-    prop.setLocalNamespace("local");
-    prop.setQueryName(id);
-    prop.setIsInherited(false);
-    prop.setCardinality(card);
-    prop.setIsOpenChoice(false);
-    prop.setIsQueryable(true);
-    prop.setIsRequired(false);
-    prop.setPropertyType(propType);
-    prop.setUpdatability(Updatability.READWRITE);
-  }
-  
-  public static Properties getPropertiesFromObject(String repositoryId, StoredObject so,
-      StoreManager storeManager, List<String> requestedIds) {
-    // build properties collection 
-    
-	  BindingsObjectFactory objectFactory = storeManager.getObjectFactory();
-    Map<String, PropertyData<?>> properties = new HashMap<String, PropertyData<?>>();
-    so.fillProperties(properties, objectFactory, requestedIds);
-
-    String typeId = so.getTypeId();
-      // (String) props.getProperties().get(PropertyIds.CMIS_OBJECT_TYPE_ID).getFirstValue();
-    if (FilterParser.isContainedInFilter(PropertyIds.BASE_TYPE_ID, requestedIds)) {
-      TypeDefinitionContainer typeDefC = storeManager.getTypeById(repositoryId, typeId);
-      if (typeDefC == null) {
-        log.warn("getPropertiesFromObject(), cannot get type definition, a type with id " + typeId
-            + " is unknown");
-      } else {
-        TypeDefinition typeDef = typeDefC.getTypeDefinition();
-        String baseTypeId = typeDef.getBaseTypeId().value();
-        properties.put(PropertyIds.BASE_TYPE_ID, objectFactory.createPropertyIdData(PropertyIds.BASE_TYPE_ID, baseTypeId));
-      }
-    }   
-    List<PropertyData<?>> propertiesList = new ArrayList<PropertyData<?>> (properties.values());
-    Properties props = objectFactory.createPropertiesData(propertiesList);
-    return props;    
-  }
-  
-  public static ObjectData getObjectData(StoreManager sm, StoredObject so, String filter,
-      Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-      String renditionFilter, Boolean includePolicyIds, Boolean includeACL, ExtensionsData extension) {
-
-    ObjectDataImpl od = new ObjectDataImpl();
-
-    if (so == null)
-      throw new CmisObjectNotFoundException("Illegal object id: null");
-
-    // build properties collection
-    List<String> requestedIds = FilterParser.getRequestedIdsFromFilter(filter);
-    Properties props = getPropertiesFromObject(so.getRepositoryId(), so,
-        sm, requestedIds);
-
-    // fill output object
-    if (null != includeAllowableActions && includeAllowableActions) {
-      ObjectStore objectStore = sm.getObjectStore(so.getRepositoryId());
-      AllowableActions allowableActions = DataObjectCreator.fillAllowableActions(objectStore, so);
-      od.setAllowableActions(allowableActions);
-    }
-    if (null != includeACL && includeACL)
-      od.setAcl(null);
-    od.setIsExactAcl(true);
-
-    if (null != includePolicyIds && includePolicyIds)
-      od.setPolicyIds(DataObjectCreator.fillPolicyIds(so));
-
-    if (null != includeRelationships && includeRelationships != IncludeRelationships.NONE)
-      od.setRelationships(DataObjectCreator.fillRelationships(includeRelationships, so));
-
-    if (renditionFilter != null && renditionFilter.length() > 0)
-      od.setRenditions(DataObjectCreator.fillRenditions(so));
-
-    od.setProperties(props);
-
-    // Note: do not set change event info for this call
-    log.debug("stop getObject()");
-    return od;
-  }
-  
+	private static Log log = LogFactory.getLog(PropertyCreationHelper.class);
+
+	public static PropertyBooleanDefinitionImpl createBooleanDefinition(String id, String displayName) {
+		PropertyBooleanDefinitionImpl prop = new PropertyBooleanDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.BOOLEAN, displayName, Cardinality.SINGLE);
+		return prop;
+	}
+
+	public static PropertyBooleanDefinitionImpl createBooleanMultiDefinition(String id, String displayName) {
+		PropertyBooleanDefinitionImpl prop = new PropertyBooleanDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.BOOLEAN, displayName, Cardinality.MULTI);
+		return prop;
+	}
+
+	public static PropertyDateTimeDefinitionImpl createDateTimeDefinition(String id, String displayName) {
+		PropertyDateTimeDefinitionImpl prop = new PropertyDateTimeDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.DATETIME, displayName, Cardinality.SINGLE);
+		return prop;
+	}
+
+	public static PropertyDateTimeDefinitionImpl createDateTimeMultiDefinition(String id, String displayName) {
+		PropertyDateTimeDefinitionImpl prop = new PropertyDateTimeDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.DATETIME, displayName, Cardinality.MULTI);
+		return prop;
+	}
+
+	public static PropertyDecimalDefinitionImpl createDecimalDefinition(String id, String displayName) {
+		PropertyDecimalDefinitionImpl prop = new PropertyDecimalDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.DECIMAL, displayName, Cardinality.SINGLE);
+		return prop;
+	}
+
+	public static PropertyDecimalDefinitionImpl createDecimalMultiDefinition(String id, String displayName) {
+		PropertyDecimalDefinitionImpl prop = new PropertyDecimalDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.DECIMAL, displayName, Cardinality.MULTI);
+		return prop;
+	}
+
+	public static PropertyHtmlDefinitionImpl createHtmlDefinition(String id, String displayName) {
+		PropertyHtmlDefinitionImpl prop = new PropertyHtmlDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.HTML, displayName, Cardinality.SINGLE);
+		return prop;
+	}
+
+	public static PropertyHtmlDefinitionImpl createHtmlMultiDefinition(String id, String displayName) {
+		PropertyHtmlDefinitionImpl prop = new PropertyHtmlDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.HTML, displayName, Cardinality.MULTI);
+		return prop;
+	}
+
+	public static PropertyIdDefinitionImpl createIdDefinition(String id, String displayName) {
+		PropertyIdDefinitionImpl prop = new PropertyIdDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.ID, displayName, Cardinality.SINGLE);
+		return prop;
+	}
+
+	public static PropertyIdDefinitionImpl createIdMultiDefinition(String id, String displayName) {
+		PropertyIdDefinitionImpl prop = new PropertyIdDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.ID, displayName, Cardinality.MULTI);
+		return prop;
+	}
+
+	public static PropertyIntegerDefinitionImpl createIntegerDefinition(String id, String displayName) {
+		PropertyIntegerDefinitionImpl prop = new PropertyIntegerDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.INTEGER, displayName, Cardinality.SINGLE);
+		return prop;
+	}
+
+	public static PropertyIntegerDefinitionImpl createIntegerMultiDefinition(String id, String displayName) {
+		PropertyIntegerDefinitionImpl prop = new PropertyIntegerDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.INTEGER, displayName, Cardinality.MULTI);
+		return prop;
+	}
+
+	public static PropertyStringDefinitionImpl createStringDefinition(String id, String displayName) {
+		PropertyStringDefinitionImpl prop = new PropertyStringDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.STRING, displayName, Cardinality.SINGLE);
+		return prop;
+	}
+
+	public static PropertyStringDefinitionImpl createStringMultiDefinition(String id, String displayName) {
+		PropertyStringDefinitionImpl prop = new PropertyStringDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.STRING, displayName, Cardinality.MULTI);
+		return prop;
+	}
+
+	public static PropertyUriDefinitionImpl createUriDefinition(String id, String displayName) {
+		PropertyUriDefinitionImpl prop = new PropertyUriDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.URI, displayName, Cardinality.SINGLE);
+		return prop;
+	}
+
+	public static PropertyUriDefinitionImpl createUriMultiDefinition(String id, String displayName) {
+		PropertyUriDefinitionImpl prop = new PropertyUriDefinitionImpl();
+		createStandardDefinition(prop, id, PropertyType.URI, displayName, Cardinality.MULTI);
+		return prop;
+	}
+
+	public static <T> void addElemToPicklist(AbstractPropertyDefinition<T> prop, T value) {
+		List<Choice<T>> choiceList = prop.getChoices();
+		if (choiceList == null)
+			choiceList = new ArrayList<Choice<T>>();
+
+		ChoiceImpl<T> elem = new ChoiceImpl<T>();
+		elem.setValue(Collections.singletonList(value));
+		choiceList.add(elem);
+	}
+
+	public static <T> void setDefaultValue(AbstractPropertyDefinition<T> prop, T defVal) {
+		prop.setDefaultValue(Collections.singletonList(defVal));
+	}
+
+	// internal helpers
+	private static void createStandardDefinition(AbstractPropertyDefinition<?> prop, String id, PropertyType propType,
+			String displayName, Cardinality card) {
+
+		if (!NameValidator.isValidId(id))
+			if (!NameValidator.isValidId(id))
+				throw new CmisInvalidArgumentException(NameValidator.ERROR_ILLEGAL_NAME);
+
+		prop.setId(id);
+		if (displayName == null)
+			prop.setDisplayName("Sample " + prop.getId() + " boolean property");
+		else
+			prop.setDisplayName(displayName);
+		prop.setLocalName(id);
+		prop.setLocalNamespace("local");
+		prop.setQueryName(id);
+		prop.setIsInherited(false);
+		prop.setCardinality(card);
+		prop.setIsOpenChoice(false);
+		prop.setIsQueryable(true);
+		prop.setIsRequired(false);
+		prop.setPropertyType(propType);
+		prop.setUpdatability(Updatability.READWRITE);
+	}
+
+	public static Properties getPropertiesFromObject(String repositoryId, StoredObject so, StoreManager storeManager,
+			List<String> requestedIds) {
+		// build properties collection
+
+		BindingsObjectFactory objectFactory = storeManager.getObjectFactory();
+		Map<String, PropertyData<?>> properties = new HashMap<String, PropertyData<?>>();
+		so.fillProperties(properties, objectFactory, requestedIds);
+
+		String typeId = so.getTypeId();
+		// (String) props.getProperties().get(PropertyIds.CMIS_OBJECT_TYPE_ID).
+		// getFirstValue();
+		if (FilterParser.isContainedInFilter(PropertyIds.BASE_TYPE_ID, requestedIds)) {
+			TypeDefinitionContainer typeDefC = storeManager.getTypeById(repositoryId, typeId);
+			if (typeDefC == null) {
+				log.warn("getPropertiesFromObject(), cannot get type definition, a type with id " + typeId
+						+ " is unknown");
+			} else {
+				TypeDefinition typeDef = typeDefC.getTypeDefinition();
+				String baseTypeId = typeDef.getBaseTypeId().value();
+				properties.put(PropertyIds.BASE_TYPE_ID, objectFactory.createPropertyIdData(PropertyIds.BASE_TYPE_ID,
+						baseTypeId));
+			}
+		}
+		List<PropertyData<?>> propertiesList = new ArrayList<PropertyData<?>>(properties.values());
+		Properties props = objectFactory.createPropertiesData(propertiesList);
+		return props;
+	}
+
+	public static ObjectData getObjectData(StoreManager sm, StoredObject so, String filter,
+			Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+			Boolean includePolicyIds, Boolean includeACL, ExtensionsData extension) {
+
+		ObjectDataImpl od = new ObjectDataImpl();
+
+		if (so == null)
+			throw new CmisObjectNotFoundException("Illegal object id: null");
+
+		// build properties collection
+		List<String> requestedIds = FilterParser.getRequestedIdsFromFilter(filter);
+		Properties props = getPropertiesFromObject(so.getRepositoryId(), so, sm, requestedIds);
+
+		// fill output object
+		if (null != includeAllowableActions && includeAllowableActions) {
+			ObjectStore objectStore = sm.getObjectStore(so.getRepositoryId());
+			AllowableActions allowableActions = DataObjectCreator.fillAllowableActions(objectStore, so);
+			od.setAllowableActions(allowableActions);
+		}
+		if (null != includeACL && includeACL)
+			od.setAcl(null);
+		od.setIsExactAcl(true);
+
+		if (null != includePolicyIds && includePolicyIds)
+			od.setPolicyIds(DataObjectCreator.fillPolicyIds(so));
+
+		if (null != includeRelationships && includeRelationships != IncludeRelationships.NONE)
+			od.setRelationships(DataObjectCreator.fillRelationships(includeRelationships, so));
+
+		if (renditionFilter != null && renditionFilter.length() > 0)
+			od.setRenditions(DataObjectCreator.fillRenditions(so));
+
+		od.setProperties(props);
+
+		// Note: do not set change event info for this call
+		log.debug("stop getObject()");
+		return od;
+	}
+
 }



Mime
View raw message