Package com.tridion.dcp

Examples of com.tridion.dcp.ComponentPresentation


    this.value = value;
  }

  private Object evaluateInvokable(Object invokableObject) {
    if (invokableObject instanceof ComponentPresentation) {
      ComponentPresentation cp = (ComponentPresentation) invokableObject;
      ComponentPresentationAssembler assembler = new ComponentPresentationAssembler(cp.getPublicationId());
      return assembler.getContent(cp.getComponentId(), cp.getComponentTemplateId());
    }

    return invokableObject;
  }
View Full Code Here


      TCMURI tcmUri = new TCMURI(componentTcmUris[0]);
      int publicationId = tcmUri.getPublicationId();
      String templateTcmUri = getTemplateTcmUri(publicationId);

      ComponentPresentationFactory factory = new ComponentPresentationFactory(publicationId);
      ComponentPresentation componentPresentation;

      for (String componentTcmUri : componentTcmUris) {
        if (templateTcmUri == null) {
          componentPresentation = factory.getComponentPresentationWithHighestPriority(componentTcmUri);
        } else {
View Full Code Here

    return result;
  }

  private int getComponentTemplateId(TCMURI tcmUri) {
    ComponentPresentationFactory factory = new ComponentPresentationFactory(tcmUri.getPublicationId());
    ComponentPresentation dcp = factory.getComponentPresentationWithHighestPriority(tcmUri.getItemId());

    return dcp == null ? -1 : dcp.getComponentTemplateId();
  }
View Full Code Here

TOP

Related Classes of com.tridion.dcp.ComponentPresentation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.