Package org.apache.chemistry.opencmis.commons.enums

Examples of org.apache.chemistry.opencmis.commons.enums.BaseTypeId


        List<String> propDefsRequired = getMandatoryPropDefs(typeDef.getPropertyDefinitions());

        if(properties != null) {
      for (PropertyData<?> prop : properties.getProperties().values()) {
        String propertyId = prop.getId();
        BaseTypeId baseTypeId = typeDef.getBaseTypeId();

        // check that all mandatory attributes are present
        if (checkMandatory && propDefsRequired.contains(propertyId)) {
          propDefsRequired.remove(propertyId);
        }
View Full Code Here


     */
    protected void compileProperties(PropertiesImpl properties, Set<String> filter, ObjectInfoImpl objectInfo)
            throws RepositoryException {

        String typeId = getTypeIdInternal();
        BaseTypeId baseTypeId = getBaseTypeId();

        objectInfo.setBaseType(baseTypeId);
        objectInfo.setTypeId(typeId);
        objectInfo.setHasAcl(false);
        objectInfo.setVersionSeriesId(getVersionSeriesId());
        objectInfo.setRelationshipSourceIds(null);
        objectInfo.setRelationshipTargetIds(null);
        objectInfo.setRenditionInfos(null);
        objectInfo.setSupportsPolicies(false);
        objectInfo.setSupportsRelationships(false);

        // id
        String objectId = getObjectId();
        addPropertyId(properties, typeId, filter, PropertyIds.OBJECT_ID, objectId);
        objectInfo.setId(objectId);

        // name
        String name = getNodeName();
        addPropertyString(properties, typeId, filter, PropertyIds.NAME, name);
        objectInfo.setName(name);

        // base type and type name
        addPropertyId(properties, typeId, filter, PropertyIds.BASE_TYPE_ID, baseTypeId.value());
        addPropertyId(properties, typeId, filter, PropertyIds.OBJECT_TYPE_ID, typeId);

        // created and modified by
        String createdBy = getCreatedBy();
        addPropertyString(properties, typeId, filter, PropertyIds.CREATED_BY, createdBy);
View Full Code Here

     */
    protected void compileProperties(PropertiesImpl properties, Set<String> filter, ObjectInfoImpl objectInfo)
            throws RepositoryException {

        String typeId = getTypeIdInternal();
        BaseTypeId baseTypeId = getBaseTypeId();

        objectInfo.setBaseType(baseTypeId);
        objectInfo.setTypeId(typeId);
        objectInfo.setHasAcl(false);
        objectInfo.setVersionSeriesId(getVersionSeriesId());
        objectInfo.setRelationshipSourceIds(null);
        objectInfo.setRelationshipTargetIds(null);
        objectInfo.setRenditionInfos(null);
        objectInfo.setSupportsPolicies(false);
        objectInfo.setSupportsRelationships(false);

        // id
        String objectId = getObjectId();
        addPropertyId(properties, typeId, filter, PropertyIds.OBJECT_ID, objectId);
        objectInfo.setId(objectId);

        // name
        String name = getNodeName();
        addPropertyString(properties, typeId, filter, PropertyIds.NAME, name);
        objectInfo.setName(name);

        // base type and type name
        addPropertyId(properties, typeId, filter, PropertyIds.BASE_TYPE_ID, baseTypeId.value());
        addPropertyId(properties, typeId, filter, PropertyIds.OBJECT_TYPE_ID, typeId);

        // created and modified by
        String createdBy = getCreatedBy();
        addPropertyString(properties, typeId, filter, PropertyIds.CREATED_BY, createdBy);
View Full Code Here

        TypeDefinitionContainer typeDefC = fStoreManager.getTypeById(repositoryId, typeId);
        if (typeDefC == null)
            throw new RuntimeException("Cannot create object, a type with id " + typeId + " is unknown");

        // check if the given type is a document type
        BaseTypeId typeBaseId = typeDefC.getTypeDefinition().getBaseTypeId();
        StoredObject so = null;
        String user = context.getUsername();
        if (typeBaseId.equals(InMemoryDocumentTypeDefinition.getRootDocumentType().getBaseTypeId())) {
            so = createDocumentIntern(repositoryId, properties, folderId, contentStream, versioningState, null, null,
                    null, null, user);
        } else if (typeBaseId.equals(InMemoryFolderTypeDefinition.getRootFolderType().getBaseTypeId())) {
            so = createFolderIntern(repositoryId, properties, folderId, null, null, null, null, user);
        } else if (typeBaseId.equals(InMemoryPolicyTypeDefinition.getRootPolicyType().getBaseTypeId())) {
            so = createPolicyIntern(repositoryId, properties, folderId, null, null, null, null);
        } else if (typeBaseId.equals(InMemoryRelationshipTypeDefinition.getRootRelationshipType().getBaseTypeId())) {
            so = createRelationshipIntern(repositoryId, properties, null, null, null, null);
        } else
            LOG.error("The type contains an unknown base object id, object can't be created");

        // Make a call to getObject to convert the resulting id into an
View Full Code Here

        if (typeDefC == null) {
            throw new CmisInvalidArgumentException("Cannot create object, a type with id " + typeId + " is unknown");
        }

        // check if the given type is a document type
        BaseTypeId typeBaseId = typeDefC.getTypeDefinition().getBaseTypeId();
        StoredObject so = null;
        if (typeBaseId.equals(InMemoryDocumentTypeDefinition.getRootDocumentType().getBaseTypeId())) {
            so = createDocumentIntern(context, repositoryId, properties, folderId, contentStream, versioningState, null, null,
                    null, null);
        } else if (typeBaseId.equals(InMemoryFolderTypeDefinition.getRootFolderType().getBaseTypeId())) {
            so = createFolderIntern(context, repositoryId, properties, folderId, null, null, null, null);
        } else if (typeBaseId.equals(InMemoryPolicyTypeDefinition.getRootPolicyType().getBaseTypeId())) {
            so = createPolicyIntern(context, repositoryId, properties, folderId, null, null, null, null);
        } else if (typeBaseId.equals(InMemoryRelationshipTypeDefinition.getRootRelationshipType().getBaseTypeId())) {
            so = createRelationshipIntern(context, repositoryId, properties, null, null, null, null);
        } else {
            LOG.error("The type contains an unknown base object id, object can't be created");
        }
View Full Code Here

        List<String> propDefsRequired = getMandatoryPropDefs(typeDef.getPropertyDefinitions());

        for (PropertyData<?> prop : properties.getProperties().values()) {
            String propertyId = prop.getId();
            BaseTypeId baseTypeId = typeDef.getBaseTypeId();

            // check that all mandatory attributes are present
            if (checkMandatory && propDefsRequired.contains(propertyId)) {
                propDefsRequired.remove(propertyId);
            }
View Full Code Here

    }

    // --- properties ---

    public ObjectType getBaseType() {
        BaseTypeId baseTypeId = getBaseTypeId();
        if (baseTypeId == null) {
            return null;
        }

        return getSession().getTypeDefinition(baseTypeId.value());
    }
View Full Code Here

                            request, response);
                } else if (callUrl == CallUrl.ROOT) {
                    // set default method if necessary
                    if (selector == null) {
                        try {
                            BaseTypeId basetype = BaseTypeId.fromValue((String) context
                                    .get(BrowserBindingUtils.CONTEXT_BASETYPE_ID));
                            switch (basetype) {
                            case CMIS_DOCUMENT:
                                selector = SELECTOR_CONTENT;
                                break;
View Full Code Here

    }

    // --- properties ---

    public ObjectType getBaseType() {
        BaseTypeId baseTypeId = getBaseTypeId();
        if (baseTypeId == null) {
            return null;
        }

        return getSession().getTypeDefinition(baseTypeId.value());
    }
View Full Code Here

        List<String> propDefsRequired = getMandatoryPropDefs(typeDef.getPropertyDefinitions());

        for (PropertyData<?> prop : properties.getProperties().values()) {
            String propertyId = prop.getId();
            BaseTypeId baseTypeId = typeDef.getBaseTypeId();

            if (isSystemProperty(baseTypeId, propertyId))
                continue; // ignore system properties for validation

            // Check if all properties are known in the type
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.enums.BaseTypeId

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.