1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 package org.astrogrid.community.common.policy.manager ;
38
39 import org.apache.commons.logging.Log ;
40 import org.apache.commons.logging.LogFactory ;
41
42 import java.util.Map ;
43 import java.util.HashMap ;
44
45 import org.astrogrid.community.common.policy.data.GroupMemberData ;
46 import org.astrogrid.community.common.service.CommunityServiceMock ;
47
48 import org.astrogrid.community.common.exception.CommunityPolicyException ;
49 import org.astrogrid.community.common.exception.CommunityIdentifierException ;
50
51 /***
52 * Mock implementation of the GroupManager service.
53 *
54 */
55 public class GroupMemberManagerMock
56 extends CommunityServiceMock
57 implements GroupMemberManager
58 {
59 /***
60 * Our debug logger.
61 *
62 */
63 private static Log log = LogFactory.getLog(GroupMemberManagerMock.class);
64
65 /***
66 * Public constructor.
67 *
68 */
69 public GroupMemberManagerMock()
70 {
71 super() ;
72 }
73
74 /***
75 * Our hash table of values.
76 *
77 */
78 private static Map map = new HashMap() ;
79
80 /***
81 * Reset our map.
82 *
83 */
84 public static void reset()
85 {
86 log.debug("") ;
87 log.debug("----\"----") ;
88 log.debug("GroupManagerMock.reset()") ;
89 map.clear() ;
90 }
91
92 /***
93 * Add a new Group, given the Group ident.
94 * @param ident The Group identifier.
95 * @return An GroupData for the Group.
96 * @throws CommunityIdentifierException If the identifier is not valid.
97 * @throws CommunityPolicyException If the identifier is already in the database.
98 *
99 */
100 public GroupMemberData addGroupMember(String account,String group)
101 throws CommunityIdentifierException, CommunityPolicyException
102 {
103
104 throw new CommunityPolicyException("Not implemented yet",account);
105 }
106
107 /***
108 * Add a new Group, given the Group ident.
109 * @param ident The Group identifier.
110 * @return An GroupData for the Group.
111 * @throws CommunityIdentifierException If the identifier is not valid.
112 * @throws CommunityPolicyException If the identifier is already in the database.
113 *
114 */
115 public GroupMemberData delGroupMember(String account,String group)
116 throws CommunityIdentifierException, CommunityPolicyException
117 {
118
119 throw new CommunityPolicyException("Not implemented yet",account);
120 }
121
122 /***
123 * Add a new Group, given the Group ident.
124 * @param ident The Group identifier.
125 * @return An GroupData for the Group.
126 * @throws CommunityIdentifierException If the identifier is not valid.
127 * @throws CommunityPolicyException If the identifier is already in the database.
128 *
129 */
130 public Object[] getGroupMembers(String group)
131 throws CommunityIdentifierException, CommunityPolicyException
132 {
133
134 throw new CommunityPolicyException("Not implemented yet",group);
135 }
136
137 /***
138 * Add a new Group, given the Group ident.
139 * @param ident The Group identifier.
140 * @return An GroupData for the Group.
141 * @throws CommunityIdentifierException If the identifier is not valid.
142 * @throws CommunityPolicyException If the identifier is already in the database.
143 *
144 */
145 public GroupMemberData getGroupMember(String account, String group)
146 throws CommunityIdentifierException, CommunityPolicyException
147 {
148
149 throw new CommunityPolicyException("Not implemented yet",group);
150 }
151
152 /***
153 * Add a new Group, given the Group ident.
154 * @param ident The Group identifier.
155 * @return An GroupData for the Group.
156 * @throws CommunityIdentifierException If the identifier is not valid.
157 * @throws CommunityPolicyException If the identifier is already in the database.
158 *
159 */
160 public Object[] getGroupMembers()
161 throws CommunityIdentifierException, CommunityPolicyException
162 {
163
164 throw new CommunityPolicyException("Not implemented yet",(String)null);
165 }
166 }