Package railo.runtime.exp

Examples of railo.runtime.exp.ApplicationException


    private void _doEndTag() throws IOException, ExpressionException, PageException {
       
      // check
      if(query!=null) {
        if(value==null)
          throw new ApplicationException("if you have defined attribute query for tag select, you must also define attribute value");
        else if(!query.containsKey(value))
          throw new ApplicationException("invalid value for attribute [value], there is no column in query with name ["+value+"]");
       
        if(display!=null && !query.containsKey(display))
          throw new ApplicationException("invalid value for attribute [display], there is no column in query with name ["+display+"]");
       
        if(group!=null && !query.containsKey(group))
          throw new ApplicationException("invalid value for attribute [group], there is no column in query with name ["+group+"]");
      }   
     
      input.setType(Input.TYPE_SELECT);
        Tag parent=getParent();
        while(parent!=null && !(parent instanceof Form)){
      parent=parent.getParent();
    }
    if(parent instanceof Form) {
        Form form = (Form)parent;
        form.setInput(input)
    }
    else {
        throw new ApplicationException("Tag cfselect must be inside a cfform tag");
    }
     
     
        pageContext.forceWrite("<select");
       
View Full Code Here


  public void setQueryposition(String strQueryPosition) throws ApplicationException {
    strQueryPosition=strQueryPosition.trim().toLowerCase();
    if( "above".equals(strQueryPosition)) queryPosition=QUERY_POSITION_ABOVE;
    else if( "below".equals(strQueryPosition)) queryPosition=QUERY_POSITION_BELOW;
      else
        throw new ApplicationException("attribute queryPosition for tag select has an invalid value ["+strQueryPosition+"], " +
            "valid values are [above, below]");
   
  }
View Full Code Here

      notAllowed("entryPath","prefix", prefix);
      notAllowed("entryPath","source", source);
      getZip().setParam(new ZipParamFilter(filter,entryPath,recurse()));
    }*/
    else
      throw new ApplicationException("invalid attribute combination");
     

   
   
    return SKIP_BODY;
View Full Code Here

    }
   
    if(parent instanceof Zip) {
      return zip=(Zip)parent;
    }
    throw new ApplicationException("Wrong Context, tag ZipParam must be inside a Zip tag")
  }
View Full Code Here

  }


  private void notAllowed(String combi, String name, Object value) throws ApplicationException {
    if(value!=null)
      throw new ApplicationException("attribute ["+name+"] is not allowed in combination with attribute(s) ["+combi+"]")
  }
View Full Code Here

    if(value!=null)
      throw new ApplicationException("attribute ["+name+"] is not allowed in combination with attribute(s) ["+combi+"]")
  }
  public void required(String combi, String name, Object value) throws ApplicationException {
    if(value==null)
      throw new ApplicationException("attribute ["+name+"] is required in combination with attribute(s) ["+combi+"]")
  }
View Full Code Here

        Element scope=_getRootElement("scope");
       
        Element application=_getRootElement("application");
        if(span!=null){
          if(span.getMillis()<=0)
            throw new ApplicationException("value must be a positive number");
          application.setAttribute("requesttimeout",span.getDay()+","+span.getHour()+","+span.getMinute()+","+span.getSecond());
        }
        else application.removeAttribute("requesttimeout");
       
        // remove deprecated attribute
View Full Code Here

     
      // datasource
      DataSource  ds = config.getDataSource(storage,null);
      if(ds!=null) {
        if(ds.isStorage())return storage;
        throw new ApplicationException("datasource ["+storage+"] is not enabled to be used as session/client storage");
      }
   
      // cache
      CacheConnection cc = Util.getCacheConnection(config, storage,null);
      if(cc!=null) {
        if(cc.isStorage())return storage;
        throw new ApplicationException("cache ["+storage+"] is not enabled to be used as session/client storage");
      }
     
      String sdx=StringUtil.soundex(storage);
     
      // check if a datasource has a similar name
      DataSource[] sources = config.getDataSources();
      for(int i=0;i<sources.length;i++){
        if(StringUtil.soundex(sources[i].getName()).equals(sdx))
          throw new ApplicationException("no matching storage for ["+storage+"] found, did you mean ["+sources[i].getName()+"]");
      }
     
      // check if a cache has a similar name
      Iterator<String> it = config.getCacheConnections().keySet().iterator();
      String name;
      while(it.hasNext()){
        name=it.next();
        if(StringUtil.soundex(name).equals(sdx))
          throw new ApplicationException( "no matching storage for ["+storage+"] found, did you mean ["+name+"]");
      }
     
   
      throw new ApplicationException("no matching storage for ["+storage+"] found");
  }
View Full Code Here

       
        // update
        if(!"white-space".equalsIgnoreCase(writerType) &&
            !"white-space-pref".equalsIgnoreCase(writerType) &&
            !"regular".equalsIgnoreCase(writerType))
          throw new ApplicationException("invalid writer type defintion ["+writerType+"], valid types are [white-space, white-space-pref, regular]");
       
        scope.setAttribute("cfml-writer",writerType.toLowerCase());
    }
View Full Code Here

        for(int i=0;i<children.length;i++) {
            if(id.equals(children[i].getAttribute("id"))) {
                accessor=children[i];
            }
        }
        if(accessor==null) throw new ApplicationException("there is noc Security Manager for id ["+id+"]");
        updateSecurityFileAccess(accessor,fileAccess,file);
       
        accessor.setAttribute("setting",            SecurityManagerImpl.toStringAccessValue(setting));
        accessor.setAttribute("file",               SecurityManagerImpl.toStringAccessValue(file));
        accessor.setAttribute("direct_java_access", SecurityManagerImpl.toStringAccessValue(directJavaAccess));
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.