JAMES-1614 Move SieveRepository to data api - contributed by Erwan Guyomarc'h and Benoit Tellier

git-svn-id: https://svn.apache.org/repos/asf/james/jsieve/trunk@1710325 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/manager/api/pom.xml b/manager/api/pom.xml
index 4437b5c..53cd5c2 100644
--- a/manager/api/pom.xml
+++ b/manager/api/pom.xml
@@ -31,4 +31,11 @@
     <packaging>bundle</packaging>
     <name>Apache James :: jSieve :: Manager API</name>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.james</groupId>
+            <artifactId>james-server-data-api</artifactId>
+        </dependency>
+    </dependencies>
+
 </project>
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/DuplicateException.java b/manager/api/src/main/java/org/apache/james/managesieve/api/DuplicateException.java
deleted file mode 100644
index 6438473..0000000
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/DuplicateException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-
-package org.apache.james.managesieve.api;
-
-public class DuplicateException extends ManageSieveException
-{
-    /**
-     * Creates a new instance of DuplicateException.
-     *
-     */
-    public DuplicateException() {
-        super();
-    }
-
-    /**
-     * Creates a new instance of DuplicateException.
-     *
-     * @param message
-     * @param cause
-     */
-    public DuplicateException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new instance of DuplicateException.
-     *
-     * @param message
-     */
-    public DuplicateException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new instance of DuplicateException.
-     *
-     * @param cause
-     */
-    public DuplicateException(Throwable cause) {
-        super(cause);
-    }
-
-    private static final long serialVersionUID = 7384835765215418347L;
-}
\ No newline at end of file
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/DuplicateUserException.java b/manager/api/src/main/java/org/apache/james/managesieve/api/DuplicateUserException.java
deleted file mode 100644
index 68aa7e9..0000000
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/DuplicateUserException.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-
-package org.apache.james.managesieve.api;
-
-/**
- * <code>DuplicateUserException</code>
- */
-public class DuplicateUserException extends ManageSieveException {
-
-    private static final long serialVersionUID = 2393178076895724704L;
-
-    /**
-     * Creates a new instance of DuplicateUserException.
-     *
-     */
-    public DuplicateUserException() {
-    }
-
-    /**
-     * Creates a new instance of DuplicateUserException.
-     *
-     * @param message
-     * @param cause
-     */
-    public DuplicateUserException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new instance of DuplicateUserException.
-     *
-     * @param message
-     */
-    public DuplicateUserException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new instance of DuplicateUserException.
-     *
-     * @param cause
-     */
-    public DuplicateUserException(Throwable cause) {
-        super(cause);
-    }
-
-}
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/IsActiveException.java b/manager/api/src/main/java/org/apache/james/managesieve/api/IsActiveException.java
deleted file mode 100644
index dde35ce..0000000
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/IsActiveException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-
-package org.apache.james.managesieve.api;
-
-public class IsActiveException extends ManageSieveException
-{
-    /**
-     * Creates a new instance of IsActiveException.
-     *
-     */
-    public IsActiveException() {
-        super();
-    }
-
-    /**
-     * Creates a new instance of IsActiveException.
-     *
-     * @param message
-     * @param cause
-     */
-    public IsActiveException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new instance of IsActiveException.
-     *
-     * @param message
-     */
-    public IsActiveException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new instance of IsActiveException.
-     *
-     * @param cause
-     */
-    public IsActiveException(Throwable cause) {
-        super(cause);
-    }
-
-    private static final long serialVersionUID = 7472385325048232256L;
-}
\ No newline at end of file
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/QuotaExceededException.java b/manager/api/src/main/java/org/apache/james/managesieve/api/QuotaExceededException.java
deleted file mode 100644
index d428e94..0000000
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/QuotaExceededException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-
-package org.apache.james.managesieve.api;
-
-public class QuotaExceededException extends ManageSieveException
-{
-    /**
-     * Creates a new instance of QuotaExceededException.
-     *
-     */
-    public QuotaExceededException() {
-        super();
-    }
-
-    /**
-     * Creates a new instance of QuotaExceededException.
-     *
-     * @param message
-     * @param cause
-     */
-    public QuotaExceededException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new instance of QuotaExceededException.
-     *
-     * @param message
-     */
-    public QuotaExceededException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new instance of QuotaExceededException.
-     *
-     * @param cause
-     */
-    public QuotaExceededException(Throwable cause) {
-        super(cause);
-    }
-
-    private static final long serialVersionUID = -3966867419152420878L;
-}
\ No newline at end of file
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/QuotaNotFoundException.java b/manager/api/src/main/java/org/apache/james/managesieve/api/QuotaNotFoundException.java
deleted file mode 100644
index 0e3f3ef..0000000
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/QuotaNotFoundException.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-
-package org.apache.james.managesieve.api;
-
-/**
- * <code>QuotaNotFoundException</code>
- */
-public class QuotaNotFoundException extends ManageSieveException {
-    private static final long serialVersionUID = 6523546952593451503L;
-
-    /**
-     * Creates a new instance of QuotaNotFoundException.
-     *
-     */
-    public QuotaNotFoundException() {
-    }
-
-    /**
-     * Creates a new instance of QuotaNotFoundException.
-     *
-     * @param message
-     * @param cause
-     */
-    public QuotaNotFoundException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new instance of QuotaNotFoundException.
-     *
-     * @param message
-     */
-    public QuotaNotFoundException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new instance of QuotaNotFoundException.
-     *
-     * @param cause
-     */
-    public QuotaNotFoundException(Throwable cause) {
-        super(cause);
-    }
-
-}
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/ScriptNotFoundException.java b/manager/api/src/main/java/org/apache/james/managesieve/api/ScriptNotFoundException.java
deleted file mode 100644
index 377031c..0000000
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/ScriptNotFoundException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-
-package org.apache.james.managesieve.api;
-
-public class ScriptNotFoundException extends ManageSieveException
-{
-    /**
-     * Creates a new instance of ScriptNotFoundException.
-     *
-     */
-    public ScriptNotFoundException() {
-        super();
-    }
-
-    /**
-     * Creates a new instance of ScriptNotFoundException.
-     *
-     * @param message
-     * @param cause
-     */
-    public ScriptNotFoundException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new instance of ScriptNotFoundException.
-     *
-     * @param message
-     */
-    public ScriptNotFoundException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new instance of ScriptNotFoundException.
-     *
-     * @param cause
-     */
-    public ScriptNotFoundException(Throwable cause) {
-        super(cause);
-    }
-
-    private static final long serialVersionUID = 4200071956828484819L;
-}
\ No newline at end of file
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/ScriptSummary.java b/manager/api/src/main/java/org/apache/james/managesieve/api/ScriptSummary.java
deleted file mode 100644
index e31217c..0000000
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/ScriptSummary.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-
-package org.apache.james.managesieve.api;
-
-public class ScriptSummary {
-
-    private final String name;
-    private final boolean activeFile;
-
-    public ScriptSummary(String name, boolean activeFile) {
-        this.name = name;
-        this.activeFile = activeFile;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public boolean isActive() {
-        return activeFile;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ScriptSummary)) return false;
-
-        ScriptSummary that = (ScriptSummary) o;
-
-        if (activeFile != that.activeFile) return false;
-        return !(name != null ? !name.equals(that.name) : that.name != null);
-
-    }
-
-    @Override
-    public int hashCode() {
-        int result = name != null ? name.hashCode() : 0;
-        result = 31 * result + (activeFile ? 1 : 0);
-        return result;
-    }
-}
\ No newline at end of file
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/SieveRepository.java b/manager/api/src/main/java/org/apache/james/managesieve/api/SieveRepository.java
deleted file mode 100644
index 777235c..0000000
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/SieveRepository.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-
-package org.apache.james.managesieve.api;
-
-import java.util.List;
-
-
-
-/**
- * <code>SieveRepository</code>
- */
-public interface SieveRepository {
-    
-    abstract public void haveSpace(String user, String name, long size) throws UserNotFoundException, QuotaExceededException;
-    
-    /**
-     * PutScript.
-     *
-     * <p><strong>Note:</strong> It is the responsibility of the caller to validate the script to be put.
-     *
-     * @param user
-     * @param name
-     * @param content
-     * @throws UserNotFoundException
-     * @throws StorageException
-     * @throws QuotaExceededException
-     */
-    abstract public void putScript(String user, String name, String content) throws UserNotFoundException, StorageException, QuotaExceededException;
-    
-    abstract public List<ScriptSummary> listScripts(String user) throws UserNotFoundException;
-    
-    abstract public String getActive(String user) throws UserNotFoundException, ScriptNotFoundException;
-    
-    abstract public void setActive(String user, String name) throws UserNotFoundException, ScriptNotFoundException, StorageException;
-    
-    abstract public String getScript(String user, String name) throws UserNotFoundException, ScriptNotFoundException;
-    
-    abstract public void deleteScript(String user, String name) throws UserNotFoundException, ScriptNotFoundException, IsActiveException, StorageException;
-    
-    abstract public void renameScript(String user, String oldName, String newName) throws UserNotFoundException, ScriptNotFoundException, DuplicateException, StorageException;
-    
-    abstract public boolean hasUser(String user);
-    
-    abstract public void addUser(String user) throws DuplicateUserException, StorageException;
-    
-    abstract public void removeUser(String user) throws UserNotFoundException, StorageException;
-
-    abstract public boolean hasQuota();
-    
-    abstract public long getQuota() throws QuotaNotFoundException;
-    
-    abstract public void setQuota(long quota) throws StorageException;
-    
-    abstract public void removeQuota() throws QuotaNotFoundException, StorageException;
-    
-    abstract public boolean hasQuota(String user) throws UserNotFoundException;
-    
-    abstract public long getQuota(String user) throws UserNotFoundException, QuotaNotFoundException;
-    
-    abstract public void setQuota(String user, long quota) throws UserNotFoundException, StorageException;
-    
-    abstract public void removeQuota(String user) throws UserNotFoundException, QuotaNotFoundException, StorageException;
-
-}
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/StorageException.java b/manager/api/src/main/java/org/apache/james/managesieve/api/StorageException.java
deleted file mode 100644
index e59b56e..0000000
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/StorageException.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-
-package org.apache.james.managesieve.api;
-
-/**
- * <code>StorageException</code>
- */
-public class StorageException extends ManageSieveException {
-
-    private static final long serialVersionUID = 7374111339714642386L;
-
-    /**
-     * Creates a new instance of StorageException.
-     *
-     */
-    public StorageException() {
-        super();
-    }
-
-    /**
-     * Creates a new instance of StorageException.
-     *
-     * @param message
-     * @param cause
-     */
-    public StorageException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new instance of StorageException.
-     *
-     * @param message
-     */
-    public StorageException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new instance of StorageException.
-     *
-     * @param cause
-     */
-    public StorageException(Throwable cause) {
-        super(cause);
-    }
-
-}
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/UserNotFoundException.java b/manager/api/src/main/java/org/apache/james/managesieve/api/UserNotFoundException.java
deleted file mode 100644
index c14d197..0000000
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/UserNotFoundException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-
-package org.apache.james.managesieve.api;
-
-public class UserNotFoundException extends ManageSieveException
-{
-    /**
-     * Creates a new instance of UserNotFoundException.
-     *
-     */
-    public UserNotFoundException() {
-        super();
-    }
-
-    /**
-     * Creates a new instance of UserNotFoundException.
-     *
-     * @param message
-     * @param cause
-     */
-    public UserNotFoundException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new instance of UserNotFoundException.
-     *
-     * @param message
-     */
-    public UserNotFoundException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new instance of UserNotFoundException.
-     *
-     * @param cause
-     */
-    public UserNotFoundException(Throwable cause) {
-        super(cause);
-    }
-
-    private static final long serialVersionUID = -5075227645788455698L;
-}
\ No newline at end of file
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/DeleteScript.java b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/DeleteScript.java
index e224eb6..e4d9b08 100644
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/DeleteScript.java
+++ b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/DeleteScript.java
@@ -21,8 +21,8 @@
 package org.apache.james.managesieve.api.commands;
 
 import org.apache.james.managesieve.api.AuthenticationRequiredException;
