protected void analyseAssociationRef() { objectId = null; currentNodeId = null; currentObjectId = null; versionLabel = null; hasPWC = false; if (associationRef == null) { objecVariant = CMISObjectVariant.NOT_EXISTING; return; } objecVariant = CMISObjectVariant.ASSOC; objectId = CMISConnector.ASSOC_ID_PREFIX + associationRef.getId(); }
protected void analyseAssociationRef() { objectId = null; currentNodeId = null; currentObjectId = null; versionLabel = null; hasPWC = false; if (associationRef == null) { objecVariant = CMISObjectVariant.NOT_EXISTING; return; } objecVariant = CMISObjectVariant.ASSOC; objectId = CMISConnector.ASSOC_ID_PREFIX + associationRef.getId(); }
public String constructObjectId(AssociationRef assocRef, String versionLabel, boolean dropStoreRef) { StringBuilder sb = new StringBuilder(CMISConnector.ASSOC_ID_PREFIX); if(dropStoreRef) { // always return the guid sb.append(assocRef.getId()); } else { sb.append(assocRef.toString()); } if(versionLabel != null) { sb.append(CMISConnector.ID_SEPERATOR); sb.append(versionLabel); } return sb.toString(); }
public String constructObjectId(AssociationRef assocRef, String versionLabel, boolean dropStoreRef) { StringBuilder sb = new StringBuilder(CMISConnector.ASSOC_ID_PREFIX); if(dropStoreRef) { // always return the guid sb.append(assocRef.getId()); } else { sb.append(assocRef.toString()); } if(versionLabel != null) { sb.append(CMISConnector.ID_SEPERATOR); sb.append(versionLabel); } return sb.toString(); }
properties.put(Version2Model.PROP_QNAME_ASSOC_DBID, targetAssocRef.getId());
properties.put(Version2Model.PROP_QNAME_ASSOC_DBID, targetAssocRef.getId());
@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())); }
reference .execute(new GetParentReferenceMethod())); AssociationRef virtualAssocRef = new AssociationRef(associationRef.getId(), sourceReference.toNodeRef(), associationRef.getTypeQName(),
reference .execute(new GetParentReferenceMethod())); AssociationRef virtualAssocRef = new AssociationRef(associationRef.getId(), sourceReference.toNodeRef(), associationRef.getTypeQName(),
@Test public void testGetSourceAssocs() throws Exception { AssociationRef assocRef = createAssociation(); NodeRef sourceRef = assocRef.getSourceRef(); NodeRef targetRef = assocRef.getTargetRef(); QName qname = assocRef.getTypeQName(); // get the source assocs List<AssociationRef> sourceAssocs = nodeService.getSourceAssocs(targetRef, qname); assertEquals("Incorrect number of source assocs", 1, sourceAssocs.size()); assertTrue("Source not found", sourceAssocs.contains(assocRef)); // Check that IDs are present for (AssociationRef sourceAssoc : sourceAssocs) { assertNotNull("Association does not have ID", sourceAssoc.getId()); } }
sourceReference .execute(new GetParentReferenceMethod())); AssociationRef virtualAssocRef = new AssociationRef(associationRef.getId(), sourceRef, associationRef.getTypeQName(),
sourceReference .execute(new GetParentReferenceMethod())); AssociationRef virtualAssocRef = new AssociationRef(associationRef.getId(), sourceRef, associationRef.getTypeQName(),
@Test public void testGetTargetAssocs() throws Exception { AssociationRef assocRef = createAssociation(); NodeRef sourceRef = assocRef.getSourceRef(); NodeRef targetRef = assocRef.getTargetRef(); QName qname = assocRef.getTypeQName(); // get the target assocs List<AssociationRef> targetAssocs = nodeService.getTargetAssocs(sourceRef, qname); assertEquals("Incorrect number of targets", 1, targetAssocs.size()); assertTrue("Target not found", targetAssocs.contains(assocRef)); // Check that IDs are present for (AssociationRef targetAssoc : targetAssocs) { assertNotNull("Association does not have ID", targetAssoc.getId()); } }
sourceNodeRef, targetNodeRef, type.getAlfrescoClass()); return CMISConnector.ASSOC_ID_PREFIX + assocRef.getId();
sourceNodeRef, targetNodeRef, type.getAlfrescoClass()); return CMISConnector.ASSOC_ID_PREFIX + assocRef.getId();
anotherTargetRef, ASSOC_TYPE_QNAME_TEST_NEXT); Long anotherAssocId = anotherAssocRef.getId(); assertNotNull("Created association does not have an ID", anotherAssocId); AssociationRef anotherAssocRefCheck = nodeService.getAssoc(anotherAssocId);