当前位置: 首页>>代码示例>>Java>>正文


Java IncludeRelationships类代码示例

本文整理汇总了Java中org.apache.chemistry.opencmis.commons.enums.IncludeRelationships的典型用法代码示例。如果您正苦于以下问题:Java IncludeRelationships类的具体用法?Java IncludeRelationships怎么用?Java IncludeRelationships使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IncludeRelationships类属于org.apache.chemistry.opencmis.commons.enums包,在下文中一共展示了IncludeRelationships类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getDescendants

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
@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;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:26,代码来源:AlfrescoCmisServiceImpl.java

示例2: getFolderTree

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
@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;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:25,代码来源:AlfrescoCmisServiceImpl.java

示例3: update

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
public void update()
{
    String objectId = objectIdAndChangeToken.getId();
    final CMISNodeInfo info = getOrCreateNodeInfo(objectId, "Object");

    if (!info.isVariant(CMISObjectVariant.ASSOC) && !info.isVariant(CMISObjectVariant.VERSION))
    {
        final NodeRef nodeRef = info.getNodeRef();

        connector.setProperties(nodeRef, info.getType(), properties, new String[0]);

        if (isObjectInfoRequired)
        {
            getObjectInfo(repositoryId, objectId, "*", IncludeRelationships.NONE);
        }

        connector.addSecondaryTypes(nodeRef, addSecondaryTypeIds);
        connector.removeSecondaryTypes(nodeRef, removeSecondaryTypeIds);

        if (properties.getProperties().size() > 0 || addSecondaryTypeIds.size() > 0 || removeSecondaryTypeIds.size() > 0)
        {
            bulkUpdateContext.success(info);
        }
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:26,代码来源:AlfrescoCmisServiceImpl.java

示例4: getProperties

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
@Override
public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension)
{
    checkRepositoryId(repositoryId);

    // what kind of object is it?
    CMISNodeInfo info = getOrCreateNodeInfo(objectId, "Object");

	boolean isObjectInfoRequired = getContext().isObjectInfoRequired();
    if (isObjectInfoRequired)
    {
        getObjectInfo(repositoryId, info.getObjectId(), IncludeRelationships.NONE);
    }

    if (info.isVariant(CMISObjectVariant.ASSOC))
    {
        return connector.getAssocProperties(info, filter);
    }
    else
    {
        return connector.getNodeProperties(info, filter);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:24,代码来源:AlfrescoCmisServiceImpl.java

示例5: query

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
@Override
public ObjectList query(String repositoryId, String statement, Boolean searchAllVersions,
        Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
        BigInteger maxItems, BigInteger skipCount, ExtensionsData extension)
{
    checkRepositoryId(repositoryId);

    if (searchAllVersions.booleanValue())
    {
        throw new CmisInvalidArgumentException("Search all version is not supported!");
    }

    return connector.query(
            statement, includeAllowableActions, includeRelationships, renditionFilter,
            maxItems, skipCount);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:17,代码来源:AlfrescoCmisServiceImpl.java

示例6: setupOperationContext

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
protected void setupOperationContext(final int maxItems, final Session session)
{
    final OperationContext operationContext = session.createOperationContext();
    operationContext.setCacheEnabled(true);

    operationContext.setOrderBy(MessageFormat.format("{0} ASC", PropertyIds.NAME));
    operationContext.setMaxItemsPerPage(maxItems);

    operationContext.setFilterString(null);
    operationContext.setIncludePathSegments(false);

    operationContext.setIncludeAcls(false);
    operationContext.setIncludeAllowableActions(false);
    operationContext.setIncludePolicies(false);

    operationContext.setIncludeRelationships(IncludeRelationships.NONE);
    operationContext.setLoadSecondaryTypeProperties(true);
    session.setDefaultContext(operationContext);
}
 
开发者ID:AFaust,项目名称:alfresco-cmis-documentlist,代码行数:20,代码来源:CMISDocumentListTreeNodeGet.java

示例7: setupOperationContext

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
protected void setupOperationContext(final int maxItems, final Session session)
{
    final OperationContext operationContext = session.createOperationContext();
    operationContext.setCacheEnabled(true);

    // type descending => cmis:folder, cmis:document
    operationContext.setOrderBy(MessageFormat.format("{0} DESC,{1} ASC", PropertyIds.BASE_TYPE_ID, PropertyIds.NAME));
    operationContext.setMaxItemsPerPage(maxItems);

    operationContext.setFilterString(null);
    operationContext.setRenditionFilterString("*");
    operationContext.setIncludePathSegments(true);

    // TODO: need to be included once
    operationContext.setIncludeAcls(false);
    operationContext.setIncludeAllowableActions(false);
    operationContext.setIncludePolicies(false);

    operationContext.setIncludeRelationships(IncludeRelationships.NONE);
    operationContext.setLoadSecondaryTypeProperties(true);
    session.setDefaultContext(operationContext);
}
 
开发者ID:AFaust,项目名称:alfresco-cmis-documentlist,代码行数:23,代码来源:CMISDocumentListGet.java

示例8: convert

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
public OperationContext convert(final BaseCMISOperationContext sourceContext)
{
    final OperationContext operationContext = OperationContextUtils.createOperationContext();
    operationContext.setCacheEnabled(true);
    operationContext.setOrderBy(this.getCMISOrderByClause(sourceContext));

    // TODO Add other parametes
    // operationContext.setMaxItemsPerPage(ctx.getMaxItems);
    operationContext.setFilterString(null);
    operationContext.setRenditionFilterString("*");
    operationContext.setIncludePathSegments(true);

    // TODO: need to be included once
    operationContext.setIncludeAcls(false);
    operationContext.setIncludeAllowableActions(false);
    operationContext.setIncludePolicies(false);
    operationContext.setIncludeRelationships(IncludeRelationships.NONE);
    operationContext.setLoadSecondaryTypeProperties(true);

    return operationContext;
}
 
开发者ID:AFaust,项目名称:alfresco-cmis-documentlist,代码行数:22,代码来源:RhinoCMISConnectorImpl.java

示例9: getChildren

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
@Override
public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
		Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
		Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {

	slflog("getChildren override from customer Chameleon module --------------", repositoryId);
	long startTime = System.currentTimeMillis();

	CallContext sharedContext = this.getCallContext();

	// Get the native domain object from the call context if one is shared by the vendor (example only)
	// Your CMIS vendor's documentation must expose the name of any shared objects they place here for extensions.
	// Object objShared = sharedContext.get("shared_key_name_from_vendor");

	ObjectInFolderList retVal = getWrappedService().getChildren(repositoryId, folderId, filter, orderBy, includeAllowableActions,
			includeRelationships, renditionFilter, includePathSegment, maxItems, skipCount, extension);

	// dual log output in case logger not configured
	LOG.info("[CmisCustomServiceWrapper] Exiting method getChildren. time (ms):" + (System.currentTimeMillis() - startTime));
	System.out.println("[CmisCustomServiceWrapper] Exiting method getChildren. time (ms):" + (System.currentTimeMillis() - startTime));
	return retVal;
}
 
开发者ID:cmisdocs,项目名称:ServerDevelopmentGuide,代码行数:23,代码来源:CmisCustomLoggingServiceWrapper.java

示例10: createCMISObject

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
/**
 * Creates the CMIS object for a node.
 */
public ObjectData createCMISObject(CMISNodeInfo info, String filter, boolean includeAllowableActions,
        IncludeRelationships includeRelationships, String renditionFilter, boolean includePolicyIds,
        boolean includeAcl)
{
    if (info.getType() == null)
    {
        throw new CmisObjectNotFoundException("No corresponding type found! Not a CMIS object?");
    }

    Properties nodeProps = (info.isRelationship() ? getAssocProperties(info, filter) : getNodeProperties(info, filter));

    return createCMISObjectImpl(info, nodeProps, filter, includeAllowableActions, includeRelationships,
            renditionFilter, includePolicyIds, includeAcl);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:18,代码来源:CMISConnector.java

示例11: getFolderParent

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
@Override
public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension)
{
    checkRepositoryId(repositoryId);

    // get the node ref
    CMISNodeInfo info = getOrCreateFolderInfo(folderId, "Folder");

    // the root folder has no parent
    if (info.isRootFolder())
    {
        throw new CmisInvalidArgumentException("Root folder has no parent!");
    }

    // get the parent
    List<CMISNodeInfo> parentInfos = info.getParents();
    if (parentInfos.isEmpty())
    {
        throw new CmisRuntimeException("Folder has no parent and is not the root folder?!");
    }

    CMISNodeInfo parentInfo = addNodeInfo(parentInfos.get(0));

    ObjectData result = connector.createCMISObject(
            parentInfo, filter, false, IncludeRelationships.NONE,
            CMISConnector.RENDITION_NONE, false, false);
	boolean isObjectInfoRequired = getContext().isObjectInfoRequired();
    if (isObjectInfoRequired)
    {
        getObjectInfo(
                repositoryId,
                parentInfo.getObjectId(),
                IncludeRelationships.NONE);
    }

    return result;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:38,代码来源:AlfrescoCmisServiceImpl.java

示例12: updateProperties

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
@Override
public void updateProperties(
        String repositoryId, Holder<String> objectId, Holder<String> changeToken,
        final Properties properties, ExtensionsData extension)
{
    checkRepositoryId(repositoryId);

    final CMISNodeInfo info = getOrCreateNodeInfo(objectId.getValue(), "Object");

    if (info.isVariant(CMISObjectVariant.ASSOC))
    {
        throw new CmisInvalidArgumentException("Relationship properties cannot be updated!");
    }
    else
    {
        if (info.isVariant(CMISObjectVariant.VERSION))
        {
            throw new CmisInvalidArgumentException("Document is not the latest version!");
        }

        final NodeRef nodeRef = info.getNodeRef();

        connector.setProperties(nodeRef, info.getType(), properties, new String[0]);
        
        objectId.setValue(connector.createObjectId(nodeRef));

    	boolean isObjectInfoRequired = getContext().isObjectInfoRequired();
        if (isObjectInfoRequired)
        {
            getObjectInfo(repositoryId, objectId.getValue(), "*", IncludeRelationships.NONE);
        }

        connector.getActivityPoster().postFileFolderUpdated(info.isFolder(), nodeRef);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:36,代码来源:AlfrescoCmisServiceImpl.java

示例13: getObject

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
@Override
public ObjectData getObject(
        String repositoryId, String objectId, String filter, Boolean includeAllowableActions,
        IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
        Boolean includeAcl, ExtensionsData extension)
{
	long start = System.currentTimeMillis();
	
    checkRepositoryId(repositoryId);

    // what kind of object is it?
    CMISNodeInfo info = getOrCreateNodeInfo(objectId, "Object");

    // create a CMIS object
    ObjectData object = connector.createCMISObject(
            info, filter, includeAllowableActions, includeRelationships,
            renditionFilter, includePolicyIds, includeAcl);

	boolean isObjectInfoRequired = getContext().isObjectInfoRequired();
    if (isObjectInfoRequired)
    {
        getObjectInfo(repositoryId, info.getObjectId(), includeRelationships);
    }

    logGetObjectCall("getObject", start, objectId, filter, includeAllowableActions, includeRelationships,
            renditionFilter, includePolicyIds, includeAcl, isObjectInfoRequired, extension);

    return object;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:30,代码来源:AlfrescoCmisServiceImpl.java

示例14: getObjectOfLatestVersion

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
@Override
public ObjectData getObjectOfLatestVersion(
        String repositoryId, String objectId, String versionSeriesId,
        Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
        String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension)
{
    long start = System.currentTimeMillis();

    checkRepositoryId(repositoryId);

    if (objectId != null)
    {
        // it's an AtomPub call
        versionSeriesId = connector.getCurrentVersionId(objectId);
    }

    // what kind of object is it?
    CMISNodeInfo info = getOrCreateNodeInfo(versionSeriesId, "Version Series");
    CMISNodeInfo versionInfo = createNodeInfo(((CMISNodeInfoImpl) info).getLatestVersionNodeRef(major));

    ObjectData object = connector.createCMISObject(
            versionInfo, filter, includeAllowableActions,
            includeRelationships, renditionFilter, includePolicyIds, includeAcl);

	boolean isObjectInfoRequired = getContext().isObjectInfoRequired();
    if (isObjectInfoRequired)
    {
        getObjectInfo(repositoryId, info.getObjectId(), includeRelationships);
    }

    StringBuilder sb = new StringBuilder();
    sb.append(objectId).append("-").append(versionSeriesId);

    logGetObjectCall("getObjectOfLatestVersion", start, sb.toString(), filter, includeAllowableActions, includeRelationships,
            renditionFilter, includePolicyIds, includeAcl, isObjectInfoRequired, extension);

    return object;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:39,代码来源:AlfrescoCmisServiceImpl.java

示例15: testItems

import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships; //导入依赖的package包/类
/**
 * ACE-33
 * 
 * Cmis Item support
 */
@Test
public void testItems()
{

    withCmisService(new CmisServiceCallback<String>() {
        @Override
        public String execute(CmisService cmisService) {
            List<RepositoryInfo> repositories = cmisService.getRepositoryInfos(null);
            assertTrue(repositories.size() > 0);
            RepositoryInfo repo = repositories.get(0);
            String repositoryId = repo.getId();
            
        	TypeDefinition def = cmisService.getTypeDefinition(repositoryId, "cmis:item", null);
        	assertNotNull("the cmis:item type is not defined", def); 
            
        	@SuppressWarnings("unused")
            TypeDefinition p = cmisService.getTypeDefinition(repositoryId, "I:cm:person", null);
        	assertNotNull("the I:cm:person type is not defined", def); 
        	
        	ObjectList result = cmisService.query(repositoryId, "select * from cm:person", Boolean.FALSE, Boolean.TRUE, IncludeRelationships.NONE, "", BigInteger.TEN, BigInteger.ZERO, null);
        	assertTrue("", result.getNumItems().intValue() > 0);
        	return "";
    
        };
    }, CmisVersion.CMIS_1_1);
	
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:33,代码来源:CMISTest.java


注:本文中的org.apache.chemistry.opencmis.commons.enums.IncludeRelationships类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。