KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > security > authority > AuthorityDAO


1 /*
2  * Copyright (C) 2006 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.repo.security.authority;
18
19 import java.util.Set JavaDoc;
20
21 import org.alfresco.service.cmr.security.AuthorityType;
22
23 public interface AuthorityDAO
24 {
25     /**
26      * Add an authority to another.
27      *
28      * @param parentName
29      * @param childName
30      */

31     void addAuthority(String JavaDoc parentName, String JavaDoc childName);
32
33     /**
34      * Create an authority.
35      *
36      * @param parentName
37      * @param name
38      */

39     void createAuthority(String JavaDoc parentName, String JavaDoc name);
40
41     /**
42      * Delete an authority.
43      *
44      * @param name
45      */

46     void deleteAuthority(String JavaDoc name);
47
48     /**
49      * Get all root authorities.
50      *
51      * @param type
52      * @return
53      */

54     Set JavaDoc<String JavaDoc> getAllRootAuthorities(AuthorityType type);
55
56     /**
57      * Get contained authorities.
58      *
59      * @param type
60      * @param name
61      * @param immediate
62      * @return
63      */

64     Set JavaDoc<String JavaDoc> getContainedAuthorities(AuthorityType type, String JavaDoc name, boolean immediate);
65
66     /**
67      * Remove an authority.
68      *
69      * @param parentName
70      * @param childName
71      */

72     void removeAuthority(String JavaDoc parentName, String JavaDoc childName);
73
74     /**
75      * Get the authorities that contain the one given.
76      *
77      * @param type
78      * @param name
79      * @param immediate
80      * @return
81      */

82     Set JavaDoc<String JavaDoc> getContainingAuthorities(AuthorityType type, String JavaDoc name, boolean immediate);
83
84     /**
85      * Get all authorities by type
86      *
87      * @param type
88      * @return
89      */

90     Set JavaDoc<String JavaDoc> getAllAuthorities(AuthorityType type);
91 }
92
Popular Tags