Package railo.runtime.exp

Examples of railo.runtime.exp.ApplicationException


    SecurityManager securityManager = pc.getConfig().getSecurityManager();
      securityManager.checkFileLocation(pc.getConfig(),directory,serverPassword);
   
     
    if(!directory.exists())
      throw new ApplicationException("the directory ["+directory.toString()+"] doesn't exist");
    if(!directory.isDirectory())
      throw new ApplicationException("the file ["+directory.toString()+"] exists, but it isn't a directory");
    if(!directory.canRead())
      throw new ApplicationException("no access to read directory ["+directory.toString()+"]");
   
    if(strNewdirectory==null)
      throw new ApplicationException("the attribute [newDirectory] is not defined");
   
    // real to source
    Resource newdirectory=toDestination(pc,strNewdirectory,directory);
   
      securityManager.checkFileLocation(pc.getConfig(),newdirectory,serverPassword);
    if(newdirectory.exists())
      throw new ApplicationException("new directory ["+newdirectory.toString()+"] already exists");
    if(createPath) {
      newdirectory.getParentResource().mkdirs();
     
    }
    try {
View Full Code Here


    SecurityManager securityManager = pc.getConfig().getSecurityManager();
      securityManager.checkFileLocation(pc.getConfig(),directory,serverPassword);
   
     
    if(!directory.exists())
      throw new ApplicationException("directory ["+directory.toString()+"] doesn't exist");
    if(!directory.isDirectory())
      throw new ApplicationException("file ["+directory.toString()+"] exists, but isn't a directory");
    if(!directory.canRead())
      throw new ApplicationException("no access to read directory ["+directory.toString()+"]");
   
    if(StringUtil.isEmpty(strDestination))
      throw new ApplicationException("attribute destination is not defined");
   
    // real to source
    Resource newdirectory=toDestination(pc,strDestination,directory);
   
    if ( nameconflict == NAMECONFLICT_ERROR && newdirectory.exists() )
      throw new ApplicationException("new directory ["+newdirectory.toString()+"] already exist");
   
      securityManager.checkFileLocation(pc.getConfig(),newdirectory,serverPassword);

    try {
      // has already a filter
      if(filter!=null) {
        if(recurse) filter=new OrResourceFilter(new ResourceFilter[]{
            filter,DirectoryResourceFilter.FILTER
        });
      }
      else {
        if(!recurse)filter=new NotResourceFilter(DirectoryResourceFilter.FILTER);
      }
      if(!createPath) {
        Resource p = newdirectory.getParentResource();
        if(p!=null && !p.exists())
          throw new ApplicationException("parent directory for ["+newdirectory+"] doesn't exist");
      }
      ResourceUtil.copyRecursive(directory, newdirectory,filter);
    }
    catch(Throwable t) {
      throw new ApplicationException(t.getMessage());
    }
   
    // set S3 stuff
    setS3Attrs(directory,acl,storage);
     
View Full Code Here

   
    if("all".equals(strType)) type=TYPE_ALL;
    else if("dir".equals(strType)) type=TYPE_DIR;
    else if("directory".equals(strType)) type=TYPE_DIR;
    else if("file".equals(strType)) type=TYPE_FILE;
    else throw new ApplicationException("invalid type ["+strType+"] for the tag directory");
     
  }
View Full Code Here

      else pageContext.forceWrite(cfml2wddx(input));
    }
   
  // wddx > cfml
    else if(action.equals("wddx2cfml")) {
      if(output==null) throw new ApplicationException("at tag cfwddx the attribute output is required if you set action==wddx2cfml");
      pageContext.setVariable(output,wddx2cfml(Caster.toString(input)));
    }
   
  // cfml > js
    else if(action.equals("cfml2js")) {
View Full Code Here

    return converter.serialize(wddx2cfml(input),toplevelvariable);
  }
 
 
  private ApplicationException missingTopLevelVariable() {
    return new ApplicationException("at tag cfwddx the attribute topLevelVariable is required if you set action equal wddx2js or cfml2js");
  }
View Full Code Here

   
  @Override
  public int doStartTag() throws PageException  {

    if(param.getFlash()==null && param.getVideo()==null)
      throw new ApplicationException("you have to define video or flash source");
    if(param.getFlash()!=null && param.getVideo()!=null)
      throw new ApplicationException("you can define only one source");
      
   
    // get VideoPlayer Tag
    Tag parent=getParent();
    while(parent!=null && !(parent instanceof VideoPlayerJW)) {
      parent=parent.getParent();
    }
   
    if(parent instanceof VideoPlayerJW) {
      VideoPlayerJW mail = (VideoPlayerJW)parent;
      mail.setParam(param);
    }
    else {
      throw new ApplicationException("Wrong Context, tag VideoPlayerParam must be inside a VideoPlayer tag")
    }
    return SKIP_BODY;
  }
View Full Code Here

    if(type==null) return;
      type=type.toLowerCase().trim();
      if(type.equals("simple"))this.type=SearchCollection.SEARCH_TYPE_SIMPLE;
      else if(type.equals("explicit"))this.type=SearchCollection.SEARCH_TYPE_EXPLICIT;
      else
          throw new ApplicationException("attribute type of tag search has an invalid value, valid values are [simple,explicit] now is ["+type+"]");

  }
View Full Code Here

   * @param previousCriteria the previousCriteria to set
   * @throws ApplicationException
   */
  public void setPreviouscriteria(String previousCriteria) throws ApplicationException {
    this.previousCriteria = previousCriteria;
    throw new ApplicationException("attribute previousCriteria for tag search is not supported yet");
    // TODO impl tag attribute
  }
View Full Code Here

    else if("never".equals(suggestions)) this.suggestions=SUGGESTIONS_NEVER;
    else if(Decision.isNumeric(suggestions)) {
      this.suggestions=Caster.toIntValue(suggestions);
    }
    else 
      throw new ApplicationException("attribute suggestions has an invalid value ["+suggestions+"], valid values are [always,never,<positive numeric value>]");
   
   
  }
View Full Code Here

    while(parent!=null && !(parent instanceof Tree)) {
      parent=parent.getParent();
    }
   
    if(parent instanceof Tree) return (Tree) parent;
    throw new ApplicationException("Wrong Context, tag TreeItem must be inside a Tree tag")
   
  }
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.