View Javadoc

1   /*
2    * <cvs:source>$Source: /devel/astrogrid/community/common/src/java/org/astrogrid/community/common/policy/service/PolicyServiceMock.java,v $</cvs:source>
3    * <cvs:author>$Author: dave $</cvs:author>
4    * <cvs:date>$Date: 2004/09/16 23:18:08 $</cvs:date>
5    * <cvs:version>$Revision: 1.5 $</cvs:version>
6    *
7    * <cvs:log>
8    *   $Log: PolicyServiceMock.java,v $
9    *   Revision 1.5  2004/09/16 23:18:08  dave
10   *   Replaced debug logging in Community.
11   *   Added stream close() to FileStore.
12   *
13   *   Revision 1.4.82.1  2004/09/16 09:58:48  dave
14   *   Replaced debug with commons logging ....
15   *
16   *   Revision 1.4  2004/06/18 13:45:20  dave
17   *   Merged development branch, dave-dev-200406081614, into HEAD
18   *
19   *   Revision 1.3.52.2  2004/06/17 14:50:03  dave
20   *   Removed unused imports (PMD report).
21   *
22   *   Revision 1.3.52.1  2004/06/17 13:38:59  dave
23   *   Tidied up old CVS log entries
24   *
25   * </cvs:log>
26   *
27   */
28  package org.astrogrid.community.common.policy.service ;
29  
30  import org.apache.commons.logging.Log ;
31  import org.apache.commons.logging.LogFactory ;
32  
33  import org.astrogrid.community.common.policy.data.PolicyPermission  ;
34  import org.astrogrid.community.common.policy.data.PolicyCredentials ;
35  
36  import org.astrogrid.community.common.service.CommunityServiceMock ;
37  
38  public class PolicyServiceMock
39      extends CommunityServiceMock
40      implements PolicyService
41      {
42      /***
43       * Our debug logger.
44       *
45       */
46      private static Log log = LogFactory.getLog(PolicyServiceMock.class);
47  
48      /***
49       * Public constructor.
50       *
51       */
52      public PolicyServiceMock()
53          {
54          super() ;
55          log.debug("") ;
56          log.debug("----\"----") ;
57          log.debug("PolicyServiceMock()") ;
58          }
59  
60      /***
61       * Confirm access permissions.
62       *
63       */
64      public PolicyPermission checkPermissions(PolicyCredentials credentials, String resource, String action)
65          {
66          log.debug("") ;
67          log.debug("----\"----") ;
68          log.debug("PolicyServiceMock.checkPermissions()") ;
69          log.debug("  Credentials : " + credentials) ;
70          log.debug("  Resource    : " + resource) ;
71          log.debug("  Action      : " + action) ;
72          //
73          // TODO - return something useful.
74          return null ;
75          }
76  
77      /***
78       * Confirm group membership.
79       *
80       */
81      public PolicyCredentials checkMembership(PolicyCredentials credentials)
82          {
83          log.debug("") ;
84          log.debug("----\"----") ;
85          log.debug("PolicyServiceMock.checkMembership()") ;
86          log.debug("  Credentials : " + credentials) ;
87          //
88          // TODO - return something useful.
89          return null ;
90          }
91      }