01: /*
02: * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05:
06: package com.sun.portal.sra.admin.context;
07:
08: import java.util.Properties;
09:
10: public class GWPropertyContext extends SRAPropertyContextImpl {
11:
12: public GWPropertyContext(Properties p) {
13: super (p);
14: }
15:
16: private static final String PROTOCOL = "gateway.protocol";
17: private static final String HOST = "gateway.hostname";
18: private static final String PORT = "gateway.portno";
19: private static final String IP = "gateway.ipaddress";
20: private static final String INSTANCE_NAME = "gateway.profile.name";
21: public static final String DO_START_AFTER_INSTALL = "start.gateway";
22:
23: public final String getProtocol() {
24: return p.getProperty(PROTOCOL);
25: }
26:
27: public final String getHost() {
28: return p.getProperty(HOST);
29: }
30:
31: public final String getPort() {
32: return p.getProperty(PORT);
33: }
34:
35: public final String getIP() {
36: return p.getProperty(IP);
37: }
38:
39: public final String getInstanceName() {
40: return p.getProperty(INSTANCE_NAME);
41: }
42:
43: public final Boolean doStartAfterInstall() {
44: return (p.getProperty(DO_START_AFTER_INSTALL).equalsIgnoreCase(
45: "y")
46: || p.getProperty(DO_START_AFTER_INSTALL)
47: .equalsIgnoreCase("yes") || p.getProperty(
48: DO_START_AFTER_INSTALL).equalsIgnoreCase("true")) ? Boolean.TRUE
49: : Boolean.FALSE;
50: }
51: }
|