Examples of PlinkReplacer


Examples of com.gentics.api.portalnode.connector.PLinkReplacer

    // get the ContentRenderer
    ServletRequest renderRequest = getServletRequest();
    HttpSession session = pageContext.getSession();

    ContentRenderer renderer = (ContentRenderer) renderRequest.getAttribute(RENDERER_PARAM);
    PLinkReplacer pLinkReplacer = (PLinkReplacer) renderRequest.getAttribute(PLINK_PARAM);
    CRConfigUtil crConf = (CRConfigUtil) renderRequest.getAttribute(CRCONF_PARAM);

    try {
      if (object != null) {
        try {
View Full Code Here

Examples of com.gentics.api.portalnode.connector.PLinkReplacer

  }

  private String testString(String input) throws IOException {
    InputStream is = new ByteArrayInputStream(input.getBytes("UTF-8"));

    PLinkInputStream plis = new PLinkInputStream(is, new PLinkReplacer() {

      public String replacePLink(PLinkInformation info) {
        return info.getContentId();
      }
    });
View Full Code Here

Examples of com.gentics.api.portalnode.connector.PLinkReplacer

  }

  private String testString(String input) throws IOException {
    ByteArrayOutputStream os = new ByteArrayOutputStream();

    PLinkOutputStream plOs = new PLinkOutputStream(os, new PLinkReplacer() {

      public String replacePLink(PLinkInformation info) {
        return info.getContentId();
      }
    });
View Full Code Here

Examples of com.gentics.api.portalnode.connector.PLinkReplacer

    // get the ContentRenderer
    RenderRequest renderRequest = getRenderRequest();
    PortletSession session = renderRequest.getPortletSession();

    ContentRenderer renderer = (ContentRenderer) renderRequest.getAttribute(RENDERER_PARAM);
    PLinkReplacer pLinkReplacer = (PLinkReplacer) renderRequest.getAttribute(PLINK_PARAM);
    CRConfigUtil crConf = (CRConfigUtil) renderRequest.getAttribute(CRCONF_PARAM);

    try {
      if (object != null) {
        try {
View Full Code Here

Examples of com.gentics.cr.plink.PlinkReplacer

      // TODO Auto-generated catch block
      e1.printStackTrace();
    }

    request.setAttribute(com.gentics.cr.taglib.servlet.RenderContentTag.RENDERER_PARAM, renderer);
    request.setAttribute(com.gentics.cr.taglib.servlet.RenderContentTag.PLINK_PARAM, new PlinkReplacer(pproc, req));

    String jspFile = (String) this.crConf.get(JSP_FILE_KEY);
    getServletContext().getRequestDispatcher(jspFile).forward(request, response);
    // endtime
    long e = new Date().getTime();
View Full Code Here

Examples of com.gentics.cr.plink.PlinkReplacer

        if (crBean.isBinary()) {
          stream.write(crBean.getBinaryContent());

        } else {

          PLinkOutputStream plos = new PLinkOutputStream(stream, new PlinkReplacer(plinkProcessor, req));

          OutputStreamWriter wr = new OutputStreamWriter(plos, this.responseEncoding);
          String content = crBean.getContent(this.responseEncoding);
          wr.write(content);
          wr.flush();
View Full Code Here

Examples of com.gentics.cr.plink.PlinkReplacer

      for (int i = 0; i < plinkAttrArray.length; i++) {
        Object attr = crBean.get(plinkAttrArray[i]);
        if (attr instanceof String) {
          crBean.set(
            plinkAttrArray[i],
            PortalConnectorHelper.replacePLinks((String) attr, new PlinkReplacer(this.plinkProc, request)));
        }
      }
    }
    return crBean;
  }
View Full Code Here

Examples of com.gentics.cr.plink.PlinkReplacer

          if (doReplacePlinks) {
            // starttime
            long start = new Date().getTime();

            // replace plinks
            s = PortalConnectorHelper.replacePLinks(s, new PlinkReplacer(this.plinkProc, request));

            // endtime
            long end = new Date().getTime();
            log.debug("plink parsing time for attribute " + attribute + " of " + contentid + ": "
                + (end - start));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.