-import org.apache.james.managesieve.api.IsActiveException;
-import org.apache.james.managesieve.api.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.exception.IsActiveException;
+import org.apache.james.sieverepository.api.exception.ScriptNotFoundException;
 
 /**
  * <code>DeleteScript</code>
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/GetActive.java b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/GetActive.java
index 578a64a..7bc5d34 100644
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/GetActive.java
+++ b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/GetActive.java
@@ -21,7 +21,8 @@
 package org.apache.james.managesieve.api.commands;
 
 import org.apache.james.managesieve.api.AuthenticationRequiredException;
-import org.apache.james.managesieve.api.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.exception.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.exception.StorageException;
 
 /**
  * <code>GetScript</code> is an extension to the commands defined by RFC 5804. It provides a means
@@ -31,6 +32,6 @@
  */
 public interface GetActive {
     
-    abstract public String getActive() throws AuthenticationRequiredException, ScriptNotFoundException;
+    abstract public String getActive() throws AuthenticationRequiredException, ScriptNotFoundException, StorageException;
 
 }
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/GetScript.java b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/GetScript.java
index 9b19e42..5d8a7cd 100644
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/GetScript.java
+++ b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/GetScript.java
@@ -21,7 +21,8 @@
 package org.apache.james.managesieve.api.commands;
 
 import org.apache.james.managesieve.api.AuthenticationRequiredException;
