org.apache.chemistry.opencmis.commons.data.BulkUpdateObjectIdAndChangeToken Java Examples

The following examples show how to use org.apache.chemistry.opencmis.commons.data.BulkUpdateObjectIdAndChangeToken. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConformanceCmisServiceWrapper.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * Throws an exception if the given list is {@code null} or empty or
 * invalid.
 */
protected void checkBulkUpdateList(List<BulkUpdateObjectIdAndChangeToken> list) {
    if (list == null) {
        throw new CmisInvalidArgumentException("Object Id list must be set!");
    }

    if (list.isEmpty()) {
        throw new CmisInvalidArgumentException("Object Id list must not be empty!");
    }

    for (BulkUpdateObjectIdAndChangeToken entry : list) {
        if (entry == null) {
            throw new CmisInvalidArgumentException("Object Id list has gaps!");
        }

        if (entry.getId() == null) {
            throw new CmisInvalidArgumentException("Object Id list contains an entry without ID!");
        }

        if (entry.getId().length() == 0) {
            throw new CmisInvalidArgumentException("Object Id list contains an entry with an empty ID!");
        }
    }
}
 
Example #2
Source File: AlfrescoCmisServiceImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
BulkEntry(BulkUpdateContext bulkUpdateContext, BulkUpdateObjectIdAndChangeToken objectIdAndChangeToken, Properties properties, List<String> addSecondaryTypeIds,
        List<String> removeSecondaryTypeIds, boolean isObjectInfoRequired)
{
    this.bulkUpdateContext = bulkUpdateContext;
    this.objectIdAndChangeToken = objectIdAndChangeToken;
    this.properties = properties;
    this.addSecondaryTypeIds = addSecondaryTypeIds;
    this.removeSecondaryTypeIds = removeSecondaryTypeIds;
    this.isObjectInfoRequired = isObjectInfoRequired;
}
 
Example #3
Source File: AlfrescoCmisServiceImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
List<BulkUpdateObjectIdAndChangeToken> getChanges()
        {
            List<BulkUpdateObjectIdAndChangeToken> changes = new ArrayList<BulkUpdateObjectIdAndChangeToken>(successes.size());
            for(CMISNodeInfo info : successes)
            {
                BulkUpdateObjectIdAndChangeTokenImpl a = new BulkUpdateObjectIdAndChangeTokenImpl();
                a.setId(info.getObjectId());
//              a.setNewId(info.getObjectId());
                changes.add(a);
            }

            return changes;
        }
 
Example #4
Source File: AbstractCmisServiceWrapper.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public List<BulkUpdateObjectIdAndChangeToken> bulkUpdateProperties(String repositoryId,
        List<BulkUpdateObjectIdAndChangeToken> objectIdsAndChangeTokens, Properties properties,
        List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds, ExtensionsData extension) {
    return service.bulkUpdateProperties(repositoryId, objectIdsAndChangeTokens, properties, addSecondaryTypeIds,
            removeSecondaryTypeIds, extension);
}
 
Example #5
Source File: ConformanceCmisServiceWrapper.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public List<BulkUpdateObjectIdAndChangeToken> bulkUpdateProperties(String repositoryId,
        List<BulkUpdateObjectIdAndChangeToken> objectIdAndChangeToken, Properties properties,
        List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds, ExtensionsData extension) {
    checkRepositoryId(repositoryId);
    checkBulkUpdateList(objectIdAndChangeToken);
    checkProperties(properties);

    try {
        return getWrappedService().bulkUpdateProperties(repositoryId, objectIdAndChangeToken, properties,
                addSecondaryTypeIds, removeSecondaryTypeIds, extension);
    } catch (Exception e) {
        throw createCmisException(e);
    }
}
 
Example #6
Source File: FilterCmisService.java    From iaf with Apache License 2.0 5 votes vote down vote up
@Override
public List<BulkUpdateObjectIdAndChangeToken> bulkUpdateProperties(String repositoryId,
		List<BulkUpdateObjectIdAndChangeToken> objectIdAndChangeToken, Properties properties,
		List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds, ExtensionsData extension) {
	return getObjectService().bulkUpdateProperties(repositoryId, objectIdAndChangeToken, properties,
			addSecondaryTypeIds, removeSecondaryTypeIds, extension);
}
 
Example #7
Source File: IbisObjectService.java    From iaf with Apache License 2.0 5 votes vote down vote up
@Override
public List<BulkUpdateObjectIdAndChangeToken> bulkUpdateProperties(
		String repositoryId,
		List<BulkUpdateObjectIdAndChangeToken> objectIdsAndChangeTokens,
		Properties properties, List<String> addSecondaryTypeIds,
		List<String> removeSecondaryTypeIds, ExtensionsData extension) {
	// TODO Auto-generated method stub
	return objectService.bulkUpdateProperties(repositoryId, objectIdsAndChangeTokens, properties, addSecondaryTypeIds, removeSecondaryTypeIds, extension);
}
 
Example #8
Source File: AlfrescoCmisServiceImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 4 votes vote down vote up
public BulkUpdateObjectIdAndChangeToken getObjectIdAndChangeToken()
{
    return objectIdAndChangeToken;
}