public QName getQName() { return car.getQName(); }
public boolean isDocument(Object o) { if (!(o instanceof ChildAssociationRef)) { return false; } ChildAssociationRef car = (ChildAssociationRef) o; return (car.getParentRef() == null) && (car.getQName() == null); }
public String getElementNamespaceUri(Object o) { QName qName = ((ChildAssociationRef) o).getQName(); if(qName == null) { return ""; } return (qName.getNamespaceURI()); }
public QName getQName() { return getChildAssocRef().getQName(); }
public String getName() { return childAssocRef.getQName().toString(); }
public boolean isDocument(Object o) { if (!(o instanceof ChildAssociationRef)) { return false; } ChildAssociationRef car = (ChildAssociationRef) o; return (car.getParentRef() == null) && (car.getQName() == null); }
public String getElementName(Object o) { QName qName = ((ChildAssociationRef) o).getQName(); if(qName == null) { return ""; } return ISO9075.encode(qName.getLocalName()); }
public String getElementName(Object o) { QName qName = ((ChildAssociationRef) o).getQName(); if(qName == null) { return ""; } return ISO9075.encode(qName.getLocalName()); }
public ChildAssociationRef getCategory(NodeRef parent, QName aspectName, String name) { String uri = nodeService.getPrimaryParent(parent).getQName().getNamespaceURI(); String validLocalName = QName.createValidLocalName(name); Collection<ChildAssociationRef> assocs = nodeService.getChildAssocs(parent, ContentModel.ASSOC_SUBCATEGORIES, QName.createQName(uri, validLocalName), false); if (assocs.isEmpty()) { return null; } return assocs.iterator().next(); }
public ChildAssociationRef getCategory(NodeRef parent, QName aspectName, String name) { String uri = nodeService.getPrimaryParent(parent).getQName().getNamespaceURI(); String validLocalName = QName.createValidLocalName(name); Collection<ChildAssociationRef> assocs = nodeService.getChildAssocs(parent, ContentModel.ASSOC_SUBCATEGORIES, QName.createQName(uri, validLocalName), false); if (assocs.isEmpty()) { return null; } return assocs.iterator().next(); }
public QName getQName() { return getResultSet().getChildAssocRef(getIndex()).getQName(); }
public QName getQName() { return ((ChildAssocRefResultSet)getResultSet()).getChildAssocRef(getIndex()).getQName(); }
/** * Helper to report node created progress * * @param childAssocRef ChildAssociationRef */ private void reportNodeCreated(ChildAssociationRef childAssocRef) { if (progress != null) { progress.nodeCreated(childAssocRef.getChildRef(), childAssocRef.getParentRef(), childAssocRef.getTypeQName(), childAssocRef.getQName()); } }
/** * Helper to report node created progress * * @param childAssocRef ChildAssociationRef */ private void reportNodeCreated(ChildAssociationRef childAssocRef) { if (progress != null) { progress.nodeCreated(childAssocRef.getChildRef(), childAssocRef.getParentRef(), childAssocRef.getTypeQName(), childAssocRef.getQName()); } }
@Override @Extend(traitAPI=CheckOutCheckInServiceTrait.class,extensionAPI=CheckOutCheckInServiceExtension.class) public NodeRef checkout(NodeRef nodeRef) { // Find the primary parent in order to determine where to put the copy ChildAssociationRef childAssocRef = nodeService.getPrimaryParent(nodeRef); // Checkout the working copy to the same destination return checkout(nodeRef, childAssocRef.getParentRef(), childAssocRef.getTypeQName(), childAssocRef.getQName()); }
@Override @Extend(traitAPI=CheckOutCheckInServiceTrait.class,extensionAPI=CheckOutCheckInServiceExtension.class) public NodeRef checkout(NodeRef nodeRef) { // Find the primary parent in order to determine where to put the copy ChildAssociationRef childAssocRef = nodeService.getPrimaryParent(nodeRef); // Checkout the working copy to the same destination return checkout(nodeRef, childAssocRef.getParentRef(), childAssocRef.getTypeQName(), childAssocRef.getQName()); }
public NodeInfo newNodeInfo(ChildAssociationRef childAssocRef) { // Build up the path from the parent and child name, as // the child may no longer be under the parent. String path = getPath(childAssocRef.getParentRef())+'/'+getName(childAssocRef.getQName()); String type = getType(childAssocRef.getChildRef()); return new NodeInfo(childAssocRef.getChildRef(), path, type); }
public NodeInfo newNodeInfo(ChildAssociationRef childAssocRef) { // Build up the path from the parent and child name, as // the child may no longer be under the parent. String path = getPath(childAssocRef.getParentRef())+'/'+getName(childAssocRef.getQName()); String type = getType(childAssocRef.getChildRef()); return new NodeInfo(childAssocRef.getChildRef(), path, type); }
private ChildAssociationRef createCategoryInternal(NodeRef parent, String name) { if (!nodeService.exists(parent)) { throw new AlfrescoRuntimeException("Missing category?"); } String uri = nodeService.getPrimaryParent(parent).getQName().getNamespaceURI(); String validLocalName = QName.createValidLocalName(name); ChildAssociationRef newCategory = publicNodeService.createNode(parent, ContentModel.ASSOC_SUBCATEGORIES, QName.createQName(uri, validLocalName), ContentModel.TYPE_CATEGORY); publicNodeService.setProperty(newCategory.getChildRef(), ContentModel.PROP_NAME, name); return newCategory; }
@Override public Void execute() throws Throwable { NodeRef file2NodeRef = getNodeForPath(testConnection, FILE_PATH2); //assertEquals("node ref has changed on a rename", file1NodeRef, file2NodeRef); assertEquals(nodeService.getProperty(file2NodeRef, ContentModel.PROP_LASTNAME), LAST_NAME); ChildAssociationRef parentRef = nodeService.getPrimaryParent(file2NodeRef); assertTrue("file has wrong assoc local name", parentRef.getQName().getLocalName().equals(FILE_NAME2)); assertTrue("not primary assoc", parentRef.isPrimary()); return null; } };