001: /*
002: * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
003: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
004: */
005:
006: package com.sun.portal.instance.sra.common;
007:
008: //
009:
010: import com.sun.portal.config.context.DebugContext;
011: import com.sun.portal.config.context.IdentityPropertyContext;
012: import com.sun.portal.config.context.SRAFileContext;
013: import com.sun.portal.config.context.SRAPropertyContext;
014: import com.sun.portal.instance.sra.Instance;
015: import com.sun.wizards.core.WizardState;
016:
017: //
018:
019: public class SRAWSWHelper {
020: //
021: //
022: //
023: private static final String WSW_KEY_PROXY_TYPE = "WSW_KEY_PROXY_TYPE";
024: public static final String PROXY_TYPE_GW = "GW";
025: public static final String PROXY_TYPE_RWP = "RWP";
026: public static final String PROXY_TYPE_NLP = "NLP";
027: public static final String WSW_CAN_BE_CONFIGURED = "WSW_CAN_BE_CONFIGURED";
028:
029: private static final String WSW_KEY_ACTION = "WSW_KEY_ACTION";
030: private static final String WSW_KEY_INSTANCE_NAME = "WSW_KEY_INSTANCE_NAME";
031:
032: private static final String WSW_IDENTITY_PROPERTY_CONTEXT = "WSW_IDENTITY_PROPERTY_CONTEXT";
033: private static final String WSW_SRA_PROPERTY_CONTEXT = "WSW_SRA_PROPERTY_CONTEXT";
034: private static final String WSW_SRA_FILE_CONTEXT = "WSW_SRA_FILE_CONTEXT";
035:
036: private static final String WSW_GW_INSTANCE_OBJECT = "WSW_GW_INSTANCE_OBJECT";
037: private static final String WSW_RWP_INSTANCE_OBJECT = "WSW_RWP_INSTANCE_OBJECT";
038: private static final String WSW_NLP_INSTANCE_OBJECT = "WSW_NLP_INSTANCE_OBJECT";
039:
040: //
041: //
042: //
043: public static String getWSWProxyType(WizardState ws) {
044: DebugContext.message("getWSWProxyType: "
045: + (String) ws.getData(WSW_KEY_PROXY_TYPE));
046: return (String) ws.getData(WSW_KEY_PROXY_TYPE);
047: }
048:
049: public static void setWSWProxyType(WizardState ws, String proxyType) {
050: DebugContext.message("setWSWProxyType: " + proxyType);
051: ws.setData(WSW_KEY_PROXY_TYPE, proxyType);
052: }
053:
054: //
055: public static String getWSWInstanceName(WizardState ws) {
056: DebugContext.message("getWSWInstanceName: "
057: + (String) ws.getData(WSW_KEY_INSTANCE_NAME));
058: return (String) ws.getData(WSW_KEY_INSTANCE_NAME);
059: }
060:
061: public static void setWSWInstanceName(WizardState ws,
062: String instanceName) {
063: DebugContext.message("setWSWInstanceName: " + instanceName);
064: ws.setData(WSW_KEY_INSTANCE_NAME, instanceName);
065: }
066:
067: //
068: public static String getWSWAction(WizardState ws) {
069: DebugContext.message("getWSWAction: "
070: + (String) ws.getData(WSW_KEY_ACTION));
071: return (String) ws.getData(WSW_KEY_ACTION);
072: }
073:
074: public static void setWSWAction(WizardState ws, String action) {
075: DebugContext.message("setWSWAction: " + action);
076: ws.setData(WSW_KEY_ACTION, action);
077: }
078:
079: //
080: public static IdentityPropertyContext getWSWIdentityPropertyContext(
081: WizardState ws) {
082: return (IdentityPropertyContext) ws
083: .getData(WSW_IDENTITY_PROPERTY_CONTEXT);
084: }
085:
086: public static void setWSWIdentityPropertyContext(WizardState ws,
087: IdentityPropertyContext pc) {
088: ws.setData(WSW_IDENTITY_PROPERTY_CONTEXT, pc);
089: }
090:
091: public static SRAPropertyContext getWSWSRAPropertyContext(
092: WizardState ws) {
093: return (SRAPropertyContext) ws
094: .getData(WSW_SRA_PROPERTY_CONTEXT);
095: }
096:
097: public static void setWSWSRAPropertyContext(WizardState ws,
098: SRAPropertyContext pc) {
099: ws.setData(WSW_SRA_PROPERTY_CONTEXT, pc);
100: }
101:
102: public static SRAFileContext getWSWSRAFileContext(WizardState ws) {
103: return (SRAFileContext) ws.getData(WSW_SRA_FILE_CONTEXT);
104: }
105:
106: public static void setWSWSRAFileContext(WizardState ws,
107: SRAFileContext fc) {
108: ws.setData(WSW_SRA_FILE_CONTEXT, fc);
109: }
110:
111: //
112: public static Instance getWSWInstanceGWObject(WizardState ws) {
113: return (Instance) ws.getData(WSW_GW_INSTANCE_OBJECT);
114: }
115:
116: public static void setWSWInstanceGWObject(WizardState ws,
117: Instance gwInstance) {
118: ws.setData(WSW_GW_INSTANCE_OBJECT, gwInstance);
119: }
120:
121: //
122: public static Instance getWSWInstanceRWPObject(WizardState ws) {
123: return (Instance) ws.getData(WSW_RWP_INSTANCE_OBJECT);
124: }
125:
126: public static void setWSWInstanceRWPObject(WizardState ws,
127: Instance rwpInstance) {
128: ws.setData(WSW_RWP_INSTANCE_OBJECT, rwpInstance);
129: }
130:
131: //
132: public static Instance getWSWInstanceNLPObject(WizardState ws) {
133: return (Instance) ws.getData(WSW_NLP_INSTANCE_OBJECT);
134: }
135:
136: public static void setWSWInstanceNLPObject(WizardState ws,
137: Instance nlpInstance) {
138: ws.setData(WSW_NLP_INSTANCE_OBJECT, nlpInstance);
139: }
140:
141: //
142: public static Boolean getWSWCanBeConfigured(WizardState ws) {
143: return (Boolean) ws.getData(WSW_CAN_BE_CONFIGURED);
144: }
145:
146: public static void setWSWCanBeConfigured(WizardState ws,
147: Boolean canBeConfigured) {
148: ws.setData(WSW_CAN_BE_CONFIGURED, canBeConfigured);
149: }
150:
151: //
152: //
153: //
154: }
|