Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IDIFGroup |
|
| 1.0;1 |
1 | /** 2007, Digitalis Informatica. All rights reserved. | |
2 | * | |
3 | * Distribuicao e Gestao de Informatica, Lda. | |
4 | * Estrada de Paco de Arcos num.9 - Piso -1 | |
5 | * 2780-666 Paco de Arcos | |
6 | * Telefone: (351) 21 4408990 | |
7 | * Fax: (351) 21 4408999 | |
8 | * http://www.digitalis.pt | |
9 | */ | |
10 | ||
11 | package pt.digitalis.dif.controller.security.objects; | |
12 | ||
13 | import java.util.Map; | |
14 | import java.util.Set; | |
15 | ||
16 | import pt.digitalis.dif.exception.security.IdentityManagerException; | |
17 | ||
18 | /** | |
19 | * Defines the expected behavior of a DIF group of users. | |
20 | * | |
21 | * @author Rodrigo Gonçalves <a href="mailto:rgoncalves@digitalis.pt">rgoncalves@digitalis.pt</a><br/> | |
22 | * @author Pedro Viegas <a href="mailto:pviegas@digitalis.pt">pviegas@digitalis.pt</a> | |
23 | * @created 2007/12/04 | |
24 | */ | |
25 | public interface IDIFGroup extends Cloneable { | |
26 | ||
27 | /** | |
28 | * Returns the group id. | |
29 | * | |
30 | * @return the group id | |
31 | */ | |
32 | public String getID(); | |
33 | ||
34 | /** | |
35 | * Sets a new id for the group. | |
36 | * | |
37 | * @param newGroupId | |
38 | * the new group id | |
39 | */ | |
40 | public void setID(String newGroupId); | |
41 | ||
42 | /** | |
43 | * Returns the group name. | |
44 | * | |
45 | * @return the group name | |
46 | */ | |
47 | public String getName(); | |
48 | ||
49 | /** | |
50 | * Sets a new name for the group. | |
51 | * | |
52 | * @param newName | |
53 | * the new group name | |
54 | */ | |
55 | public void setName(String newName); | |
56 | ||
57 | /** | |
58 | * Returns the group description. | |
59 | * | |
60 | * @return the group description | |
61 | */ | |
62 | public String getDescription(); | |
63 | ||
64 | /** | |
65 | * Sets a new description for the group. | |
66 | * | |
67 | * @param newDescription | |
68 | * the new group description | |
69 | */ | |
70 | public void setDescription(String newDescription); | |
71 | ||
72 | /** | |
73 | * Returns the parent group ID. | |
74 | * | |
75 | * @return the parent group id | |
76 | */ | |
77 | public String getParentGroupID(); | |
78 | ||
79 | /** | |
80 | * Sets a new parent for the group. | |
81 | * | |
82 | * @param newParent | |
83 | * the new parent group | |
84 | */ | |
85 | public void setParentGroupID(String newParent); | |
86 | ||
87 | /** | |
88 | * Returns the parent group. | |
89 | * | |
90 | * @return the parent group | |
91 | * @throws IdentityManagerException if the parent group can't be found on the identity manager | |
92 | */ | |
93 | public IDIFGroup getParentGroup() throws IdentityManagerException; | |
94 | ||
95 | /** | |
96 | * Retrieves the list of users associated with this group | |
97 | * | |
98 | * @return the groups | |
99 | * @throws IdentityManagerException | |
100 | * if the users can't be found on the identity manager | |
101 | */ | |
102 | public Map<String, IDIFUser> getUsers() throws IdentityManagerException; | |
103 | ||
104 | /** | |
105 | * Retrieves the list of user IDs associated with this group | |
106 | * | |
107 | * @return the groups | |
108 | * @throws IdentityManagerException | |
109 | * if the users can't be found on the identity manager | |
110 | */ | |
111 | public Set<String> getUserIDs() throws IdentityManagerException; | |
112 | ||
113 | /** | |
114 | * Returns a new clone of the current group | |
115 | * | |
116 | * @return the clone object | |
117 | */ | |
118 | public IDIFGroup cloneGroup(); | |
119 | ||
120 | /** | |
121 | * A default group is a group that is created by the default configuration of the application. As such it cannot be | |
122 | * deleted. Only disabled. | |
123 | * | |
124 | * @return T if the user is a default group | |
125 | */ | |
126 | public boolean isDefault(); | |
127 | ||
128 | /** | |
129 | * Sets the group as a 'default group'. | |
130 | * | |
131 | * @param isDefault T if the group must be set as a default group, F otherwise | |
132 | */ | |
133 | public void setDefault(boolean isDefault); | |
134 | } |