KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > store > SecurityStore


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/store/SecurityStore.java,v 1.9 2004/07/28 09:34:40 ib Exp $
3  * $Revision: 1.9 $
4  * $Date: 2004/07/28 09:34:40 $
5  *
6  * ====================================================================
7  *
8  * Copyright 1999-2002 The Apache Software Foundation
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */

23
24 package org.apache.slide.store;
25
26 import java.util.Enumeration JavaDoc;
27
28 import org.apache.slide.common.Service;
29 import org.apache.slide.common.ServiceAccessException;
30 import org.apache.slide.common.Uri;
31 import org.apache.slide.security.NodePermission;
32
33 /**
34  * Store for NodePermission objects.
35  *
36  * @version $Revision: 1.9 $
37  */

38 public interface SecurityStore extends Service {
39     
40     
41     // ------------------------------------------------------ Interface Methods
42

43     
44     /**
45      * Grant a new permission.
46      *
47      * @param permission Permission we want to create
48      * @exception ServiceAccessException Error accessing the Data Source
49      */

50     void grantPermission(Uri uri, NodePermission permission)
51         throws ServiceAccessException;
52     
53     
54     /**
55      * Revoke a permission.
56      *
57      * @param permission Permission we want to create
58      * @exception ServiceAccessException Error accessing the Data Source
59      */

60     void revokePermission(Uri uri, NodePermission permission)
61         throws ServiceAccessException;
62     
63     
64     /**
65      * Revoke all the permissions on an object.
66      *
67      * @param uri Uri of the object
68      * @exception ServiceAccessException Error accessing the Data Source
69      */

70     void revokePermissions(Uri uri)
71         throws ServiceAccessException;
72     
73     
74     /**
75      * Enumerate an object permissions.
76      *
77      * @param uri The uri of the object
78      * @exception ServiceAccessException Error accessing the Descriptors Store
79      * @return A enumeration of all
80      * {@link org.apache.slide.security.NodePermission permissions} on this object.
81      */

82     Enumeration JavaDoc enumeratePermissions(Uri uri)
83         throws ServiceAccessException;
84     
85     
86 }
87
Popular Tags