ChildAssociationRef.<init>
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.alfresco.service.cmr.repository.ChildAssociationRef.<init>(Showing top 15 results out of 315)

origin: org.alfresco/alfresco-data-model

  @Override
  public Element getBaseNameElement(TenantService tenantService)
  {
    return new ChildAssocElement(new ChildAssociationRef(ref.getTypeQName(), tenantService.getBaseName(ref.getParentRef(), true), ref.getQName(), tenantService.getBaseName(ref.getChildRef(), true), ref.isPrimary(), ref.getNthSibling()));
  }
}
origin: Alfresco/community-edition-old

protected void mockPackageItems(NodeRef... children)
{
  ArrayList<ChildAssociationRef> results = new ArrayList<ChildAssociationRef>(children.length);
  for (NodeRef nodeRef : children)
  {
    ChildAssociationRef child = new ChildAssociationRef(ASSOC_PACKAGE_CONTAINS, PCKG_NODE, null, nodeRef);
    results.add(child);
  }
  when(nodeService.getChildAssocs(eq(PCKG_NODE), (QNamePattern) any(), (QNamePattern) any())).thenReturn(results);
}
origin: Alfresco/community-edition-old

public Object getDocumentNode(Object o)
{
  ChildAssociationRef assocRef = (ChildAssociationRef) o;
  StoreRef storeRef = assocRef.getChildRef().getStoreRef();
  return new ChildAssociationRef(null, null, null, nodeService.getRootNode(storeRef));
}
origin: Alfresco/community-edition-old

public void testQNameElement() throws Exception
{
  // plain
  Path.Element element = new Path.ChildAssocElement(new ChildAssociationRef(typeQName, parentRef, qname, childRef));
  assertEquals("Element string incorrect",
      qname.toString(),
      element.getElementString());
  // sibling
  element = new Path.ChildAssocElement(new ChildAssociationRef(typeQName, parentRef, qname, childRef, true, 5));
  assertEquals("Element string incorrect", "{http://www.google.com}documentx[5]", element.getElementString());
}
 
origin: Alfresco/community-edition-old

public ChildAssociationRef getRef(QNameDAO qnameDAO)
{
  QName typeQName = qnameDAO.getQName(typeQNameId).getSecond();
  QName qname = QName.createQName(qnameDAO.getNamespace(qnameNamespaceId).getSecond(), qnameLocalName);
  return new ChildAssociationRef(
      typeQName,
      parentNode.getNodeRef(),
      qname,
      childNode.getNodeRef(),
      isPrimary,
      assocIndex);
}
 
origin: Alfresco/community-edition-old

@Override
public ChildAssociationRef getChildAssocRef()
{
  Field field = getDocument().getField("PRIMARYPARENT");
  String primaryParent = null;
  if (field != null)
  {
    primaryParent = field.stringValue();
  }
  NodeRef childNodeRef = getNodeRef();
  NodeRef parentNodeRef = primaryParent == null ? null : tenantService.getBaseName(new NodeRef(primaryParent));
  return new ChildAssociationRef(getPrimaryAssocTypeQName(), parentNodeRef, getQName(), childNodeRef);
}
origin: Alfresco/community-edition-old

private void modifyParentNode(NodeRef parentFolder, TransferManifestNormalNode nodeToMove ) throws Exception
{
  String nodeName = (String)nodeToMove.getProperties().get(ContentModel.PROP_NAME);
  List<ChildAssociationRef> parents = new ArrayList<ChildAssociationRef>();
  ChildAssociationRef primaryAssoc = new ChildAssociationRef(ContentModel.ASSOC_CONTAINS, parentFolder, QName
      .createQName(NamespaceService.CONTENT_MODEL_1_0_URI, nodeName), nodeToMove.getNodeRef(), true, -1);
  parents.add(primaryAssoc);
  nodeToMove.setParentAssocs(parents);
  nodeToMove.setParentPath(null);
  nodeToMove.setPrimaryParentAssoc(primaryAssoc);
}
origin: Alfresco/community-edition-old

/**
 * Create the rendition association and destination node.
 */
