Java源码示例:org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer

示例1
/**
 * Converts an ObjectInFolder container object
 * 
 * @param container the container
 * 
 * @return the CMIS object
 */
public static ObjectInFolderContainer convert(CmisObjectInFolderContainerType container) {
	if (container == null) {
		return null;
	}

	ObjectInFolderContainerImpl result = new ObjectInFolderContainerImpl();

	result.setObject(convert(container.getObjectInFolder()));

	List<ObjectInFolderContainer> containerList = new ArrayList<ObjectInFolderContainer>();
	for (CmisObjectInFolderContainerType containerChild : container.getChildren()) {
		containerList.add(convert(containerChild));
	}

	result.setChildren(containerList);

	// handle extensions
	convertExtension(container, result);

	return result;
}
 
示例2
/**
 * Converts an ObjectInFolder container object
 * 
 * @param container the container
 * 
 * @return the CMIS object
 */
public static CmisObjectInFolderContainerType convert(ObjectInFolderContainer container) {
	if (container == null) {
		return null;
	}

	CmisObjectInFolderContainerType result = new CmisObjectInFolderContainerType();

	result.setObjectInFolder(convert(container.getObject()));

	if (container.getChildren() != null) {
		for (ObjectInFolderContainer child : container.getChildren()) {
			result.getChildren().add(convert(child));
		}
	}

	// handle extensions
	convertExtension(container, result);

	return result;
}
 
示例3
@Override
public List<ObjectInFolderContainer> getDescendants(
        String repositoryId, String folderId, BigInteger depth,
        String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
        String renditionFilter, Boolean includePathSegment, ExtensionsData extension)
{
    long start = System.currentTimeMillis();

    checkRepositoryId(repositoryId);

    List<ObjectInFolderContainer> result = new ArrayList<ObjectInFolderContainer>();

    getDescendantsTree(
            repositoryId,
            getOrCreateFolderInfo(folderId, "Folder").getNodeRef(),
            depth.intValue(),
            filter,
            includeAllowableActions, includeRelationships, renditionFilter, includePathSegment, false,
            result);

    logGetObjectsCall("getDescendants", start, folderId, countDescendantsTree(result), filter, includeAllowableActions, includeRelationships,
            renditionFilter, includePathSegment, extension, null, null, null, depth);

    return result;
}
 
示例4
@Override
public List<ObjectInFolderContainer> getFolderTree(
        String repositoryId, String folderId, BigInteger depth,
        String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
        String renditionFilter, Boolean includePathSegment, ExtensionsData extension)
{
    long start = System.currentTimeMillis();

    checkRepositoryId(repositoryId);

    List<ObjectInFolderContainer> result = new ArrayList<ObjectInFolderContainer>();

    getDescendantsTree(
            repositoryId,
            getOrCreateFolderInfo(folderId, "Folder").getNodeRef(),
            depth.intValue(),
            filter, includeAllowableActions, includeRelationships, renditionFilter, includePathSegment, true,
            result);

    logGetObjectsCall("getFolderTree", start, folderId, countDescendantsTree(result), filter, includeAllowableActions, includeRelationships,
            renditionFilter, includePathSegment, extension, null, null, null, depth);

    return result;
}
 
示例5
@Override
public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
        String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
        String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
    checkRepositoryId(repositoryId);
    checkId("Folder Id", folderId);
    depth = getDepth(depth);
    includeAllowableActions = getDefaultFalse(includeAllowableActions);
    includeRelationships = getDefault(includeRelationships);
    renditionFilter = getDefaultRenditionFilter(renditionFilter);
    includePathSegment = getDefaultFalse(includePathSegment);

    try {
        return getWrappedService().getDescendants(repositoryId, folderId, depth, filter, includeAllowableActions,
                includeRelationships, renditionFilter, includePathSegment, extension);
    } catch (Exception e) {
        throw createCmisException(e);
    }
}
 
示例6
@Override
public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
        String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
        String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
    checkRepositoryId(repositoryId);
    checkId("Folder Id", folderId);
    depth = getDepth(depth);
    includeAllowableActions = getDefaultFalse(includeAllowableActions);
    includeRelationships = getDefault(includeRelationships);
    renditionFilter = getDefaultRenditionFilter(renditionFilter);
    includePathSegment = getDefaultFalse(includePathSegment);

    try {
        return getWrappedService().getFolderTree(repositoryId, folderId, depth, filter, includeAllowableActions,
                includeRelationships, renditionFilter, includePathSegment, extension);
    } catch (Exception e) {
        throw createCmisException(e);
    }
}
 
示例7
private int countDescendantsTree(List<ObjectInFolderContainer> tree) {
    int c = tree.size();
    for (ObjectInFolderContainer o : tree) {
        c += countDescendantsTree(o.getChildren());
    }
    return c;
}
 
示例8
@Override
public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
        String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
        String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
    return service.getDescendants(repositoryId, folderId, depth, filter, includeAllowableActions,
            includeRelationships, renditionFilter, includePathSegment, extension);
}
 
示例9
@Override
public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
        String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
        String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
    return service.getFolderTree(repositoryId, folderId, depth, filter, includeAllowableActions,
            includeRelationships, renditionFilter, includePathSegment, extension);
}
 
示例10
@Override
public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
		String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
		String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
	return getNavigationService().getDescendants(repositoryId, folderId, depth, filter, includeAllowableActions,
			includeRelationships, renditionFilter, includePathSegment, extension);
}
 
示例11
@Override
public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
		String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
		String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
	return getNavigationService().getFolderTree(repositoryId, folderId, depth, filter, includeAllowableActions,
			includeRelationships, renditionFilter, includePathSegment, extension);
}
 
示例12
@Override
public List<ObjectInFolderContainer> getDescendants(String repositoryId,
		String folderId, BigInteger depth, String filter,
		Boolean includeAllowableActions,
		IncludeRelationships includeRelationships, String renditionFilter,
		Boolean includePathSegment, ExtensionsData extension) {
	// TODO Auto-generated method stub
	return navigationService.getDescendants(repositoryId, folderId, depth, filter, includeAllowableActions, includeRelationships, renditionFilter, includePathSegment, extension);
}
 
示例13
@Override
public List<ObjectInFolderContainer> getFolderTree(String repositoryId,
		String folderId, BigInteger depth, String filter,
		Boolean includeAllowableActions,
		IncludeRelationships includeRelationships, String renditionFilter,
		Boolean includePathSegment, ExtensionsData extension) {
	// TODO Auto-generated method stub
	return navigationService.getFolderTree(repositoryId, folderId, depth, filter, includeAllowableActions, includeRelationships, renditionFilter, includePathSegment, extension);
}