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

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


        return prop;
    }

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


            throw new CmisRuntimeException("Invalid property type '" + id + "'! Cardinality not set!");
        }

        switch (propertyType) {
        case STRING:
            result = new PropertyStringDefinitionImpl();
            ((PropertyStringDefinitionImpl) result).setMaxLength(getInteger(json, JSON_PROPERTY_TYPE_MAX_LENGTH));
            ((PropertyStringDefinitionImpl) result)
                    .setChoices(convertChoicesString(json.get(JSON_PROPERTY_TYPE_CHOICE)));
            break;
        case ID:
View Full Code Here

        }

        AbstractPropertyDefinition<?> result = null;

        if (propertyDefinition instanceof CmisPropertyStringDefinitionType) {
            result = new PropertyStringDefinitionImpl();

            ((PropertyStringDefinitionImpl) result)
                    .setChoices(convertChoiceStringList(((CmisPropertyStringDefinitionType) propertyDefinition)
                            .getChoice()));
View Full Code Here

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

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

        return prop;
    }

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

        return typesList;
    }

    public static void setBasicPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {

        PropertyStringDefinitionImpl propS = PropertyCreationHelper.createStringDefinition(PropertyIds.NAME,
                "Name", Updatability.READWRITE);
        propS.setIsRequired(true);
        propertyDefinitions.put(propS.getId(), propS);

        PropertyIdDefinitionImpl propId = PropertyCreationHelper.createIdDefinition(PropertyIds.OBJECT_ID,
                "Object Id", Updatability.READONLY);
        propertyDefinitions.put(propId.getId(), propId);

        propId = PropertyCreationHelper.createIdDefinition(PropertyIds.OBJECT_TYPE_ID, "Type-Id", Updatability.ONCREATE);
        propId.setIsRequired(true);
        propertyDefinitions.put(propId.getId(), propId);

        propId = PropertyCreationHelper.createIdDefinition(PropertyIds.BASE_TYPE_ID, "Base-Type-Id", Updatability.READONLY);
        propertyDefinitions.put(propId.getId(), propId);

        propS = PropertyCreationHelper.createStringDefinition(PropertyIds.CREATED_BY, "Created By", Updatability.READONLY);
        propertyDefinitions.put(propS.getId(), propS);

        PropertyDateTimeDefinitionImpl propD = PropertyCreationHelper.createDateTimeDefinition(
                PropertyIds.CREATION_DATE, "Creation Date", Updatability.READONLY);
        propertyDefinitions.put(propD.getId(), propD);

        propS = PropertyCreationHelper.createStringDefinition(PropertyIds.LAST_MODIFIED_BY,
                "Modified By", Updatability.READONLY);
        propertyDefinitions.put(propS.getId(), propS);

        propD = PropertyCreationHelper.createDateTimeDefinition(PropertyIds.LAST_MODIFICATION_DATE,
                "Modification Date", Updatability.READONLY);
        propertyDefinitions.put(propD.getId(), propD);

        propS = PropertyCreationHelper.createStringDefinition(PropertyIds.CHANGE_TOKEN, "Change Token", Updatability.READONLY);
        propertyDefinitions.put(propS.getId(), propS);
    }
View Full Code Here

        propB = PropertyCreationHelper.createBooleanDefinition(PropertyIds.IS_LATEST_MAJOR_VERSION,
                "Is Latest Major Version", Updatability.READONLY);
        propertyDefinitions.put(propB.getId(), propB);

        PropertyStringDefinitionImpl propS = PropertyCreationHelper.createStringDefinition(PropertyIds.VERSION_LABEL,
                "Version Label", Updatability.READONLY);
        propertyDefinitions.put(propS.getId(), propS);

        PropertyIdDefinitionImpl propId = PropertyCreationHelper.createIdDefinition(PropertyIds.VERSION_SERIES_ID,
                "Version Series Id", Updatability.READONLY);
        propertyDefinitions.put(propId.getId(), propId);

        propB = PropertyCreationHelper.createBooleanDefinition(PropertyIds.IS_VERSION_SERIES_CHECKED_OUT,
                "Checked Out", Updatability.READONLY);
        propertyDefinitions.put(propB.getId(), propB);

        propS = PropertyCreationHelper.createStringDefinition(PropertyIds.VERSION_SERIES_CHECKED_OUT_BY,
                "Checked Out By", Updatability.READONLY);
        propertyDefinitions.put(propS.getId(), propS);

        propId = PropertyCreationHelper.createIdDefinition(PropertyIds.VERSION_SERIES_CHECKED_OUT_ID,
                "Checked Out Id", Updatability.READONLY);
        propertyDefinitions.put(propId.getId(), propId);

        propS = PropertyCreationHelper.createStringDefinition(PropertyIds.CHECKIN_COMMENT,
                "Checkin Comment", Updatability.READONLY);
        // read-only, because
        // not set as property
        propertyDefinitions.put(propS.getId(), propS);

        PropertyIntegerDefinitionImpl propI = PropertyCreationHelper.createIntegerDefinition(
                PropertyIds.CONTENT_STREAM_LENGTH, "Content Length", Updatability.READONLY);
        propertyDefinitions.put(propI.getId(), propI);

        propS = PropertyCreationHelper.createStringDefinition(PropertyIds.CONTENT_STREAM_MIME_TYPE,
                "Mime Type", Updatability.READONLY);
        propertyDefinitions.put(propS.getId(), propS);

        propS = PropertyCreationHelper.createStringDefinition(PropertyIds.CONTENT_STREAM_FILE_NAME,
                "File Name", Updatability.READONLY);
        propertyDefinitions.put(propS.getId(), propS);

        propId = PropertyCreationHelper.createIdDefinition(PropertyIds.CONTENT_STREAM_ID, "Stream Id", Updatability.READONLY);
        propertyDefinitions.put(propId.getId(), propId);

    }
View Full Code Here

        propId = PropertyCreationHelper.createIdDefinition(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS,
                "Allowed Child Types", Updatability.READONLY);
        propId.setCardinality(Cardinality.MULTI);
        propertyDefinitions.put(propId.getId(), propId);

        PropertyStringDefinitionImpl propS = PropertyCreationHelper.createStringDefinition(PropertyIds.PATH,
                "Path", Updatability.READONLY);
        propertyDefinitions.put(propS.getId(), propS);

    }
View Full Code Here

    }

    public static void setBasicPolicyPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {

        setBasicPropertyDefinitions(propertyDefinitions);
        PropertyStringDefinitionImpl propS = PropertyCreationHelper.createStringDefinition(PropertyIds.POLICY_TEXT,
                "Policy Text", Updatability.READONLY);
        propS.setIsRequired(true);
        propertyDefinitions.put(propS.getId(), propS);
    }
View Full Code Here

                break;
            case INTEGER:
                result = new PropertyIntegerDefinitionImpl();
                break;
            case STRING:
                result = new PropertyStringDefinitionImpl();
                break;
            case URI:
                result = new PropertyUriDefinitionImpl();
                break;
            default:
View Full Code Here

TOP

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

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.