Package railo.runtime.exp

Examples of railo.runtime.exp.ExpressionException


       
        if(!hasAccess) throw new SecurityException("no access to change cfx settings");
       
        // name
        if(StringUtil.isEmpty(name))
            throw new ExpressionException("name cannot be a empty value");
       
        // serverLibrary
        if(StringUtil.isEmpty(strServerLibrary)) throw new ExpressionException("serverLibrary cannot be a empty value");
        Resource serverLibrary = ResourceUtil.toResourceExisting(config, strServerLibrary);
       
        // procedure
        if(StringUtil.isEmpty(procedure)) throw new ExpressionException("procedure cannot be a empty value");
       
        renameOldstyleCFX();
       
       
        Element tags=_getRootElement("ext-tags");
       
        // Update
        Element[] children = ConfigWebFactory.getChildren(tags,"ext-tag");
        for(int i=0;i<children.length;i++) {
            String n=children[i].getAttribute("name");
           
            if(n!=null && n.equalsIgnoreCase(name)) {
            Element el=children[i];
            if(!"cpp".equalsIgnoreCase(el.getAttribute("type"))) throw new ExpressionException("there is already a java cfx tag with this name");
              el.setAttribute("server-library",serverLibrary.getAbsolutePath());
              el.setAttribute("procedure",procedure);
              el.setAttribute("keep-alive",Caster.toString(keepAlive));
              el.setAttribute("type","cpp");
            return ;
View Full Code Here


  public void verifyJavaCFX(String name,String strClass) throws PageException {
      try {
        Class clazz = ClassUtil.loadClass(config.getClassLoader(),strClass);
      if(!Reflector.isInstaneOf(clazz, CustomTag.class))
        throw new ExpressionException("class ["+strClass+"] must implement interface ["+CustomTag.class.getName()+"]");
        }
        catch (ClassException e) {
          throw Caster.toPageException(e);
    }
       
        if(StringUtil.startsWithIgnoreCase(name,"cfx_"))name=name.substring(4);
        if(StringUtil.isEmpty(name))
            throw new ExpressionException("class name can't be a empty value");
    }
View Full Code Here

     */
    public void removeCFX(String name) throws ExpressionException, SecurityException {
      checkWriteAccess();
      // check parameters
        if(name==null || name.length()==0)
            throw new ExpressionException("name for CFX Tag can be a empty value");
       
        renameOldstyleCFX();
       
        Element mappings=_getRootElement("ext-tags");

View Full Code Here

        if(!hasAccess)
            throw new SecurityException("no access to update datsource connections");
       
        // check parameters
        if(name==null || name.length()==0)
            throw new ExpressionException("name can't be a empty value");
       
        try {
      ClassUtil.loadInstance(clazzName);
    }
        catch (ClassException e) {
            throw new ExpressionException(e.getMessage());
    }
       
        Element datasources=_getRootElement("data-sources");
       
        // Update
View Full Code Here

       
     
        // check parameters
        id=id.trim();
      if(StringUtil.isEmpty(id))
            throw new ExpressionException("id can't be a empty value");
     
      if(StringUtil.isEmpty(className) && StringUtil.isEmpty(cfcPath))
        throw new ExpressionException("you must define className or cfcPath");
     
        try {
          if(!StringUtil.isEmpty(className)){
            ClassUtil.loadClass(className);
          }
    }
        catch (ClassException e) {
            throw new ExpressionException(e.getMessage());
    }
       
        Element parent=_getRootElement("gateways");
       
        // Update
View Full Code Here

       
     
        // check parameters
        name=name.trim();
      if(StringUtil.isEmpty(name))
            throw new ExpressionException("name can't be a empty value");
      //else if(name.equals("template") || name.equals("object"))
        //throw new ExpressionException("name ["+name+"] is not allowed for a cache connection, the following names are reserved words [object,template]"); 
       
        try {
          Class clazz = ClassUtil.loadClass(config.getClassLoader(),classname);
      if(!Reflector.isInstaneOf(clazz, Cache.class))
        throw new ExpressionException("class ["+clazz.getName()+"] is not of type ["+Cache.class.getName()+"]");
    }
        catch (ClassException e) {
            throw new ExpressionException(e.getMessage());
    }
       
        Element parent=_getRootElement("cache");

        if(name.equalsIgnoreCase(parent.getAttribute("default-template")))
View Full Code Here

     
      if(!hasAccess)
            throw new SecurityException("no access to update resources");
       
        // check parameters
      if(StringUtil.isEmpty(scheme))throw new ExpressionException("scheme can't be a empty value");
     
        Element parent=_getRootElement("resources");
       
        // Update
        Element[] children = ConfigWebFactory.getChildren(parent,"resource-provider");
View Full Code Here

     */
    public void removeDataSource(String name) throws ExpressionException, SecurityException {
      checkWriteAccess();
        // check parameters
        if(name==null || name.length()==0)
            throw new ExpressionException("name for Datasource Connection can be a empty value");
       

        Element datasources=_getRootElement("data-sources");

        Element[] children = ConfigWebFactory.getChildren(datasources,"data-source");
View Full Code Here

            throw new SecurityException("no access to remove cache connection");
       
   
        // check parameters
        if(StringUtil.isEmpty(name))
            throw new ExpressionException("name for Cache Connection can be a empty value");
       
        Element parent=_getRootElement("cache");
       
        // remove default flag
        if(name.equalsIgnoreCase(parent.getAttribute("default-object")))
View Full Code Here

    boolean hasAccess=ConfigWebUtil.hasAccess(config,SecurityManagerImpl.TYPE_GATEWAY);
        if(!hasAccess)
            throw new SecurityException("no access to remove gateway entry");
       
        if(StringUtil.isEmpty(name))
            throw new ExpressionException("name for Gateway Id can be a empty value");
       
        Element parent=_getRootElement("gateways");
       
        // remove element
        Element[] children = ConfigWebFactory.getChildren(parent,"gateway");
View Full Code Here

TOP

Related Classes of railo.runtime.exp.ExpressionException

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.