01: /**
02: * Copyright 2002 Sun Microsystems, Inc. All
03: * rights reserved. Use of this product is subject
04: * to license terms. Federal Acquisitions:
05: * Commercial Software -- Government Users
06: * Subject to Standard License Terms and
07: * Conditions.
08: *
09: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
10: * are trademarks or registered trademarks of Sun Microsystems,
11: * Inc. in the United States and other countries.
12: *
13: * Author: Anurag Gupta
14: */package com.sun.portal.netfile.admin;
15:
16: // Servlet classes
17: import javax.servlet.ServletConfig;
18: import com.sun.portal.log.common.PortalLogger;
19: import javax.servlet.ServletException;
20:
21: // iPlanet JATO classes
22: import com.iplanet.jato.ModelManager;
23: import com.iplanet.jato.ModelTypeMap;
24: import com.iplanet.jato.RequestContext;
25: import com.iplanet.jato.RequestContextImpl;
26:
27: // iDS/AME classes
28: import com.iplanet.am.console.base.ConsoleServletBase;
29:
30: public class NetFileConsoleServletBase extends ConsoleServletBase {
31:
32: private static ModelTypeMap MODEL_TYPE_MAP;
33:
34: /**
35: * Default constructor
36: */
37: public NetFileConsoleServletBase() {
38: super ();
39: }
40:
41: public void init(ServletConfig config) throws ServletException {
42: super .init(config);
43: MODEL_TYPE_MAP = new ModelTypeMapImpl();
44: }
45:
46: protected void initializeRequestContext(
47: RequestContext requestContext) {
48: super .initializeRequestContext(requestContext);
49:
50: /** Set a model manager in the request context. This must be
51: * done at the application level because the MODEL_TYPE_MAP
52: * is application specific.
53: */
54: ModelManager modelManager = new NetFileAdminModelManager(
55: requestContext, MODEL_TYPE_MAP);
56: ((RequestContextImpl) requestContext)
57: .setModelManager(modelManager);
58: }
59: }
|