Search in sources :

Example 6 with QNamePattern

use of org.alfresco.service.namespace.QNamePattern in project alfresco-remote-api by Alfresco.

the class NodeTargetsRelation method readAll.

/**
 * List targets
 *
 * @param sourceNodeId String id of source node
 */
@Override
@WebApiDescription(title = "Return a paged list of target nodes based on (peer) assocs")
public CollectionWithPagingInfo<Node> readAll(String sourceNodeId, Parameters parameters) {
    NodeRef sourceNodeRef = nodes.validateOrLookupNode(sourceNodeId, null);
    QNamePattern assocTypeQNameParam = getAssocTypeFromWhereElseAll(parameters);
    List<AssociationRef> assocRefs = nodeAssocService.getTargetAssocs(sourceNodeRef, assocTypeQNameParam);
    return listNodePeerAssocs(assocRefs, parameters, true);
}
Also used : NodeRef(org.alfresco.service.cmr.repository.NodeRef) RegexQNamePattern(org.alfresco.service.namespace.RegexQNamePattern) QNamePattern(org.alfresco.service.namespace.QNamePattern) AssociationRef(org.alfresco.service.cmr.repository.AssociationRef) WebApiDescription(org.alfresco.rest.framework.WebApiDescription)

Aggregations

QNamePattern (org.alfresco.service.namespace.QNamePattern)6 WebApiDescription (org.alfresco.rest.framework.WebApiDescription)5 NodeRef (org.alfresco.service.cmr.repository.NodeRef)5 RegexQNamePattern (org.alfresco.service.namespace.RegexQNamePattern)5 AssociationRef (org.alfresco.service.cmr.repository.AssociationRef)3 Query (org.alfresco.rest.framework.resource.parameters.where.Query)2 MapBasedQueryWalker (org.alfresco.rest.workflow.api.impl.MapBasedQueryWalker)2 ChildAssociationRef (org.alfresco.service.cmr.repository.ChildAssociationRef)2 EntityNotFoundException (org.alfresco.rest.framework.core.exceptions.EntityNotFoundException)1