001: /*
002: * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
003: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
004: */
005:
006: //
007: package com.sun.portal.ffj.util;
008:
009: import java.io.IOException;
010: import java.io.File;
011:
012: import java.util.Vector;
013: import java.util.Iterator;
014:
015: import org.openide.TopManager;
016: import org.openide.ErrorManager;
017:
018: import org.openide.cookies.InstanceCookie;
019: import org.openide.loaders.XMLDataObject;
020:
021: public class ParEntry {
022: //
023: XMLDataObject doXML = null;
024:
025: // Simulator query string parameters
026: private String classPath = null;
027: private String configDir = null;
028: private String compFile = null;
029: private String docRoot = null;
030: private String userName = null;
031: private String debugTrace = null;
032:
033: // JSP based providers
034: private String contentPage = null;
035: private String editPage = null;
036: private String processPage = null;
037:
038: // Java based providers
039: private String providerClass = null;
040:
041: private Vector transfers = new Vector();
042:
043: public ParEntry(XMLDataObject doXML) {
044: this .doXML = doXML;
045: }
046:
047: public static ParEntry getParEntry(InstanceCookie cookie) {
048: ParEntry pe = null;
049:
050: //
051: try {
052: pe = (ParEntry) cookie.instanceCreate();
053: } catch (Exception e) {
054: TopManager.getDefault().getErrorManager().notify(
055: ErrorManager.USER, e);
056: }
057:
058: //
059: return pe;
060: }
061:
062: //
063: // Getters
064: //
065: public XMLDataObject getXMLDataObject() {
066: return doXML;
067: }
068:
069: public String getClassPath() {
070: return classPath;
071: }
072:
073: public String getConfigDir() {
074: return configDir;
075: }
076:
077: public String getCompFile() {
078: return compFile;
079: }
080:
081: public String getDocRoot() {
082: return docRoot;
083: }
084:
085: public String getUserName() {
086: return userName;
087: }
088:
089: public String getDebugTrace() {
090: return debugTrace;
091: }
092:
093: public String getContentPage() {
094: return contentPage;
095: }
096:
097: public String getEditPage() {
098: return editPage;
099: }
100:
101: public String getProcessPage() {
102: return processPage;
103: }
104:
105: public String getProviderClass() {
106: return providerClass;
107: }
108:
109: public Iterator getTransfers() {
110: return transfers.iterator();
111: }
112:
113: //
114: // Setters
115: //
116: public void setClassPath(String classPath) {
117: this .classPath = classPath;
118: }
119:
120: public void setConfigDir(String configDir) {
121: this .configDir = configDir;
122: }
123:
124: public void setCompFile(String compFile) {
125: this .compFile = compFile;
126: }
127:
128: public void setDocRoot(String docRoot) {
129: this .docRoot = docRoot;
130: }
131:
132: public void setUserName(String userName) {
133: this .userName = userName;
134: }
135:
136: public void setDebugTrace(String debugTrace) {
137: this .debugTrace = debugTrace;
138: }
139:
140: public void setContentPage(String contentPage) {
141: this .contentPage = contentPage;
142: }
143:
144: public void setEditPage(String editPage) {
145: this .editPage = editPage;
146: }
147:
148: public void setProcessPage(String processPage) {
149: this .processPage = processPage;
150: }
151:
152: public void setProviderClass(String providerClass) {
153: this .providerClass = providerClass;
154: }
155:
156: public void addTransfer(Transfer td) {
157: transfers.add(td);
158: }
159:
160: private static String TRANSFER_SEP = "::";
161: private static int TSEP_LENGTH = TRANSFER_SEP.length();
162:
163: //
164: // Just for debugging, initially!
165: //
166: /*public void printParEntry() {
167: System.out.println("ParEntry contents: Start");
168: System.out.println("------------------------");
169: System.out.println("ClassPath = " + classPath);
170: System.out.println("ConfigDir = " + configDir);
171: System.out.println("CompFile = " + compFile);
172: System.out.println("DocRoot = " + docRoot);
173: System.out.println("UserName = " + userName);
174: System.out.println("DebugTrace = " + debugTrace);
175: System.out.println("------------------------");
176: System.out.println("ContentPage = " + contentPage);
177: System.out.println("EditPage = " + editPage);
178: System.out.println("ProcessPage = " + processPage);
179: System.out.println("ProviderClass = " + providerClass);
180: System.out.println("------------------------");
181: System.out.println("ParEntry contents: End");
182: }*/
183: }
|