Package railo.runtime.exp

Examples of railo.runtime.exp.ApplicationException


    if("string".equals(strType))        type=TYPE_STRING;
    else if("text".equals(strType))        type=TYPE_STRING;
    else if("plain".equals(strType))        type=TYPE_STRING;
    else if("xml".equals(strType))        type=TYPE_XML;
   
    else throw new ApplicationException("invalid type definition ["+strType+"], valid type definitions are " +
        "[string,xml]");
   
  }
View Full Code Here


    else if("rc440".equals(strEncrypt))      encrypt=PDFUtil.ENCRYPT_RC4_40;   
    else if("rc4-40".equals(strEncrypt))    encrypt=PDFUtil.ENCRYPT_RC4_40;   
    else if("rc4_40".equals(strEncrypt))    encrypt=PDFUtil.ENCRYPT_RC4_40;   
   
   
    else throw new ApplicationException("invalid encrypt definition ["+strEncrypt+"], valid encrypt definitions are " +
        "[aes_128,none,rc4_128,rc4_128m,rc4_40]");
  }
View Full Code Here

    else if("jpe".equals(strFormat))      format=FORMAT_JPG; 
    else if("tiff".equals(strFormat))      format=FORMAT_TIFF;
    else if("tif".equals(strFormat))      format=FORMAT_TIFF; 
    else if("png".equals(strFormat))      format=FORMAT_PNG; 
   
    else throw new ApplicationException("invalid format definition ["+strFormat+"], valid format definitions are " +
        "[jpg,tiff,png]");
  }
View Full Code Here

   * @param opacity the opacity to set
   * @throws ApplicationException
   */
  public void setOpacity(double opacity) throws ApplicationException {
    if(opacity<0 || opacity>10)
      throw new ApplicationException("invalid opacity definition ["+Caster.toString(opacity)+"], value should be in range from 0 to 10");
    this.opacity = (float) (opacity/10);
  }
View Full Code Here

  public void setOrder(String strOrder) throws ApplicationException {
    strOrder=StringUtil.toLowerCase(strOrder.trim());
    if("name".equals(strOrder))          order=ORDER_NAME; 
    else if("time".equals(strOrder))      order=ORDER_TIME; 
   
    else throw new ApplicationException("invalid order definition ["+strOrder+"], valid order definitions are " +
        "[name,time]");
  }
View Full Code Here

  public void setResolution(String strResolution) throws ApplicationException {
    strResolution=StringUtil.toLowerCase(strResolution.trim());
    if("low".equals(strResolution))      resolution=RESOLUTION_LOW; 
    else if("high".equals(strResolution))  resolution=RESOLUTION_HIGH; 
   
    else throw new ApplicationException("invalid resolution definition ["+strResolution+"], valid resolution definitions are " +
        "[low,high]");
  }
View Full Code Here

    strSaveOption=StringUtil.toLowerCase(strSaveOption.trim());
    if("full".equals(strSaveOption))      saveOption=SAVE_OPTION_FULL; 
    else if("incremental".equals(strSaveOption))saveOption=SAVE_OPTION_INCREMENTAL; 
    else if("linear".equals(strSaveOption))    saveOption=SAVE_OPTION_LINEAR; 
   
    else throw new ApplicationException("invalid saveOption definition ["+strSaveOption+"], valid saveOption definitions are " +
        "[full,linear,incremental]");
  }
View Full Code Here

    else if(1.3 == version)    this.version=PdfWriter.VERSION_1_3; 
    else if(1.4 == version)    this.version=PdfWriter.VERSION_1_4; 
    else if(1.5 == version)    this.version=PdfWriter.VERSION_1_5; 
    else if(1.6 == version)    this.version=PdfWriter.VERSION_1_6; 
   
    else throw new ApplicationException("invalid version definition ["+Caster.toString(version)+"], valid version definitions are " +
        "[1.1, 1.2, 1.3, 1.4, 1.5, 1.6]");
  }
View Full Code Here

      else if(ACTION_MERGE==action)        doActionMerge();
      else if(ACTION_DELETE_PAGES==action)    doActionDeletePages();
      else if(ACTION_PROTECT==action)        doActionProtect();
      else if(ACTION_THUMBNAIL==action)      doActionThumbnail();
      else if(ACTION_EXTRACT_TEXT==action)    {
        if(true)throw new ApplicationException("not supported yet, see https://issues.jboss.org/browse/RAILO-1559");
        doActionExtractText();
      }
     
      //else if(ACTION_PROCESSDDX==action)  throw new ApplicationException("action [processddx] not supported");
     
View Full Code Here

  private void doActionWrite() throws PageException, IOException, DocumentException {
    required("pdf", "write", "source", source);
    required("pdf", "write", "destination", destination);
   
    if(destination.exists() && !overwrite)
      throw new ApplicationException("destination file ["+destination+"] already exists");
   
    PDFDocument doc = toPDFDocument(source, password, null);
    //PdfReader pr = doc.getPdfReader();
    // output
    boolean destIsSource = doc.getResource()!=null && destination.equals(doc.getResource());
View Full Code Here

TOP

Related Classes of railo.runtime.exp.ApplicationException

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.