01: /*
02: * JFolder, Copyright 2001-2006 Gary Steinmetz
03: *
04: * Distributable under LGPL license.
05: * See terms of license at gnu.org.
06: */
07:
08: package org.jfolder.console.web.base;
09:
10: //base classes
11: import java.io.IOException;
12: import javax.servlet.ServletException;
13:
14: //project specific classes
15: import org.jfolder.common.utils.web.ParameterSet;
16: import org.jfolder.common.web.template.SubmitActionContext;
17: import org.jfolder.console.base.BaseConsoleServlet;
18: import org.jfolder.console.base.ConsolePageContext;
19: import org.jfolder.console.base.ConsolePageSession;
20: import org.jfolder.security.model.UserHolder;
21:
22: //other classes
23:
24: public class SamplePageServlet extends BaseConsoleServlet {
25:
26: public SamplePageServlet() {
27: }
28:
29: protected boolean checkAccess(ConsolePageSession inCps)
30: throws IOException, ServletException {
31:
32: boolean outValue = false;
33:
34: outValue = (inCps.isDeveloper() || inCps.isAdministrator());
35:
36: return outValue;
37: }
38:
39: public ConsolePageContext process(ConsolePageSession inCps,
40: UserHolder inUser, ParameterSet inPs,
41: SubmitActionContext inSac) throws IOException,
42: ServletException {
43:
44: //
45: ConsolePageContext outValue = null;
46:
47: outValue = SamplePageContext.newInstance(inCps);
48:
49: return outValue;
50:
51: }
52:
53: }
|