KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > methodhead > TestPolicy


1 /*
2  * Copyright (C) 2006 Methodhead Software LLC. All rights reserved.
3  *
4  * This file is part of TransferCM.
5  *
6  * TransferCM is free software; you can redistribute it and/or modify it under the
7  * terms of the GNU General Public License as published by the Free Software
8  * Foundation; either version 2 of the License, or (at your option) any later
9  * version.
10  *
11  * TransferCM is distributed in the hope that it will be useful, but WITHOUT ANY
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU General Public License along with
17  * TransferCM; if not, write to the Free Software Foundation, Inc., 51 Franklin St,
18  * Fifth Floor, Boston, MA 02110-1301 USA
19  */

20
21 package com.methodhead;
22
23 import com.methodhead.test.*;
24 import com.methodhead.sitecontext.*;
25 import com.methodhead.auth.*;
26 import com.methodhead.util.*;
27 import com.methodhead.property.*;
28 import com.methodhead.event.*;
29 import javax.servlet.http.*;
30 import org.apache.struts.action.*;
31
32 public class TestPolicy
33 implements
34   AuthPolicy,
35   SiteContextPolicy,
36   PropertyPolicy,
37   EventPolicy {
38
39   // constructors /////////////////////////////////////////////////////////////
40

41   // constants ////////////////////////////////////////////////////////////////
42

43   // classes //////////////////////////////////////////////////////////////////
44

45   // methods //////////////////////////////////////////////////////////////////
46

47   /**
48    * Returns a new {@link com.methodhead.test.TestUser TestUser}, convenient
49    * for testing. You'll most definitely want supply your own
50    * <tt>AuthPolicy</tt> implementation.
51    */

52   public AuthUser newUser() {
53     return new TestUser();
54   }
55
56   /**
57    * Returns a new {@link com.methodhead.test.TestUser TestUser}, convenient
58    * for testing. You'll most definitely want supply your own
59    * <tt>AuthPolicy</tt> implementation.
60    */

61   public SiteAuthUser newSiteUser() {
62     return new TestSiteUser();
63   }
64
65   public boolean autoLogin(
66     AuthUser user,
67     HttpServletRequest request,
68     ActionForm form ) {
69     return true;
70   }
71
72   public String JavaDoc isSiteLoginFormAuthorized(
73     OperationContext op ) {
74     return null;
75   }
76
77   public String JavaDoc isSiteLoginAuthorized(
78     OperationContext op ) {
79     return null;
80   }
81
82   public String JavaDoc isSiteLogoutAuthorized(
83     OperationContext op ) {
84     return null;
85   }
86
87   public String JavaDoc isSiteContextDeleteAuthorized(
88     OperationContext op ) {
89     return null;
90   }
91
92   public String JavaDoc isSiteContextSaveNewAuthorized(
93     OperationContext op ) {
94     return null;
95   }
96
97   public String JavaDoc isSiteContextListAuthorized(
98     OperationContext op ) {
99     return null;
100   }
101
102   public String JavaDoc isSiteContextEditAuthorized(
103     OperationContext op ) {
104     return null;
105   }
106
107   public String JavaDoc isSiteContextNewAuthorized(
108     OperationContext op ) {
109     return null;
110   }
111
112   public String JavaDoc isSiteContextSaveAuthorized(
113     OperationContext op ) {
114     return null;
115   }
116
117   public String JavaDoc isListPropertiesAuthorized(
118     OperationContext op ) {
119     return null;
120   }
121
122   public String JavaDoc isSetPropertyFormAuthorized(
123     OperationContext op ) {
124     return null;
125   }
126
127   public String JavaDoc isSetPropertyAuthorized(
128     OperationContext op ) {
129     return null;
130   }
131
132   public String JavaDoc isListEventsAuthorized(
133     OperationContext op ) {
134     return null;
135   }
136
137   // properties ///////////////////////////////////////////////////////////////
138

139   // attributes ///////////////////////////////////////////////////////////////
140
}
141
Popular Tags