本文整理汇总了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());
}
示例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());
}
示例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;
}
示例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;
}