Package org.apache.james.managesieve.api

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


    }

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


     */
    public void deleteScript(String user, String name) throws UserNotFoundException,
            ScriptNotFoundException, IsActiveException, StorageException {
        if (!_repository.containsKey(user))
        {
            throw new UserNotFoundException(user);
        }
        SieveScript script = _repository.get(user).get(name);
        if (null == script)
        {
            throw new ScriptNotFoundException(name);
View Full Code Here

     * @see org.apache.james.managesieve.api.SieveRepository#getActive(java.lang.String)
     */
    public String getActive(String user) throws UserNotFoundException, ScriptNotFoundException {
        if (!_repository.containsKey(user))
        {
            throw new UserNotFoundException(user);
        }
        Set<Entry<String, SieveScript>> scripts = _repository.get(user).entrySet();
        String content = null;
        for (final Entry<String, SieveScript> entry : scripts)
        {
View Full Code Here

     */
    public String getScript(String user, String name) throws UserNotFoundException,
            ScriptNotFoundException {
        if (!_repository.containsKey(user))
        {
            throw new UserNotFoundException(user);
        }
        SieveScript script = _repository.get(user).get(name);
        if (null == script)
        {
            throw new ScriptNotFoundException(name);
View Full Code Here

     */
    public void haveSpace(String user, String name, long size) throws UserNotFoundException,
            QuotaExceededException {
        if (!_repository.containsKey(user))
        {
            throw new UserNotFoundException(user);
        }
    }
View Full Code Here

     * @see org.apache.james.managesieve.api.SieveRepository#listScripts(java.lang.String)
     */
    public List<ScriptSummary> listScripts(String user) throws UserNotFoundException {
        if (!_repository.containsKey(user))
        {
            throw new UserNotFoundException(user);
        }
        Set<Entry<String, SieveScript>> scripts = _repository.get(user).entrySet();
        List<ScriptSummary> summaries = new ArrayList<ScriptSummary>(scripts.size());
        for (final Entry<String, SieveScript> entry : scripts)
        {
View Full Code Here

     */
    public void putScript(String user, String name, String content) throws UserNotFoundException,
            StorageException, QuotaExceededException {
        if (!_repository.containsKey(user))
        {
            throw new UserNotFoundException(user);
        }
        Map<String,SieveScript> scripts = _repository.get(user);
        scripts.put(name, new SieveScript(content, false));
    }
View Full Code Here

TOP

Related Classes of org.apache.james.managesieve.api.UserNotFoundException

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.