1 package org.apache.slide.projector.repository; 2 3 import java.io.IOException ; 4 import java.util.Map ; 5 6 import org.apache.commons.httpclient.Credentials; 7 import org.apache.slide.projector.URI; 8 import org.apache.slide.projector.value.ArrayValue; 9 import org.apache.slide.projector.value.StreamableValue; 10 import org.apache.slide.projector.value.Value; 11 import org.apache.webdav.lib.Subscriber; 12 13 17 public interface Repository { 18 public Credentials login(String user, String password) throws IOException ; 19 20 public URI createUser(String user, String password, Credentials credentials) throws UserExistsException, IOException ; 21 22 public void deleteUser(URI user, Credentials credentials) throws IOException ; 23 24 public URI createRole(String role, Credentials credentials) throws RoleExistsException, IOException ; 25 26 public void deleteRole(URI role, Credentials credentials) throws IOException ; 27 28 public ArrayValue listRoles(URI user, Credentials credentials) throws IOException ; 29 30 public void addRole(URI user, URI role, Credentials credentials) throws UserExistsException, IOException ; 31 32 public void removeRole(URI user, URI role, Credentials credentials) throws UserExistsException, IOException ; 33 34 public void changePassword(URI uri, String oldPassword, String newPassword, Credentials credentials) throws IOException ; 35 36 public Value getResource(URI uri, Credentials credentials) throws IOException ; 37 38 public ArrayValue getProperties(URI uri, Credentials credentials) throws IOException ; 39 40 public void setResource(URI uri, StreamableValue resource, Credentials credentials) throws IOException ; 41 42 public void removeResource(URI uri, Credentials credentials) throws IOException ; 43 44 public ArrayValue getChildren(URI uri, Credentials credentials) throws IOException ; 45 46 public Value[] search(String query, Credentials credentials) throws IOException ; 47 48 public void subscribe(String method, URI uri, int depth, Subscriber listener, Credentials credentials); 49 50 public void subscribe(String method, URI uri, int depth, int lifetime, int notificationDelay, Subscriber listener, Credentials credentials); 51 52 public void unsubscribe(URI uri, Subscriber listener, Credentials credentials); 53 54 public void fireEvent(Map information, Credentials credentials) throws IOException ; 55 56 public void fireVetoableEvent(Map information, Credentials credentials) throws IOException ; 57 } 58 | Popular Tags |