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

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


        for (CmisObject object : objects) {
            if (object == null) {
                continue;
            }

            objectIdsAndChangeTokens.add(new BulkUpdateObjectIdAndChangeTokenImpl(object.getId(), object
                    .getChangeToken()));

            if (objectType == null) {
                objectType = object.getType();
            }
View Full Code Here


        String id = getString(json, JSON_BULK_UPDATE_ID);
        String newId = getString(json, JSON_BULK_UPDATE_NEW_ID);
        String changeToken = getString(json, JSON_BULK_UPDATE_CHANGE_TOKEN);

        BulkUpdateObjectIdAndChangeTokenImpl result = new BulkUpdateObjectIdAndChangeTokenImpl(id, newId, changeToken);

        convertExtension(json, result, BULK_UPDATE_KEYS);

        return result;
    }
View Full Code Here

        for (CmisObject object : objects) {
            if (object == null) {
                continue;
            }

            objectIdsAndChangeTokens.add(new BulkUpdateObjectIdAndChangeTokenImpl(object.getId(), object
                    .getChangeToken()));

            if (objectType == null) {
                objectType = object.getType();
            }
View Full Code Here

        int n = objectIds.size();
        for (int i = 0; i < n; i++) {
            String id = objectIds.get(i);
            String changeToken = (changeTokens != null && changeTokens.size() > i ? changeTokens.get(i) : null);
            objectIdAndChangeToken.add(new BulkUpdateObjectIdAndChangeTokenImpl(id, changeToken));
        }

        // get secondary type ids
        List<String> addSecondaryTypes = cp.getValues(Constants.CONTROL_ADD_SECONDARY_TYPE);
        List<String> removeSecondaryTypes = cp.getValues(Constants.CONTROL_REMOVE_SECONDARY_TYPE);
View Full Code Here

        String id = getString(json, JSON_BULK_UPDATE_ID);
        String newId = getString(json, JSON_BULK_UPDATE_NEW_ID);
        String changeToken = getString(json, JSON_BULK_UPDATE_CHANGE_TOKEN);

        BulkUpdateObjectIdAndChangeTokenImpl result = new BulkUpdateObjectIdAndChangeTokenImpl(id, newId, changeToken);

        convertExtension(json, result, BULK_UPDATE_KEYS);

        return result;
    }
View Full Code Here

        for (CmisObject object : objects) {
            if (object == null) {
                continue;
            }

            objectIdsAndChangeTokens.add(new BulkUpdateObjectIdAndChangeTokenImpl(object.getId(), object
                    .getChangeToken()));

            if (objectType == null) {
                objectType = object.getType();
            }
View Full Code Here

        String id = getString(json, JSON_BULK_UPDATE_ID);
        String newId = getString(json, JSON_BULK_UPDATE_NEW_ID);
        String changeToken = getString(json, JSON_BULK_UPDATE_CHANGE_TOKEN);

        BulkUpdateObjectIdAndChangeTokenImpl result = new BulkUpdateObjectIdAndChangeTokenImpl(id, newId, changeToken);

        convertExtension(json, result, BULK_UPDATE_KEYS);

        return result;
    }
View Full Code Here

    public static BulkUpdateObjectIdAndChangeToken convert(CmisObjectIdAndChangeTokenType objectIdAndChangeToken) {
        if (objectIdAndChangeToken == null) {
            return null;
        }

        BulkUpdateObjectIdAndChangeTokenImpl result = new BulkUpdateObjectIdAndChangeTokenImpl();

        result.setId(objectIdAndChangeToken.getId());
        result.setNewId(objectIdAndChangeToken.getNewId());
        result.setChangeToken(objectIdAndChangeToken.getChangeToken());

        // handle extensions
        convertExtension(objectIdAndChangeToken, result);

        return result;
View Full Code Here

            properties.add(fFactory.createPropertyIntegerData(TEST_DOCUMENT_MY_INT_PROP_ID, NEW_INT_PROP_VAL));
            Properties newProps = fFactory.createPropertiesData(properties);
            // wait some time to get a newer change token
           
            List<BulkUpdateObjectIdAndChangeToken> objs = new ArrayList<BulkUpdateObjectIdAndChangeToken>();
            objs.add(new BulkUpdateObjectIdAndChangeTokenImpl(id1, changeToken1));
            objs.add(new BulkUpdateObjectIdAndChangeTokenImpl(id2, changeToken2));

            List<BulkUpdateObjectIdAndChangeToken> newObjs;
            newObjs = fObjSvc.bulkUpdateProperties(fRepositoryId, objs, newProps, null, null, null);
            assertNotNull(newObjs);
            assertEquals(objs.size(), newObjs.size());
View Full Code Here

        for ( BulkUpdateObjectIdAndChangeToken obj: objectIdAndChangeToken) {
            Holder<String> objId = new Holder<String>(obj.getId());
            Holder<String> changeToken = new Holder<String>(obj.getChangeToken());
            try {
                updateProperties(context, repositoryId, objId, changeToken, properties, null, null, null);
                result.add(new BulkUpdateObjectIdAndChangeTokenImpl(obj.getId(), changeToken.getValue()));
            } catch (Exception e) {
                LOG.error("updating properties in bulk uapdate failed for object" + obj.getId() + ": ", e);
            }
        }
        return result;
View Full Code Here

TOP

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

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.