01: /**
02: * $Id: PropertiesConfigContext.java,v 1.3 2003/12/05 09:01:10 rakeshn Exp $
03: * Copyright 2002 Sun Microsystems, Inc. Allrights reserved. Use of
04: * this product is subjectto license terms. Federal Acquisitions:
05: * Commercial Software -- Government Users Subject to Standard License
06: * Terms and Conditions.
07: *
08: * Sun, Sun Microsystems, the Sun logo, and Sun ONE are trademarks or
09: * registered trademarks of Sun Microsystems,Inc. in the United States
10: * and other countries.
11: */package com.sun.ssoadapter.config;
12:
13: import java.util.ResourceBundle;
14: import java.io.FileInputStream;
15:
16: import java.io.IOException;
17: import java.io.FileNotFoundException;
18:
19: public class PropertiesConfigContext implements ConfigContext,
20: DSAMEConstants {
21: private ResourceBundle props = null;
22:
23: public void init() throws SAALException {
24: try {
25: props = ResourceBundle.getBundle(MAP_PROPERTIES);
26: } catch (Exception e) {
27: throw new SAALException(getClass().getName()
28: + ": Could not load file: " + MAP_PROPERTIES + ": "
29: + e);
30: }
31: }
32:
33: /**
34: * Must return a valid Classname for creating the ClientAwareAppContext
35: * Object. The ClientAwareAppContext Object inturn creates all the other
36: * objects.
37: */
38: public String getClientAwareAppContextClassName() {
39: return ((String) props
40: .getString(CLIENTAWARE_APP_CONTEXT_CLASSNAME));
41: }
42:
43: //
44: // session objects
45: //
46:
47: public String getClientAwareUserContextClassName() {
48: return ((String) props
49: .getString(CLIENTAWARE_USER_CONTEXT_CLASSNAME));
50: }
51:
52: public String getClientAwareAuthlessUserContextClassName() {
53: return ((String) props
54: .getString(CLIENTAWARE_AUTHLESS_USER_CONTEXT_CLASSNAME));
55: }
56:
57: }
|