Package railo.runtime.exp

Examples of railo.runtime.exp.ApplicationException


    try {
      URL url = HTTPUtil.toURL(strUrl+"?wsdl",true);
      method = HTTPEngine.get(url, null, null, 2000,HTTPEngine.MAX_REDIRECT, null, null, null, null);
    }
    catch (MalformedURLException e) {
      throw new ApplicationException("url defintion ["+strUrl+"] is invalid");
    }
    catch (IOException e) {
      throw new ApplicationException("can't invoke ["+strUrl+"]",e.getMessage());
    }
   
    if(method.getStatusCode()!=200){int code=method.getStatusCode();
      String text=method.getStatusText();
      String msg=code+" "+text;
View Full Code Here


    else if("request-timeout".equals(name)) {
      updateLogSettings(name, level,virtualpath, maxfile, maxfilesize, "application","requesttimeout") ;
   
    else if("schedule-task".equals(name)) {
      if(config instanceof ConfigServer)
        throw new ApplicationException("scheduled task logger is not supported for server context");
      updateLogSettings(name, level,virtualpath, maxfile, maxfilesize, "scheduler") ;
   
    else if("search".equals(name)) {
      if(config instanceof ConfigServer)
        throw new ApplicationException("search logger is not supported for server context");
      updateLogSettings(name, level,virtualpath, maxfile, maxfilesize, "search") ;
   
    else {
      throw new ApplicationException("invalid logger name ["+name+"], supported names are [application,exception,trace,thread,orm,gateway,mail,mapping,remote-client,request-timeout,request-timeout,schedule-task,search]");
    }
  }
View Full Code Here

      clazz = ClassUtil.loadClass(config.getClassLoader(),classname);
    } catch (ClassException e) {
      throw Caster.toPageException(e);
    }
    if(!Reflector.isInstaneOf(clazz,Cluster.class) && !Reflector.isInstaneOf(clazz,ClusterRemote.class))
        throw new ApplicationException("class ["+clazz.getName()+"] does not implement interface ["+Cluster.class.getName()+"] or ["+ClusterRemote.class.getName()+"]");  
   

    Element scope=_getRootElement("scope");
    scope.setAttribute("cluster-class", clazz.getName())
    ScopeContext.clearClusterScope();
View Full Code Here

      clazz = ClassUtil.loadClass(config.getClassLoader(),classname);
    } catch (ClassException e) {
      throw Caster.toPageException(e);
    }
    if(!Reflector.isInstaneOf(clazz,VideoExecuter.class))
        throw new ApplicationException("class ["+clazz.getName()+"] does not implement interface ["+VideoExecuter.class.getName()+"]");  
   

    Element app=_getRootElement("video");
    app.setAttribute("video-executer-class", clazz.getName())
  }
View Full Code Here

      clazz = ClassUtil.loadClass(config.getClassLoader(),classname);
    } catch (ClassException e) {
      throw Caster.toPageException(e);
    }
    if(!Reflector.isInstaneOf(clazz,AdminSync.class))
        throw new ApplicationException("class ["+clazz.getName()+"] does not implement interface ["+AdminSync.class.getName()+"]");  
   

    Element app=_getRootElement("application");
    app.setAttribute("admin-sync-class", clazz.getName())
  }
View Full Code Here

  public void updateAPIKey(String key) throws SecurityException, ApplicationException {
    checkWriteAccess();
    key=key.trim();
    if(!Decision.isGUId(key))
      throw new ApplicationException("passed API Key ["+key+"] is not valid");
    Element root=doc.getDocumentElement();
        root.setAttribute("api-key",key);
   
  }
View Full Code Here

   * @throws ApplicationException
   */
  public void setStatuscode(double statuscode) throws ApplicationException {
    int sc=(int) statuscode;
    if(sc<300 || sc>307)
      throw new ApplicationException("invalid value for attribute statuscode ["+Caster.toString(statuscode)+"]",
          "attribute must have one of the folloing values [300|301|302|303|304|305|307]");
     
    this.statuscode = sc;
  }
View Full Code Here

  * @param url value to set
   * @throws ApplicationException
  **/
  public void setUrl(String url) throws ApplicationException  {
    this.url=url.trim();
    if(this.url.length()==0) throw new ApplicationException("invalid url [empty string] for attribute url");
    if(StringUtil.hasLineFeed(url)) throw new ApplicationException("invalid url ["+url+"] for attribute url, carriage-return or line-feed inside the url are not allowed");
  }
View Full Code Here

    if(bodyContent!=null)bodyValue=bodyContent.getString();
    if(attributes.containsKey(KeyConstants._value))attrValue=Caster.toString(attributes.get(KeyConstants._value,null));
   
    // check values
        if(!StringUtil.isEmpty(bodyValue) && !StringUtil.isEmpty(attrValue)) {
          throw new ApplicationException("the value of tag can't be set twice (tag body and attribute value)");
        }
        else if(!StringUtil.isEmpty(bodyValue)){
          value=enc(bodyValue);
        }
        else if(!StringUtil.isEmpty(attrValue)){
View Full Code Here

    else if("write".equals(strAction))          action=ACTION_WRITE;
    else if("extracttext".equals(strAction))          action=ACTION_EXTRACT_TEXT;
    else if("extract-text".equals(strAction))          action=ACTION_EXTRACT_TEXT;
    else if("extract_text".equals(strAction))          action=ACTION_EXTRACT_TEXT;
   
    else throw new ApplicationException("invalid action definition ["+strAction+"], valid actions definitions are " +
        "[addWatermark,deletePages,getInfo,merge,protect,read,removeWatermark,setInfo,thumbnail,write]");
   
  }
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.