Package org.apache.chemistry.opencmis.inmemory.types

Examples of org.apache.chemistry.opencmis.inmemory.types.InMemorySecondaryTypeDefinition


        }
       
        private static InMemorySecondaryTypeDefinition createSecondaryType() {
            //CMIS 1.1 create an item item type

            InMemorySecondaryTypeDefinition cmisSecondaryType = new InMemorySecondaryTypeDefinition(TEST_SECONDARY_TYPE_ID,
                    "MySecondaryType");
            // create a single String property definition

            Map<String, PropertyDefinition<?>> propertyDefinitions = new HashMap<String, PropertyDefinition<?>>();
            propertyDefinitions = new HashMap<String, PropertyDefinition<?>>();
            PropertyStringDefinitionImpl prop1 = PropertyCreationHelper.createStringDefinition(SECONDARY_STRING_PROP,
                    "Secondary String Property", Updatability.READWRITE);
            propertyDefinitions.put(prop1.getId(), prop1);
            PropertyIntegerDefinitionImpl prop2 = PropertyCreationHelper.createIntegerDefinition(SECONDARY_INTEGER_PROP,
                    "Secondary Integer Property", Updatability.READWRITE);
            prop2.setIsRequired(true);
            propertyDefinitions.put(prop2.getId(), prop2);
            cmisSecondaryType.addCustomPropertyDefinitions(propertyDefinitions);

            return cmisSecondaryType;           
        }
View Full Code Here


            "Sample Folder String Property", Updatability.READONLY);
        propertyDefinitions.put(prop7.getId(), prop7);
        cmisFolderType.addCustomPropertyDefinitions(propertyDefinitions);

        // CMIS 1.1 create a secondary type
        InMemorySecondaryTypeDefinition cmisSecondaryType = new InMemorySecondaryTypeDefinition(SECONDARY_TYPE,
                "MySecondaryType");
        // create a single String property definition
        propertyDefinitions = new HashMap<String, PropertyDefinition<?>>();
        propertyDefinitions = new HashMap<String, PropertyDefinition<?>>();
        PropertyStringDefinitionImpl propStr = PropertyCreationHelper.createStringDefinition(SECONDARY_STRING_PROP,
                "Secondary String Property", Updatability.READWRITE);
        propertyDefinitions.put(propStr.getId(), propStr);
        PropertyIntegerDefinitionImpl propInt = PropertyCreationHelper.createIntegerDefinition(SECONDARY_INTEGER_PROP,
                "Secondary Integer Property", Updatability.READWRITE);
        propInt.setIsRequired(true);
        propertyDefinitions.put(propInt.getId(), propInt);
        cmisSecondaryType.addCustomPropertyDefinitions(propertyDefinitions);


        // add type to types collection
        typesList.add(cmisDocTypeTopLevel);
        typesList.add(cmisDocTypeLevel1);
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.inmemory.types.InMemorySecondaryTypeDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.