Package com.tridion.dynamiccontent

Examples of com.tridion.dynamiccontent.ComponentPresentationAssembler


  }

  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


    return new Scanner(url).useDelimiter("\\A").next();
  }

  private String doImport(TCMURI tcmUri, TransformContext context) {
    if (tcmUri.getItemType() == 16) {
      ComponentPresentationAssembler assembler = new ComponentPresentationAssembler(tcmUri.getPublicationId());
      int ctId = Utils.getItemId(componentTemplate);
      if (ctId < 0) {
        ctId = getComponentTemplateId(tcmUri);
      }
      return ctId > 0 ? assembler.getContent(tcmUri.getItemId(), ctId) : "";
    } else if (tcmUri.getItemType() == 64) {
      PageContentAssembler assembler = new PageContentAssembler();
      return assembler.getContent(tcmUri.toString(), getParameterMap(context));
    }

    log.error("Only Component or Page TCMURI URLs accepted, but found " + tcmUri);
    return "";
  }
View Full Code Here

  @Override
  public String doEndTag(Tag tag, StringBuffer tagBody, TransformContext context, OutputDocument target)
      throws TCDLTransformerException {
    if (var == null) {
      int publicationId = dcps[0].getPublicationId();
      ComponentPresentationAssembler assembler = new ComponentPresentationAssembler(publicationId);
      for (ComponentPresentation dcp : dcps) {
        tagBody.append(assembler.getContent(dcp.getComponentId(), dcp.getComponentTemplateId()));
      }
    } else {
      context.set(var, dcps);
    }
View Full Code Here

TOP

Related Classes of com.tridion.dynamiccontent.ComponentPresentationAssembler

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.