return cmisDocumentType;
}
private static InMemoryFolderTypeDefinition createFolderTypeWithDefault() {
InMemoryFolderTypeDefinition cmisFolderType = new InMemoryFolderTypeDefinition(
TEST_FOLDER_TYPE_WITH_DEFAULTS_ID, "Folder Type With default values", InMemoryFolderTypeDefinition.
getRootFolderType());
Map<String, PropertyDefinition<?>> propertyDefinitions = new HashMap<String, PropertyDefinition<?>>();
PropertyStringDefinitionImpl prop = PropertyCreationHelper.createStringMultiDefinition(
TEST_FOLDER_MY_MULTI_STRING_PROP_ID, "Test Multi String Property", Updatability.READWRITE);
prop.setIsRequired(false);
List<String> defValS = new ArrayList<String>() {{ add("Apache"); add("CMIS"); }};
prop.setDefaultValue(defValS);
propertyDefinitions.put(prop.getId(), prop);
PropertyIntegerDefinitionImpl prop2 = PropertyCreationHelper.createIntegerDefinition(
TEST_FOLDER_MY_INT_PROP_ID, "Test Integer Property", Updatability.READWRITE);
prop2.setIsRequired(false);
List<BigInteger> defVal = new ArrayList<BigInteger>() {{ add(BigInteger.valueOf(100)); }};
prop2.setDefaultValue(defVal);
propertyDefinitions.put(prop2.getId(), prop2);
PropertyIntegerDefinitionImpl prop3 = PropertyCreationHelper.createIntegerDefinition(
TEST_FOLDER_MY_INT_PROP_ID_MANDATORY_DEFAULT, "Test Integer Property Mandatory default", Updatability.READWRITE);
prop3.setIsRequired(true);
List<BigInteger> defVal2 = new ArrayList<BigInteger>() {{ add(BigInteger.valueOf(100)); }};
prop3.setDefaultValue(defVal2);
propertyDefinitions.put(prop3.getId(), prop3);
cmisFolderType.addCustomPropertyDefinitions(propertyDefinitions);
return cmisFolderType;
}