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


Java ChildAssociationRef.getNthSibling方法代码示例

本文整理汇总了Java中org.alfresco.service.cmr.repository.ChildAssociationRef.getNthSibling方法的典型用法代码示例。如果您正苦于以下问题:Java ChildAssociationRef.getNthSibling方法的具体用法?Java ChildAssociationRef.getNthSibling怎么用?Java ChildAssociationRef.getNthSibling使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.alfresco.service.cmr.repository.ChildAssociationRef的用法示例。


在下文中一共展示了ChildAssociationRef.getNthSibling方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getName

import org.alfresco.service.cmr.repository.ChildAssociationRef; //导入方法依赖的package包/类
@Override
public ChildAssociationRef getName(ChildAssociationRef childAssocRef)
{
    if (childAssocRef == null)
    {
        return null;
    }

    return new ChildAssociationRef(
            childAssocRef.getTypeQName(),
            getName(childAssocRef.getParentRef()),
            childAssocRef.getQName(),
            getName(childAssocRef.getChildRef()),
            childAssocRef.isPrimary(),
            childAssocRef.getNthSibling());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:17,代码来源:MultiTServiceImpl.java

示例2: getBaseName

import org.alfresco.service.cmr.repository.ChildAssociationRef; //导入方法依赖的package包/类
@Override
public ChildAssociationRef getBaseName(ChildAssociationRef childAssocRef, boolean forceForNonTenant)
{
    if (childAssocRef == null)
    {
        return null;
    }

    return new ChildAssociationRef(
            childAssocRef.getTypeQName(),
            getBaseName(childAssocRef.getParentRef(), forceForNonTenant),
            childAssocRef.getQName(),
            getBaseName(childAssocRef.getChildRef(), forceForNonTenant),
            childAssocRef.isPrimary(),
            childAssocRef.getNthSibling());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:17,代码来源:MultiTServiceImpl.java

示例3: getChildAssocs

import org.alfresco.service.cmr.repository.ChildAssociationRef; //导入方法依赖的package包/类
/**
 * Child Assocs translation for version store
 */
public List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern) throws InvalidNodeRefException
{
    // Get the child assoc references from the version store
    List<ChildAssociationRef> childAssocRefs = this.dbNodeService.getChildAssocs(
            VersionUtil.convertNodeRef(nodeRef),
            typeQNamePattern, qnamePattern);
    
    List<ChildAssociationRef> result = new ArrayList<ChildAssociationRef>(childAssocRefs.size());
    
    for (ChildAssociationRef childAssocRef : childAssocRefs)
    {
        if (! childAssocRef.getTypeQName().equals(Version2Model.CHILD_QNAME_VERSIONED_ASSOCS))
        {
            // Get the child reference
            NodeRef childRef = childAssocRef.getChildRef();
            NodeRef referencedNode = (NodeRef)this.dbNodeService.getProperty(childRef, ContentModel.PROP_REFERENCE);
            
            if (this.dbNodeService.exists(referencedNode))
            {
                // Build a child assoc ref to add to the returned list
                ChildAssociationRef newChildAssocRef = new ChildAssociationRef(
                        childAssocRef.getTypeQName(),
                        childAssocRef.getParentRef(),
                        childAssocRef.getQName(),
                        referencedNode,
                        childAssocRef.isPrimary(),
                        childAssocRef.getNthSibling());
                
                result.add(newChildAssocRef);
            }
        }
    }
    
    // sort the results so that the order appears to be exactly as it was originally
    Collections.sort(result);
    
    return result;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:42,代码来源:Node2ServiceImpl.java

示例4: execute

import org.alfresco.service.cmr.repository.ChildAssociationRef; //导入方法依赖的package包/类
@Override
public List<ChildAssociationRef> execute(NodeProtocol protocol, Reference reference) throws ProtocolMethodException
{
    NodeRef actualNodeRef = reference.execute(new GetActualNodeRefMethod(null));
    NodeRef nodeRefReference = reference.toNodeRef();
    List<ChildAssociationRef> referenceAssociations = new LinkedList<>();
    if (!environment.isSubClass(environment.getType(nodeRefReference), ContentModel.TYPE_FOLDER))
    {
        List<ChildAssociationRef> actualAssociations = environment.getChildAssocs(actualNodeRef,
                                                                                  typeQNamePattern,
                                                                                  qnamePattern,
                                                                                  maxResults,
                                                                                  preload);

        for (ChildAssociationRef actualAssoc : actualAssociations)
        {
            ChildAssociationRef referenceChildAssocRef = new ChildAssociationRef(actualAssoc.getTypeQName(),
                                                                                 nodeRefReference,
                                                                                 actualAssoc.getQName(),
                                                                                 actualAssoc.getChildRef(),
                                                                                 actualAssoc.isPrimary(),
                                                                                 actualAssoc.getNthSibling());

            referenceAssociations.add(referenceChildAssocRef);
        }
    }
    return referenceAssociations;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:29,代码来源:GetChildAssocsMethod.java


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