-import org.apache.james.managesieve.api.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.exception.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.exception.StorageException;
 
 /**
  * <code>GetScript</code>
@@ -30,6 +31,6 @@
  */
 public interface GetScript {
     
-    abstract public String getScript(String name) throws AuthenticationRequiredException, ScriptNotFoundException;
+    abstract public String getScript(String name) throws AuthenticationRequiredException, ScriptNotFoundException, StorageException;
 
 }
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/HaveSpace.java b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/HaveSpace.java
index 3d56d89..c4a6459 100644
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/HaveSpace.java
+++ b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/HaveSpace.java
@@ -21,7 +21,7 @@
 package org.apache.james.managesieve.api.commands;
 
 import org.apache.james.managesieve.api.AuthenticationRequiredException;
-import org.apache.james.managesieve.api.QuotaExceededException;
+import org.apache.james.sieverepository.api.exception.QuotaExceededException;
 
 /**
  * <code>HaveSpace</code>
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/ListScripts.java b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/ListScripts.java
index 93d2cdc..8bc26c1 100644
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/ListScripts.java
+++ b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/ListScripts.java
@@ -23,7 +23,7 @@
 import java.util.List;
 
 import org.apache.james.managesieve.api.AuthenticationRequiredException;
-import org.apache.james.managesieve.api.ScriptSummary;
+import org.apache.james.sieverepository.api.ScriptSummary;
 
 /**
  * <code>ListScripts</code>
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/PutScript.java b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/PutScript.java
index f51979a..8f55abc 100644
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/PutScript.java
+++ b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/PutScript.java
@@ -23,8 +23,8 @@
 import java.util.List;
 
 import org.apache.james.managesieve.api.AuthenticationRequiredException;
-import org.apache.james.managesieve.api.QuotaExceededException;
 import org.apache.james.managesieve.api.SyntaxException;
+import org.apache.james.sieverepository.api.exception.QuotaExceededException;
 
 /**
  * <code>PutScript</code>
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/RenameScript.java b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/RenameScript.java
index cea4ce5..6b61694 100644
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/RenameScript.java
+++ b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/RenameScript.java
@@ -21,8 +21,8 @@
 package org.apache.james.managesieve.api.commands;
 
 import org.apache.james.managesieve.api.AuthenticationRequiredException;
-import org.apache.james.managesieve.api.DuplicateException;
-import org.apache.james.managesieve.api.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.exception.DuplicateException;
+import org.apache.james.sieverepository.api.exception.ScriptNotFoundException;
 
 /**
  * <code>RenameScript</code>
diff --git a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/SetActive.java b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/SetActive.java
index ee98f97..59c1048 100644
--- a/manager/api/src/main/java/org/apache/james/managesieve/api/commands/SetActive.java
+++ b/manager/api/src/main/java/org/apache/james/managesieve/api/commands/SetActive.java
@@ -21,7 +21,7 @@
 package org.apache.james.managesieve.api.commands;
 
 import org.apache.james.managesieve.api.AuthenticationRequiredException;
-import org.apache.james.managesieve.api.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.exception.ScriptNotFoundException;
 
 /**
  * <code>SetActive</code>
diff --git a/manager/core/pom.xml b/manager/core/pom.xml
index c16697c..7feacc7 100644
--- a/manager/core/pom.xml
+++ b/manager/core/pom.xml
@@ -40,5 +40,9 @@
             <artifactId>apache-jsieve-manager-mock</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.james</groupId>
+            <artifactId>james-server-data-api</artifactId>
+        </dependency>
     </dependencies>
 </project>
diff --git a/manager/core/src/main/java/org/apache/james/managesieve/core/CoreProcessor.java b/manager/core/src/main/java/org/apache/james/managesieve/core/CoreProcessor.java
index 2c729e4..044fa47 100644
--- a/manager/core/src/main/java/org/apache/james/managesieve/core/CoreProcessor.java
+++ b/manager/core/src/main/java/org/apache/james/managesieve/core/CoreProcessor.java
@@ -25,21 +25,22 @@
 import java.util.Map;
 
 import org.apache.james.managesieve.api.AuthenticationRequiredException;
-import org.apache.james.managesieve.api.DuplicateException;
-import org.apache.james.managesieve.api.DuplicateUserException;
-import org.apache.james.managesieve.api.IsActiveException;
 import org.apache.james.managesieve.api.ManageSieveRuntimeException;
-import org.apache.james.managesieve.api.QuotaExceededException;
-import org.apache.james.managesieve.api.ScriptNotFoundException;
-import org.apache.james.managesieve.api.ScriptSummary;
 import org.apache.james.managesieve.api.Session;
 import org.apache.james.managesieve.api.SieveParser;
-import org.apache.james.managesieve.api.SieveRepository;
-import org.apache.james.managesieve.api.StorageException;
 import org.apache.james.managesieve.api.SyntaxException;
-import org.apache.james.managesieve.api.UserNotFoundException;
 import org.apache.james.managesieve.api.Session.UserListener;
 import org.apache.james.managesieve.api.commands.CoreCommands;
+import org.apache.james.sieverepository.api.exception.DuplicateException;
+import org.apache.james.sieverepository.api.exception.DuplicateUserException;
+import org.apache.james.sieverepository.api.exception.IsActiveException;
+import org.apache.james.sieverepository.api.exception.QuotaExceededException;
+import org.apache.james.sieverepository.api.exception.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.ScriptSummary;
+import org.apache.james.sieverepository.api.SieveRepository;
+import org.apache.james.sieverepository.api.exception.SieveRepositoryException;
+import org.apache.james.sieverepository.api.exception.StorageException;
+import org.apache.james.sieverepository.api.exception.UserNotFoundException;
 
 /**
  * <code>CoreProcessor</code>
@@ -134,7 +135,7 @@
      * @see org.apache.james.managesieve.api.commands.GetScript#getScript(java.lang.String)
      */
     public String getScript(String name) throws AuthenticationRequiredException,
