View Javadoc

1   /*
2    * <cvs:source>$Source: /devel/astrogrid/community/common/src/java/org/astrogrid/community/common/policy/manager/GroupMemberManagerMock.java,v $</cvs:source>
3    * <cvs:author>$Author: jdt $</cvs:author>
4    * <cvs:date>$Date: 2004/11/22 13:03:04 $</cvs:date>
5    * <cvs:version>$Revision: 1.2 $</cvs:version>
6    *
7    * <cvs:log>
8    *   $Log: GroupMemberManagerMock.java,v $
9    *   Revision 1.2  2004/11/22 13:03:04  jdt
10   *   Merges from Comm_KMB_585
11   *
12   *   Revision 1.1.2.2  2004/11/08 22:08:21  KevinBenson
13   *   added groupmember and permissionmanager tests.  Changed the install.xml to use eperate file names
14   *   instead of the same filename
15   *
16   *   Revision 1.1.2.1  2004/11/05 08:55:49  KevinBenson
17   *   Moved the GroupMember out of PolicyManager in the commons and client section.
18   *   Added more unit tests for GroupMember and PermissionManager for testing.
19   *   Still have some errors that needs some fixing.
20   *
21   *   Revision 1.7  2004/09/16 23:18:08  dave
22   *   Replaced debug logging in Community.
23   *   Added stream close() to FileStore.
24   *
25   *   Revision 1.6.82.1  2004/09/16 09:58:48  dave
26   *   Replaced debug with commons logging ....
27   *
28   *   Revision 1.6  2004/06/18 13:45:20  dave
29   *   Merged development branch, dave-dev-200406081614, into HEAD
30   *
31   *   Revision 1.5.36.1  2004/06/17 13:38:59  dave
32   *   Tidied up old CVS log entries
33   *
34   * </cvs:log>
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           //TODO -- need to do something here
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           //TODO -- need to do something here
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           //TODO -- need to do something here
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           //TODO -- need to do something here
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           //TODO -- need to do something here
164           throw new CommunityPolicyException("Not implemented yet",(String)null);
165         }    
166     }