01: package com.sun.portal.rproxy.admin;
02:
03: import javax.servlet.ServletConfig;
04: import javax.servlet.ServletException;
05:
06: import com.iplanet.am.console.base.ConsoleServletBase;
07: import com.iplanet.jato.ModelManager;
08: import com.iplanet.jato.ModelTypeMap;
09: import com.iplanet.jato.RequestContext;
10: import com.iplanet.jato.RequestContextImpl;
11:
12: public class GatewayConsoleServletBase extends ConsoleServletBase {
13:
14: private static ModelTypeMap MODEL_TYPE_MAP;
15:
16: /**
17: * Default constructor
18: */
19: public GatewayConsoleServletBase() {
20: super ();
21: }
22:
23: public void init(ServletConfig config) throws ServletException {
24: super .init(config);
25: MODEL_TYPE_MAP = new ModelTypeMapImpl();
26: }
27:
28: protected void initializeRequestContext(
29: RequestContext requestContext) {
30: super .initializeRequestContext(requestContext);
31:
32: // Set a model manager in the request context. This must be
33: // done at the application level because the MODEL_TYPE_MAP
34: // is application specific.
35: ModelManager modelManager = new GatewayAdminModelManager(
36: requestContext, MODEL_TYPE_MAP);
37: ((RequestContextImpl) requestContext)
38: .setModelManager(modelManager);
39: }
40: }
|