Examples of ScriptNotFoundException


Examples of org.apache.james.managesieve.api.ScriptNotFoundException

            ScriptNotFoundException {
        String script;
        try {
            script = toString(getScriptFile(user, name), UTF_8);
        } catch (FileNotFoundException ex) {
            throw new ScriptNotFoundException(ex);
        }
        return script;
    }
View Full Code Here

Examples of org.apache.james.managesieve.api.ScriptNotFoundException

            ScriptNotFoundException {
        String script;
        try {
            script = toString(getActiveFile(user), UTF_8);
        } catch (FileNotFoundException ex) {
            throw new ScriptNotFoundException(ex);
        }
        return script;
    }
View Full Code Here

Examples of org.apache.james.managesieve.api.ScriptNotFoundException

        File dir = getUserDirectory(user);
        String content;
        try {
            content = toString(new File(dir, FILE_NAME_ACTIVE), UTF_8);
        } catch (FileNotFoundException ex) {
            throw new ScriptNotFoundException("There is no active script.");
        }
        return new File(dir, content);
    }
View Full Code Here

Examples of org.apache.james.managesieve.api.ScriptNotFoundException

    protected File getScriptFile(String user, String name) throws UserNotFoundException,
            ScriptNotFoundException {
        File file = new File(getUserDirectory(user), name);
        if (!file.exists()) {
            throw new ScriptNotFoundException("User: " + user + "Script: " + name);
        }
        return file;
    }
View Full Code Here

Examples of org.apache.james.managesieve.api.ScriptNotFoundException

            throw new UserNotFoundException(user);
        }
        SieveScript script = _repository.get(user).get(name);
        if (null == script)
        {
            throw new ScriptNotFoundException(name);
        }
        if (script.isActive())
        {
            throw new IsActiveException(name);
        }
View Full Code Here

Examples of org.apache.james.managesieve.api.ScriptNotFoundException

                break;
            }
        }
        if (null == content)
        {
            throw new ScriptNotFoundException();
        }
        return content;
    }
View Full Code Here

Examples of org.apache.james.managesieve.api.ScriptNotFoundException

            throw new UserNotFoundException(user);
        }
        SieveScript script = _repository.get(user).get(name);
        if (null == script)
        {
            throw new ScriptNotFoundException(name);
        }
        return script.getContent();
    }
View Full Code Here

Examples of org.apache.james.managesieve.api.ScriptNotFoundException

                _repository.get(user).get(name).setActive(true);
            } else {
                if (null != oldActive) {
                    oldActive.getValue().setActive(true);
                }
                throw new ScriptNotFoundException();
            }
        }
    }
View Full Code Here

Examples of org.pdtextensions.core.launch.ScriptNotFoundException

  protected String phar;
 
  public void setUp(IProject project) throws ScriptNotFoundException {
    IResource phar = getScript(project);
    if (phar == null) {
      throw new ScriptNotFoundException("No script found in project " + project.getName());
    }
   
    if (phar.getFullPath().segmentCount() != 2) {
      throw new ScriptNotFoundException("The script file in project " + project.getName() + " is in the wrong location.");
    }
   
    this.phar = phar.getFullPath().removeFirstSegments(1).toOSString();
  }
View Full Code Here

Examples of org.pdtextensions.core.launch.ScriptNotFoundException

  public void setUp(IProject project) throws ScriptNotFoundException {
   
    IResource script = getScript(project);
   
    if (script == null) {
      throw new ScriptNotFoundException("No script found in project " + project.getName());
    }
   
    this.phar = script.getFullPath().removeFirstSegments(1).toOSString();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.