Package org.apache.chemistry.opencmis.commons.data

Examples of org.apache.chemistry.opencmis.commons.data.Properties


        properties.add(fFactory.createPropertyIdData(PropertyIds.OBJECT_TYPE_ID, fDocTypeId));
        // Generate some property values for custom attributes
        for (String stringPropId : fStringPropertyIdsToSetForDocument) {
            properties.add(fFactory.createPropertyStringData(stringPropId, generateStringPropValueDoc()));
        }
        Properties props = fFactory.createPropertiesData(properties);
        return props;
    }
View Full Code Here


        log.info(prefix + "found object id " + object.getId());
        Map<String, PropertyData<?>> propMap;
        if (mustFetchProperties) {
            String objId = (String) object.getProperties().getProperties().get(PropertyIds.OBJECT_ID).getFirstValue();
            Properties props = fObjSvc.getProperties(fRepositoryId, objId, propertyFilter, null);
            propMap = props.getProperties();
        } else {
            propMap = object.getProperties().getProperties();
        }
        StringBuilder valueStr = new StringBuilder("[");
        for (Map.Entry<String, PropertyData<?>> entry : propMap.entrySet()) {
View Full Code Here

    private void renameDocumentAndCheckResult(String docId) {
        Holder<String> idHolder = new Holder<String>(docId);
        List<PropertyData<?>> properties = new ArrayList<PropertyData<?>>();
        properties.add(fFactory.createPropertyIdData(PropertyIds.NAME, RENAMED_DOC_NAME));
        Properties newProps = fFactory.createPropertiesData(properties);
        Holder<String> changeTokenHolder = new Holder<String>();
        fObjSvc.updateProperties(fRepositoryId, idHolder, changeTokenHolder, newProps, null);
        docId = idHolder.getValue();
        ObjectData res = fObjSvc.getObject(fRepositoryId, docId, "*", false, IncludeRelationships.NONE, null, false,
                false, null);
View Full Code Here

        String objectId = (String) context.get(CONTEXT_OBJECT_ID);
        ReturnVersion returnVersion = getEnumParameter(request, PARAM_RETURN_VERSION, ReturnVersion.class);
        String filter = getStringParameter(request, PARAM_FILTER);

        // execute
        Properties properties;

        if (returnVersion == ReturnVersion.LATEST || returnVersion == ReturnVersion.LASTESTMAJOR) {
            properties = service.getPropertiesOfLatestVersion(repositoryId, objectId, null,
                    returnVersion == ReturnVersion.LASTESTMAJOR, filter, null);
        } else {
View Full Code Here

        }

        // build properties collection
        List<String> requestedIds = FilterParser.getRequestedIdsFromFilter("*");

        Properties existingProps = PropertyCreationHelper.getPropertiesFromObject(so, td, requestedIds, true);

        PropertiesImpl newPD = new PropertiesImpl();
        // copy all existing properties
        for (PropertyData<?> prop : existingProps.getProperties().values()) {
            newPD.addProperty(prop);
        }

        if (null != properties)
            // overwrite all new properties
View Full Code Here

        }

        // build properties collection
        List<String> requestedIds = FilterParser.getRequestedIdsFromFilter(filter);
        TypeDefinition td = fStoreManager.getTypeById(repositoryId, so.getTypeId()).getTypeDefinition();
        Properties props = PropertyCreationHelper.getPropertiesFromObject(so, td, requestedIds, true);
        LOG.debug("stop getProperties()");
        return props;
    }
View Full Code Here

        }

        List<String> requestedIds = FilterParser.getRequestedIdsFromFilter(filter);

        TypeDefinition td = fStoreManager.getTypeById(repositoryId, latestVersionObject.getTypeId()).getTypeDefinition();
        Properties props = PropertyCreationHelper.getPropertiesFromObject(latestVersionObject, td,
                requestedIds, true);

        return props;
    }
View Full Code Here

        }

        log.debug(" create folder for parent id: " + parentId + ", in level " + level + ", max levels " + levels);

        for (int i = 0; i < childrenPerLevel; i++) {
            Properties props = createFolderProperties(i, level);
            try {
                fTimeLoggerCreateFolder.start();
                id = fObjSvc.createFolder(fRepositoryId, props, parentId, null, null, null, null);
                if (level == 0) {
                    fTopLevelFoldersCreated.add(id);
View Full Code Here

            }
        }
    }

    private String createFolder(String parentId) {
        Properties props = createFolderProperties(0, 0);
        String id = null;
        try {
            fTimeLoggerCreateFolder.start();
            id = fObjSvc.createFolder(fRepositoryId, props, parentId, null, null, null, null);
            fTopLevelFoldersCreated.add(id);
View Full Code Here

        Acl addACEs = null;
        Acl removeACEs = null;
        ExtensionsData extension = null;

        log.debug("create document in folder " + folderId);
        Properties props = createDocumentProperties(no, level);
        String id = null;
       
        if (fContentSizeInK > 0) {
            switch (fContentKind) {
            case StaticText:
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.data.Properties

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.