-            ScriptNotFoundException {
+        ScriptNotFoundException, StorageException {
         authenticationCheck();
         String script = null;
         try {
@@ -154,7 +155,7 @@
         authenticationCheck();
         try {
             _repository.haveSpace(getUser(), name, size);
-        } catch (UserNotFoundException ex) {
+        } catch (SieveRepositoryException ex) {
             // Should not happen as the UserListener should ensure the session user is defined in the repository
             throw new ManageSieveRuntimeException(ex);
         }
@@ -168,7 +169,7 @@
         List<ScriptSummary> summaries = null;
         try {
             summaries = _repository.listScripts(getUser());
-        } catch (UserNotFoundException ex) {
+        } catch (SieveRepositoryException ex) {
             // Should not happen as the UserListener should ensure the session user is defined in the repository
             throw new ManageSieveRuntimeException(ex);
         }
@@ -231,18 +232,13 @@
         return _session.getUser();
     }
     
-    protected void ensureUser(String user)
-    {
-        if (!_repository.hasUser(user))
-        {
-            try {
+    protected void ensureUser(String user) {
+        try {
+            if (!_repository.hasUser(user)) {
                 _repository.addUser(user);
-            } catch (DuplicateUserException ex) {
-                // Should never happen as we checked first!
-                throw new ManageSieveRuntimeException(ex);
-            } catch (StorageException ex) {
-                throw new ManageSieveRuntimeException(ex);
             }
+        } catch (SieveRepositoryException ex) {
+            throw new ManageSieveRuntimeException(ex);
         }
     }
     
@@ -262,7 +258,7 @@
     /**
      * @see org.apache.james.managesieve.api.commands.GetActive#getActive()
      */
-    public String getActive() throws AuthenticationRequiredException, ScriptNotFoundException {
+    public String getActive() throws AuthenticationRequiredException, ScriptNotFoundException, StorageException {
         authenticationCheck();
         
         String script = null;
diff --git a/manager/core/src/main/java/org/apache/james/managesieve/transcode/LineToCore.java b/manager/core/src/main/java/org/apache/james/managesieve/transcode/LineToCore.java
index 10c8b50..977b5e4 100644
--- a/manager/core/src/main/java/org/apache/james/managesieve/transcode/LineToCore.java
+++ b/manager/core/src/main/java/org/apache/james/managesieve/transcode/LineToCore.java
@@ -28,15 +28,16 @@
 
 import org.apache.james.managesieve.api.ArgumentException;
 import org.apache.james.managesieve.api.AuthenticationRequiredException;
-import org.apache.james.managesieve.api.DuplicateException;
-import org.apache.james.managesieve.api.IsActiveException;
-import org.apache.james.managesieve.api.QuotaExceededException;
-import org.apache.james.managesieve.api.ScriptNotFoundException;
-import org.apache.james.managesieve.api.ScriptSummary;
 import org.apache.james.managesieve.api.SyntaxException;
 import org.apache.james.managesieve.api.commands.CoreCommands;
 import org.apache.james.managesieve.api.commands.Capability.Capabilities;
 import org.apache.james.managesieve.util.ParserUtils;
+import org.apache.james.sieverepository.api.exception.DuplicateException;
+import org.apache.james.sieverepository.api.exception.IsActiveException;
+import org.apache.james.sieverepository.api.exception.QuotaExceededException;
+import org.apache.james.sieverepository.api.exception.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.ScriptSummary;
+import org.apache.james.sieverepository.api.exception.StorageException;
 
 /**
  * <code>LineToCore</code>
@@ -88,8 +89,7 @@
         _core.deleteScript(ParserUtils.unquote(scriptName));
     }    
     
-    public String getScript(String args) throws AuthenticationRequiredException, ScriptNotFoundException, ArgumentException
-    {
+    public String getScript(String args) throws AuthenticationRequiredException, ScriptNotFoundException, ArgumentException, StorageException {
         String scriptName = ParserUtils.getScriptName(args);
         if (null == scriptName || scriptName.isEmpty())
         {
@@ -200,8 +200,7 @@
         _core.setActive(ParserUtils.unquote(scriptName));
     } 
     
-    public String getActive(String args) throws AuthenticationRequiredException, ScriptNotFoundException, ArgumentException
-    {
+    public String getActive(String args) throws AuthenticationRequiredException, ScriptNotFoundException, ArgumentException, StorageException {
         Scanner scanner = new Scanner(args.trim()).useDelimiter("\\A");
         if (scanner.hasNext())
         {
diff --git a/manager/core/src/main/java/org/apache/james/managesieve/transcode/LineToCoreToLine.java b/manager/core/src/main/java/org/apache/james/managesieve/transcode/LineToCoreToLine.java
index 27f4e5d..8b8217e 100644
--- a/manager/core/src/main/java/org/apache/james/managesieve/transcode/LineToCoreToLine.java
+++ b/manager/core/src/main/java/org/apache/james/managesieve/transcode/LineToCoreToLine.java
@@ -26,13 +26,14 @@
 
 import org.apache.james.managesieve.api.ArgumentException;
 import org.apache.james.managesieve.api.AuthenticationRequiredException;
-import org.apache.james.managesieve.api.DuplicateException;
-import org.apache.james.managesieve.api.IsActiveException;
-import org.apache.james.managesieve.api.QuotaExceededException;
-import org.apache.james.managesieve.api.ScriptNotFoundException;
-import org.apache.james.managesieve.api.ScriptSummary;
 import org.apache.james.managesieve.api.SyntaxException;
 import org.apache.james.managesieve.api.commands.Capability.Capabilities;
+import org.apache.james.sieverepository.api.exception.DuplicateException;
+import org.apache.james.sieverepository.api.exception.IsActiveException;
+import org.apache.james.sieverepository.api.exception.QuotaExceededException;
+import org.apache.james.sieverepository.api.exception.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.ScriptSummary;
+import org.apache.james.sieverepository.api.exception.StorageException;
 
 /**
  * <code>LineToCoreToLine</code>
@@ -127,6 +128,8 @@
             return "NO (NONEXISTENT) \"There is no script by that name\"";
         } catch (ArgumentException ex) {
             return "NO \"" + ex.getMessage() + "\"";
+        } catch (StorageException ex) {
+            return "NO \"" + ex.getMessage() + "\"";
         }
         StringBuilder builder = new StringBuilder(content);
         builder
@@ -243,6 +246,8 @@
             return "NO (NONEXISTENT) \"" + ex.getMessage() + "\"";
         } catch (ArgumentException ex) {
             return "NO \"" + ex.getMessage() + "\"";
+        } catch (StorageException ex) {
+            return "NO \"" + ex.getMessage() + "\"";
         }
         StringBuilder builder = new StringBuilder(content);
         builder
diff --git a/manager/core/src/test/java/org/apache/james/managesieve/core/CoreProcessorTestCase.java b/manager/core/src/test/java/org/apache/james/managesieve/core/CoreProcessorTestCase.java
index 033633e..4d9da8e 100644
--- a/manager/core/src/test/java/org/apache/james/managesieve/core/CoreProcessorTestCase.java
+++ b/manager/core/src/test/java/org/apache/james/managesieve/core/CoreProcessorTestCase.java
@@ -20,11 +20,18 @@
 
 package org.apache.james.managesieve.core;
 
-import org.apache.james.managesieve.api.*;
+import org.apache.james.managesieve.api.AuthenticationRequiredException;
+import org.apache.james.managesieve.api.SyntaxException;
 import org.apache.james.managesieve.api.commands.Capability.Capabilities;
 import org.apache.james.managesieve.mock.MockSession;
 import org.apache.james.managesieve.mock.MockSieveParser;
 import org.apache.james.managesieve.mock.MockSieveRepository;
+import org.apache.james.sieverepository.api.exception.IsActiveException;
+import org.apache.james.sieverepository.api.exception.QuotaExceededException;
+import org.apache.james.sieverepository.api.exception.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.ScriptSummary;
+import org.apache.james.sieverepository.api.exception.StorageException;
+import org.apache.james.sieverepository.api.exception.UserNotFoundException;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -175,9 +182,17 @@
         session.setAuthentication(true);
         session.setUser("test");
         try {
+            System.out.println("hello");
             core.getScript("script");
+            System.out.println("yop yop");
         } catch (ScriptNotFoundException ex) {
+            System.out.println("toto");
             success = true;
+            ex.printStackTrace();
+        } catch (Exception e) {
+            System.out.println("Euh ... ");
+            e.printStackTrace();
+            System.out.println("Yolo");
         }
         assertTrue("Expected ScriptNotFoundException", success);
 
diff --git a/manager/mailet/src/main/java/org/apache/james/managesieve/mailet/ManageSieveMailet.java b/manager/mailet/src/main/java/org/apache/james/managesieve/mailet/ManageSieveMailet.java
index de1e92c..4f40506 100644
--- a/manager/mailet/src/main/java/org/apache/james/managesieve/mailet/ManageSieveMailet.java
+++ b/manager/mailet/src/main/java/org/apache/james/managesieve/mailet/ManageSieveMailet.java
@@ -30,13 +30,13 @@
 import javax.mail.MessagingException;
 
 import org.apache.james.managesieve.api.SieveParser;
-import org.apache.james.managesieve.api.SieveRepository;
 import org.apache.james.managesieve.core.CoreProcessor;
 import org.apache.james.managesieve.mailet.transcode.MessageToCoreToMessage;
 import org.apache.james.managesieve.mailet.transcode.MessageToCoreToMessage.HelpProvider;
 import org.apache.james.managesieve.transcode.LineToCore;
 import org.apache.james.managesieve.transcode.LineToCoreToLine;
 import org.apache.james.managesieve.util.SettableSession;
+import org.apache.james.sieverepository.api.SieveRepository;
 import org.apache.mailet.Mail;
 import org.apache.mailet.MailAddress;
 import org.apache.mailet.base.GenericMailet;
diff --git a/manager/mailet/src/test/java/org/apache/james/managesieve/mailet/ManageSieveMailetTestCase.java b/manager/mailet/src/test/java/org/apache/james/managesieve/mailet/ManageSieveMailetTestCase.java
index 63f6e9b..ca51738 100644
--- a/manager/mailet/src/test/java/org/apache/james/managesieve/mailet/ManageSieveMailetTestCase.java
+++ b/manager/mailet/src/test/java/org/apache/james/managesieve/mailet/ManageSieveMailetTestCase.java
@@ -20,14 +20,14 @@
 
 package org.apache.james.managesieve.mailet;
 
-import org.apache.james.managesieve.api.DuplicateUserException;
-import org.apache.james.managesieve.api.QuotaExceededException;
-import org.apache.james.managesieve.api.ScriptNotFoundException;
-import org.apache.james.managesieve.api.SieveRepository;
-import org.apache.james.managesieve.api.StorageException;
-import org.apache.james.managesieve.api.UserNotFoundException;
 import org.apache.james.managesieve.mock.MockSieveParser;
 import org.apache.james.managesieve.mock.MockSieveRepository;
+import org.apache.james.sieverepository.api.exception.DuplicateUserException;
+import org.apache.james.sieverepository.api.exception.QuotaExceededException;
+import org.apache.james.sieverepository.api.exception.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.SieveRepository;
+import org.apache.james.sieverepository.api.exception.StorageException;
+import org.apache.james.sieverepository.api.exception.UserNotFoundException;
 import org.apache.mailet.Mail;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -155,7 +155,7 @@
     }
 
     @Test
-    public final void testPutScript() throws MessagingException, IOException, UserNotFoundException, ScriptNotFoundException {
+    public final void testPutScript() throws MessagingException, IOException, UserNotFoundException, ScriptNotFoundException, StorageException {
         MimeMessage message = new MimeMessage(Session.getDefaultInstance(new Properties()));
         String scriptName = "scriptName";
         String scriptContent = "scriptContent";
diff --git a/manager/mock/pom.xml b/manager/mock/pom.xml
index e9f7657..fd6366f 100644
--- a/manager/mock/pom.xml
+++ b/manager/mock/pom.xml
@@ -36,5 +36,9 @@
             <groupId>org.apache.james</groupId>
             <artifactId>apache-jsieve-manager-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.james</groupId>
+            <artifactId>james-server-data-api</artifactId>
+        </dependency>
     </dependencies>
 </project>
diff --git a/manager/mock/src/main/java/org/apache/james/managesieve/mock/MockSieveRepository.java b/manager/mock/src/main/java/org/apache/james/managesieve/mock/MockSieveRepository.java
index ef9fc03..b939473 100644
--- a/manager/mock/src/main/java/org/apache/james/managesieve/mock/MockSieveRepository.java
+++ b/manager/mock/src/main/java/org/apache/james/managesieve/mock/MockSieveRepository.java
@@ -20,6 +20,17 @@
 
 package org.apache.james.managesieve.mock;
 
+import org.apache.james.sieverepository.api.exception.DuplicateException;
+import org.apache.james.sieverepository.api.exception.DuplicateUserException;
+import org.apache.james.sieverepository.api.exception.IsActiveException;
+import org.apache.james.sieverepository.api.exception.QuotaExceededException;
+import org.apache.james.sieverepository.api.exception.QuotaNotFoundException;
+import org.apache.james.sieverepository.api.exception.ScriptNotFoundException;
+import org.apache.james.sieverepository.api.ScriptSummary;
+import org.apache.james.sieverepository.api.SieveRepository;
+import org.apache.james.sieverepository.api.exception.StorageException;
+import org.apache.james.sieverepository.api.exception.UserNotFoundException;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -27,16 +38,6 @@
 import java.util.Set;
 import java.util.Map.Entry;
 
-import org.apache.james.managesieve.api.DuplicateException;
-import org.apache.james.managesieve.api.DuplicateUserException;
-import org.apache.james.managesieve.api.IsActiveException;
-import org.apache.james.managesieve.api.QuotaExceededException;
-import org.apache.james.managesieve.api.QuotaNotFoundException;
-import org.apache.james.managesieve.api.ScriptNotFoundException;
-import org.apache.james.managesieve.api.ScriptSummary;
-import org.apache.james.managesieve.api.SieveRepository;
-import org.apache.james.managesieve.api.StorageException;
-import org.apache.james.managesieve.api.UserNotFoundException;
 
 /**
  * <code>MockSieveRepository</code>
@@ -121,7 +122,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#addUser(java.lang.String)
+     * @see SieveRepository#addUser(java.lang.String)
      */
     public void addUser(String user) throws DuplicateUserException, StorageException {
         if (_repository.containsKey(user))
@@ -132,7 +133,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#deleteScript(java.lang.String, java.lang.String)
+     * @see SieveRepository#deleteScript(java.lang.String, java.lang.String)
      */
     public void deleteScript(String user, String name) throws UserNotFoundException,
             ScriptNotFoundException, IsActiveException, StorageException {
@@ -153,7 +154,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#getActive(java.lang.String)
+     * @see SieveRepository#getActive(java.lang.String)
      */
     public String getActive(String user) throws UserNotFoundException, ScriptNotFoundException {
         if (!_repository.containsKey(user))
@@ -178,7 +179,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#getQuota()
+     * @see SieveRepository#getQuota()
      */
     public long getQuota() throws QuotaNotFoundException {
         // TODO Auto-generated method stub
@@ -186,7 +187,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#getQuota(java.lang.String)
+     * @see SieveRepository#getQuota(java.lang.String)
      */
     public long getQuota(String user) throws UserNotFoundException, QuotaNotFoundException {
         // TODO Auto-generated method stub
@@ -194,7 +195,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#getScript(java.lang.String, java.lang.String)
+     * @see SieveRepository#getScript(java.lang.String, java.lang.String)
      */
     public String getScript(String user, String name) throws UserNotFoundException,
             ScriptNotFoundException {
@@ -211,7 +212,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#hasQuota()
+     * @see SieveRepository#hasQuota()
      */
     public boolean hasQuota() {
         // TODO Auto-generated method stub
@@ -219,7 +220,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#hasQuota(java.lang.String)
+     * @see SieveRepository#hasQuota(java.lang.String)
      */
     public boolean hasQuota(String user) throws UserNotFoundException {
         // TODO Auto-generated method stub
@@ -227,14 +228,14 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#hasUser(java.lang.String)
+     * @see SieveRepository#hasUser(java.lang.String)
      */
     public boolean hasUser(String user) {
         return _repository.containsKey(user);
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#haveSpace(java.lang.String, java.lang.String, long)
+     * @see SieveRepository#haveSpace(java.lang.String, java.lang.String, long)
      */
     public void haveSpace(String user, String name, long size) throws UserNotFoundException,
             QuotaExceededException {
@@ -245,7 +246,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#listScripts(java.lang.String)
+     * @see SieveRepository#listScripts(java.lang.String)
      */
     public List<ScriptSummary> listScripts(String user) throws UserNotFoundException {
         if (!_repository.containsKey(user))
@@ -261,7 +262,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#putScript(java.lang.String, java.lang.String, java.lang.String)
+     * @see SieveRepository#putScript(java.lang.String, java.lang.String, java.lang.String)
      */
     public void putScript(String user, String name, String content) throws UserNotFoundException,
             StorageException, QuotaExceededException {
@@ -274,7 +275,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#removeQuota()
+     * @see SieveRepository#removeQuota()
      */
     public void removeQuota() throws QuotaNotFoundException, StorageException {
         // TODO Auto-generated method stub
@@ -282,7 +283,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#removeQuota(java.lang.String)
+     * @see SieveRepository#removeQuota(java.lang.String)
      */
     public void removeQuota(String user) throws UserNotFoundException, QuotaNotFoundException,
             StorageException {
@@ -291,7 +292,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#removeUser(java.lang.String)
+     * @see SieveRepository#removeUser(java.lang.String)
      */
     public void removeUser(String user) throws UserNotFoundException, StorageException {
         // TODO Auto-generated method stub
@@ -299,7 +300,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#renameScript(java.lang.String, java.lang.String, java.lang.String)
+     * @see SieveRepository#renameScript(java.lang.String, java.lang.String, java.lang.String)
      */
     public void renameScript(String user, String oldName, String newName)
             throws UserNotFoundException, ScriptNotFoundException,
@@ -309,7 +310,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#setActive(java.lang.String, java.lang.String)
+     * @see SieveRepository#setActive(java.lang.String, java.lang.String)
      */
     public void setActive(String user, String name) throws UserNotFoundException,
             ScriptNotFoundException, StorageException {
@@ -350,7 +351,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#setQuota(long)
+     * @see SieveRepository#setQuota(long)
      */
     public void setQuota(long quota) throws StorageException {
         // TODO Auto-generated method stub
@@ -358,7 +359,7 @@
     }
 
     /**
-     * @see org.apache.james.managesieve.api.SieveRepository#setQuota(java.lang.String, long)
+     * @see SieveRepository#setQuota(java.lang.String, long)
      */
     public void setQuota(String user, long quota) throws UserNotFoundException, StorageException {
         // TODO Auto-generated method stub
diff --git a/manager/pom.xml b/manager/pom.xml
index 5793854..e0c8c8e 100644
--- a/manager/pom.xml
+++ b/manager/pom.xml
@@ -41,4 +41,14 @@
         <module>mock</module>
     </modules>
 
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.james</groupId>
+                <artifactId>james-server-data-api</artifactId>
+                <version>3.0.0-beta5-SNAPSHOT</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
 </project>