Package org.geomajas.plugin.printing

Examples of org.geomajas.plugin.printing.PrintingException


   */
  public void render(OutputStream outputStream, Format format) throws PrintingException {
    try {
      doRender(outputStream, format);
    } catch (Exception e) {
      throw new PrintingException(e, PrintingException.DOCUMENT_RENDER_PROBLEM);
    }
  }
View Full Code Here


   */
  public void layout(Format format) throws PrintingException {
    try {
      doRender(null, format);
    } catch (Exception e) {
      throw new PrintingException(e, PrintingException.DOCUMENT_LAYOUT_PROBLEM);
    }
  }
View Full Code Here

            /** close the pdf file */
            decodePdf.closePdfFile();
            baos.reset();
            ImageIO.write(img, format.getExtension(), baos);
          } catch (PdfException e) {
            throw new PrintingException(e, PrintingException.DOCUMENT_RENDER_PROBLEM);
          }
          break;
        default:
          throw new IllegalStateException(
              "Oops, software error, need to support extra format at end of render" + format);
View Full Code Here

    try {
      marshaller.marshal(template.getPage(), new StreamResult(sw));
      template.setPageXml(sw.toString());
      printTemplateDao.merge(template);
    } catch (XmlMappingException e) {
      throw new PrintingException(e, PrintingException.PRINT_TEMPLATE_XML_PROBLEM);
    } catch (IOException e) {
      throw new PrintingException(e, PrintingException.PRINT_TEMPLATE_PERSIST_PROBLEM);
    }
  }
View Full Code Here

   */
  public Document removeDocument(String key) throws PrintingException {
    if (documentMap.containsKey(key)) {
      return documentMap.remove(key);
    } else {
      throw new PrintingException(PrintingException.DOCUMENT_NOT_FOUND, key);
    }
  }
View Full Code Here

    // creates a new component, this is a prototype !!!
    Object bean;
    try {
      bean = applicationContext.getBean(info.getPrototypeName(), PrintComponent.class);
    } catch (BeansException be) {
      throw new PrintingException(be, PrintingException.DTO_IMPLEMENTATION_NOT_FOUND,
          info.getClass().getSimpleName(), info.getPrototypeName());
    }
    PrintComponent<T> component = (PrintComponent<T>) bean;
    component.fromDto(info);
    for (PrintComponentInfo child : info.getChildren()) {
View Full Code Here

TOP

Related Classes of org.geomajas.plugin.printing.PrintingException

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.