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

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


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


        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.debug(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

    public static <T> T getProperty(ObjectData object, String name, Class<T> clazz) {
        if (object == null) {
            return null;
        }

        Properties propData = object.getProperties();
        if (propData == null) {
            return null;
        }

        Map<String, PropertyData<?>> properties = propData.getProperties();
        if (properties == null) {
            return null;
        }

        PropertyData<?> property = properties.get(name);
View Full Code Here

    }

    void copyFilteredProperties(String repositoryId, StoredObject so, String filter, ObjectDataImpl objData) {
        List<String> requestedIds = FilterParser.getRequestedIdsFromFilter(filter);
        TypeDefinition td = fStoreManager.getTypeById(repositoryId, so.getTypeId()).getTypeDefinition();
        Properties props = PropertyCreationHelper.getPropertiesFromObject(so, td, requestedIds, true);
        objData.setProperties(props);
    }
View Full Code Here

        ExtensionsData extension = null;

        List<PropertyData<?>> properties = new ArrayList<PropertyData<?>>();
        properties.add(objFactory.createPropertyIdData(PropertyIds.NAME, name));
        properties.add(objFactory.createPropertyIdData(PropertyIds.OBJECT_TYPE_ID, typeId));
        Properties props = objFactory.createPropertiesData(properties);

        contentStream = createContent();

        String id = null;
        id = objSvc.createDocument(repositoryId, props, folderId, contentStream, versioningState, policies, addACEs,
View Full Code Here

    private void updateProperties(String id, String propertyId, String propertyValue) {
        LOG.debug("updateProperties " + id);
        List<PropertyData<?>> properties = new ArrayList<PropertyData<?>>();
        properties.add(objFactory.createPropertyStringData(propertyId, propertyValue));
        Properties newProps = objFactory.createPropertiesData(properties);

        Holder<String> idHolder = new Holder<String>(id);
        Holder<String> changeTokenHolder = new Holder<String>();
        objSvc.updateProperties(repositoryId, idHolder, changeTokenHolder, newProps, null);
        renameFiles("updateProperties");
View Full Code Here

    private void checkIn(String id, boolean major, String checkinComment) {
        LOG.debug("checkIn()");
        List<PropertyData<?>> properties = new ArrayList<PropertyData<?>>();
        properties.add(objFactory.createPropertyStringData(VERSIONED_PROP, "updated value"));
        Properties newProps = objFactory.createPropertiesData(properties);

        Holder<String> idHolder = new Holder<String>(id);
        verSvc.checkIn(repositoryId, idHolder, major /*major*/, newProps /*properties*/, null /*content*/,
                checkinComment, null/*policies*/, null/*addAcl*/, null /*removeAcl*/, null /*extension*/);
        renameFiles("checkIn");
View Full Code Here

        if (fillOptionalPropertyData) { // add query name, local name, display
                                        // name
            fillOptionalPropertyData(td, propertiesList);
        }

        Properties props = objectFactory.createPropertiesData(propertiesList);
        return props;
    }
View Full Code Here

            PropertyInteger pi = objFactory.createPropertyIntegerData(funcEntry.getValue(), BigInteger.valueOf(100));
            // fixed dummy value
            mappedProperties.put(funcEntry.getKey(), pi);
        }

        Properties props = new PropertiesImpl(mappedProperties.values());
        return props;
    }
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.