Package org.apache.chemistry.opencmis.commons.impl.dataobjects

Examples of org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyIntegerDefinitionImpl


            PropertyStringDefinitionImpl prop = PropertyCreationHelper.createStringDefinition(
                    TEST_DOCUMENT_MY_SUB_STRING_PROP_ID, "Subtype String Property", Updatability.READWRITE);
            prop.setIsRequired(false);
            propertyDefinitions.put(prop.getId(), prop);

            PropertyIntegerDefinitionImpl prop2 = PropertyCreationHelper.createIntegerDefinition(
                    TEST_DOCUMENT_MY_SUB_INT_PROP_ID, "Subtype", Updatability.READWRITE);
            prop2.setIsRequired(true);
            propertyDefinitions.put(prop2.getId(), prop2);
            cmisDocumentType.addCustomPropertyDefinitions(propertyDefinitions);
            return cmisDocumentType;
        }
View Full Code Here


            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_DOCUMENT_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_DOCUMENT_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);

            cmisDocumentType.addCustomPropertyDefinitions(propertyDefinitions);

            return cmisDocumentType;
        }
View Full Code Here

            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;
        }
View Full Code Here

                "CMIS Checkin Comment Property", Updatability.READONLY);
        // 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", Updatability.READONLY);
        propertyDefinitions.put(propI.getId(), propI);

        propS = PropertyCreationHelper.createStringDefinition(PropertyIds.CONTENT_STREAM_MIME_TYPE,
                "CMIS Content Stream Mime Type Property", Updatability.READONLY);
        propertyDefinitions.put(propS.getId(), propS);
View Full Code Here

        createStandardDefinition(prop, id, PropertyType.ID, displayName, Cardinality.MULTI, upd);
        return prop;
    }

    public static PropertyIntegerDefinitionImpl createIntegerDefinition(String id, String displayName, Updatability upd) {
        PropertyIntegerDefinitionImpl prop = new PropertyIntegerDefinitionImpl();
        createStandardDefinition(prop, id, PropertyType.INTEGER, displayName, Cardinality.SINGLE, upd);
        return prop;
    }
View Full Code Here

        return prop;
    }

    public static PropertyIntegerDefinitionImpl createIntegerMultiDefinition(String id, String displayName,
            Updatability upd) {
        PropertyIntegerDefinitionImpl prop = new PropertyIntegerDefinitionImpl();
        createStandardDefinition(prop, id, PropertyType.INTEGER, displayName, Cardinality.MULTI, upd);
        return prop;
    }
View Full Code Here

            result = new PropertyBooleanDefinitionImpl();
            ((PropertyBooleanDefinitionImpl) result).setChoices(convertChoicesBoolean(json
                    .get(JSON_PROPERTY_TYPE_CHOICE)));
            break;
        case INTEGER:
            result = new PropertyIntegerDefinitionImpl();
            ((PropertyIntegerDefinitionImpl) result).setMinValue(getInteger(json, JSON_PROPERTY_TYPE_MIN_VALUE));
            ((PropertyIntegerDefinitionImpl) result).setMaxValue(getInteger(json, JSON_PROPERTY_TYPE_MAX_VALUE));
            ((PropertyIntegerDefinitionImpl) result).setChoices(convertChoicesInteger(json
                    .get(JSON_PROPERTY_TYPE_CHOICE)));
            break;
View Full Code Here

            CmisPropertyId prop = ((CmisPropertyIdDefinitionType) propertyDefinition).getDefaultValue();
            if (prop != null) {
                ((PropertyIdDefinitionImpl) result).setDefaultValue(prop.getValue());
            }
        } else if (propertyDefinition instanceof CmisPropertyIntegerDefinitionType) {
            result = new PropertyIntegerDefinitionImpl();

            ((PropertyIntegerDefinitionImpl) result)
                    .setChoices(convertChoiceIntegerList(((CmisPropertyIntegerDefinitionType) propertyDefinition)
                            .getChoice()));
View Full Code Here

        createStandardDefinition(prop, id, PropertyType.ID, displayName, Cardinality.MULTI, upd);
        return prop;
    }

    public static PropertyIntegerDefinitionImpl createIntegerDefinition(String id, String displayName, Updatability upd) {
        PropertyIntegerDefinitionImpl prop = new PropertyIntegerDefinitionImpl();
        createStandardDefinition(prop, id, PropertyType.INTEGER, displayName, Cardinality.SINGLE, upd);
        return prop;
    }
View Full Code Here

        return prop;
    }

    public static PropertyIntegerDefinitionImpl createIntegerMultiDefinition(String id, String displayName,
            Updatability upd) {
        PropertyIntegerDefinitionImpl prop = new PropertyIntegerDefinitionImpl();
        createStandardDefinition(prop, id, PropertyType.INTEGER, displayName, Cardinality.MULTI, upd);
        return prop;
    }
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyIntegerDefinitionImpl

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.