public static NodeRef getSingleAssocNode(Collection<AssociationRef> assocs, boolean getTarget) { if(assocs != null && assocs.size()==1 ) { AssociationRef association = assocs.iterator().next(); return getTarget ? association.getTargetRef() : association.getSourceRef(); } return null; }
public TemplateNode getSource() { return new TemplateNode(assocRef.getSourceRef(), services, resolver); }
public static NodeRef getSingleAssocNode(Collection<AssociationRef> assocs, boolean getTarget) { if(assocs != null && assocs.size()==1 ) { AssociationRef association = assocs.iterator().next(); return getTarget ? association.getTargetRef() : association.getSourceRef(); } return null; }
public TemplateNode getSource() { return new TemplateNode(assocRef.getSourceRef(), services, resolver); }
/** * {@inheritDoc} */ public void onDeleteAssociation(AssociationRef nodeAssocRef) { if (! storesToIgnore.contains(nodeAssocRef.getSourceRef().getStoreRef().toString())) { saveAssoc(nodeAssocRef.getSourceRef(), nodeAssocRef.getTypeQName()); } }
/** * {@inheritDoc} */ public void onCreateAssociation(AssociationRef nodeAssocRef) { if (! storesToIgnore.contains(nodeAssocRef.getSourceRef().getStoreRef().toString())) { saveAssoc(nodeAssocRef.getSourceRef(), nodeAssocRef.getTypeQName()); } }
/** * {@inheritDoc} */ public void onCreateAssociation(AssociationRef nodeAssocRef) { if (! storesToIgnore.contains(nodeAssocRef.getSourceRef().getStoreRef().toString())) { saveAssoc(nodeAssocRef.getSourceRef(), nodeAssocRef.getTypeQName()); } }
/** * {@inheritDoc} */ public void onDeleteAssociation(AssociationRef nodeAssocRef) { if (! storesToIgnore.contains(nodeAssocRef.getSourceRef().getStoreRef().toString())) { saveAssoc(nodeAssocRef.getSourceRef(), nodeAssocRef.getTypeQName()); } }
/** * * @param ref AssociationRef */ public AssociationRefKey(AssociationRef ref) { this.sourceRef = ref.getSourceRef(); this.targetRef = ref.getTargetRef(); this.assocTypeQName = ref.getTypeQName(); }
public ScriptNode getSource() { return (ScriptNode)new ValueConverter().convertValueForScript(this.services, this.scope, null, assocRef.getSourceRef()); }
/** * * @param ref AssociationRef */ public AssociationRefKey(AssociationRef ref) { this.sourceRef = ref.getSourceRef(); this.targetRef = ref.getTargetRef(); this.assocTypeQName = ref.getTypeQName(); }
public Serializable getValueInternal(CMISNodeInfo nodeInfo) { return createNodeInfo(nodeInfo.getAssociationRef().getSourceRef()).getObjectId(); } }
@Override public void onDeleteAssociation(AssociationRef nodeAssocRef) { // The act:actionSchedule type must have the association, so remove the source when the // association is deleted. NodeRef actionScheduleNodeRef = nodeAssocRef.getSourceRef(); if (nodeService.exists(actionScheduleNodeRef) && !nodeService.hasAspect(actionScheduleNodeRef, ContentModel.ASPECT_PENDING_DELETE)) { // Delete the source nodeService.deleteNode(actionScheduleNodeRef); } }
@Override public void onDeleteAssociation(AssociationRef nodeAssocRef) { // The act:actionSchedule type must have the association, so remove the source when the // association is deleted. NodeRef actionScheduleNodeRef = nodeAssocRef.getSourceRef(); if (nodeService.exists(actionScheduleNodeRef) && !nodeService.hasAspect(actionScheduleNodeRef, ContentModel.ASPECT_PENDING_DELETE)) { // Delete the source nodeService.deleteNode(actionScheduleNodeRef); } }
public Serializable getValueInternal(CMISNodeInfo nodeInfo) { return createNodeInfo(nodeInfo.getAssociationRef().getSourceRef()).getObjectId(); } }
@Override public AssociationRef getBaseName(AssociationRef assocRef) { if (assocRef == null) { return null; } return new AssociationRef(assocRef.getId(), getBaseName(assocRef.getSourceRef()), assocRef.getTypeQName(), getBaseName(assocRef.getTargetRef())); }
@Override public AssociationRef getName(AssociationRef assocRef) { if (assocRef == null) { return null; } return new AssociationRef(assocRef.getId(), getName(assocRef.getSourceRef()), assocRef.getTypeQName(), getName(assocRef.getTargetRef())); }
@Override public AssociationRef getName(AssociationRef assocRef) { if (assocRef == null) { return null; } return new AssociationRef(assocRef.getId(), getName(assocRef.getSourceRef()), assocRef.getTypeQName(), getName(assocRef.getTargetRef())); }
@Override public AssociationRef getBaseName(AssociationRef assocRef) { if (assocRef == null) { return null; } return new AssociationRef(assocRef.getId(), getBaseName(assocRef.getSourceRef()), assocRef.getTypeQName(), getBaseName(assocRef.getTargetRef())); }
@Override public Void execute() throws Throwable { List<AssociationRef> refs = nodeService.getTargetAssocs(testContext.sourceNodeRef, RegexQNamePattern.MATCH_ALL); if(refs.size() > 0) { AssociationRef ref = refs.get(0); nodeService.removeAssociation(ref.getSourceRef(), ref.getTargetRef(), ref.getTypeQName()); } return null; } };