KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > cms > security > Group


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2006 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.cms.security;
14
15 /**
16  * @author Sameer Charles $Id: Group.java 6341 2006-09-12 09:18:27Z philipp $
17  */

18 public interface Group {
19
20     /**
21      * get name of this node
22      * @return group name
23      */

24     public String JavaDoc getName();
25
26     /**
27      * add role to this group
28      * @param roleName
29      * @throws UnsupportedOperationException if the implementation does not support writing
30      * @throws AccessDeniedException if loggen in repository user does not sufficient rights
31      */

32     public void addRole(String JavaDoc roleName) throws UnsupportedOperationException JavaDoc, AccessDeniedException;
33
34     /**
35      * add subgroup to this group
36      * @param groupName
37      * @throws UnsupportedOperationException if the implementation does not support writing
38      * @throws AccessDeniedException if loggen in repository user does not sufficient rights
39      */

40     public void addGroup(String JavaDoc groupName) throws UnsupportedOperationException JavaDoc, AccessDeniedException;
41
42     /**
43      * remove role from this group
44      * @param roleName
45      * @throws UnsupportedOperationException if the implementation does not support writing
46      * @throws AccessDeniedException if loggen in repository user does not sufficient rights
47      */

48     public void removeRole(String JavaDoc roleName) throws UnsupportedOperationException JavaDoc, AccessDeniedException;
49
50     /**
51      * remove subgroup from this group
52      * @param groupName
53      * @throws UnsupportedOperationException if the implementation does not support writing
54      * @throws AccessDeniedException if loggen in repository user does not sufficient rights
55      */

56     public void removeGroup(String JavaDoc groupName) throws UnsupportedOperationException JavaDoc, AccessDeniedException;
57
58     /**
59      * returns true if role exist in this group
60      * @param roleName
61      * @throws UnsupportedOperationException if the implementation does not exist
62      * @throws AccessDeniedException if loggen in repository user does not sufficient rights
63      */

64     public boolean hasRole(String JavaDoc roleName) throws UnsupportedOperationException JavaDoc, AccessDeniedException;
65
66 }
67
Popular Tags