private ChildAssociationRef makeRenditionAssoc()
{
  QName assocType = RenditionModel.ASSOC_RENDITION;
  QName assocName = QName.createQName("url", "renditionName");
  NodeRef destination = new NodeRef("http://test/destinationId");
  return new ChildAssociationRef(assocType, source, assocName, destination);
}
 
origin: Alfresco/community-edition-old

/**
 * Given the node ref, this method constructs the appropriate ChildAssociationRef that would place this node in the
 * transfer's temporary folder. Useful when handling orphans.
 *
 * @param nodeRef NodeRef
 * @return ChildAssociationRef
 */
protected ChildAssociationRef getTemporaryLocation(NodeRef nodeRef)
{
  NodeRef parentNodeRef = receiver.getTempFolder(transferId);
  QName parentAssocType = TransferModel.ASSOC_TRANSFER_ORPHAN;
  QName parentAssocName = QName.createQName(NamespaceService.APP_MODEL_1_0_URI, nodeRef.getId());
  return new ChildAssociationRef(parentAssocType, parentNodeRef, parentAssocName, nodeRef, true, -1);
}
origin: Alfresco/community-edition-old

/**
 * Simulates the node begin attached to the root node of the version store.
 */
public ChildAssociationRef getPrimaryParent(NodeRef nodeRef) throws InvalidNodeRefException
{
  return new ChildAssociationRef(
      ContentModel.ASSOC_CHILDREN,
      dbNodeService.getRootNode(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, Version2Model.STORE_ID)),
      rootAssocName,
      nodeRef);
}
 
origin: Alfresco/community-edition-old

private ChildAssociationRef childAssoc(String id)
{
  return new ChildAssociationRef(
    ContentModel.ASSOC_CONTAINS,
    new NodeRef("test://store/parentRef"),
    ContentModel.TYPE_CONTENT,
    new NodeRef("test://store/" + id)
  );
}
origin: Alfresco/community-edition-old

  private ChildAssociationRef makeAssoc(NodeRef parent, NodeRef child, QName assocName, boolean isRenditionAssoc)
  {
    QName assocType = isRenditionAssoc ? RenditionModel.ASSOC_RENDITION : ContentModel.ASSOC_CONTAINS;
    return new ChildAssociationRef(assocType, parent, assocName, child);
  }
}
origin: Alfresco/community-edition-old

  @Override
  public Element getBaseNameElement(TenantService tenantService)
  {
    return new ChildAssocElement(new ChildAssociationRef(ref.getTypeQName(), tenantService.getBaseName(ref.getParentRef(), true), ref.getQName(), tenantService.getBaseName(ref.getChildRef(), true), ref.isPrimary(), ref.getNthSibling()));
  }
}
origin: Alfresco/community-edition-old

/**
 * Simulates the node begin attached ot the root node of the version store.
 */
public ChildAssociationRef getPrimaryParent(NodeRef nodeRef) throws InvalidNodeRefException
{
  return new ChildAssociationRef(
      ContentModel.ASSOC_CHILDREN,
      dbNodeService.getRootNode(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, STORE_ID)),
      rootAssocName,
      nodeRef);
}
origin: org.alfresco/alfresco-data-model

  @Override
  public Element getBaseNameElement(TenantService tenantService)
  {
    return new ChildAssocElement(new ChildAssociationRef(ref.getTypeQName(), tenantService.getBaseName(ref.getParentRef(), true), ref.getQName(), tenantService.getBaseName(ref.getChildRef(), true), ref.isPrimary(), ref.getNthSibling()));
  }
}
org.alfresco.service.cmr.repositoryChildAssociationRef<init>

Popular methods of ChildAssociationRef

  • getParentRef
  • getChildRef
  • getTypeQName
    Get the qualified name of the association type
  • getQName
    Get the qualified name of the parent-child association
  • isPrimary
  • getNthSibling
  • equals
    Compares: * #assocTypeQName * #parentRef * #childRef * #childQName
  • hashCode
  • setNthSibling
    Allows post-creation setting of the ordering index. This is a helper so that sorted sets and lists c
  • toString

Popular classes and methods

  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • findViewById (Activity)
  • Rectangle (java.awt)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Format (java.text)
    Format is an abstract base class for formatting locale-sensitive information such as dates, messages
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JList (javax.swing)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)