001: /*
002: * ChainBuilder ESB
003: * Visual Enterprise Integration
004: *
005: * Copyright (C) 2006 Bostech Corporation
006: *
007: * This program is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU General Public License as published by the
009: * Free Software Foundation; either version 2 of the License, or (at your option)
010: * any later version.
011: *
012: * This program is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
014: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
015: * for more details.
016: *
017: * You should have received a copy of the GNU General Public License along with
018: * this program; if not, write to the Free Software Foundation, Inc.,
019: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020: *
021: *
022: * $Id: EndpointConfig.java 4717 2007-01-22 01:19:27Z jzhang $
023: */
024: package com.bostechcorp.cbesb.runtime.ccsl.lib;
025:
026: import java.util.Hashtable;
027:
028: public class EndpointConfig {
029: private Hashtable<String, UpocConfig> upocs = new Hashtable<String, UpocConfig>();
030: private boolean saveErrors;
031: private boolean addRecord;
032: private boolean stripRecord;
033: private boolean sendMessage;
034: private String suRoot;
035: private boolean needToRunStart;
036: private boolean needToRunStop;
037:
038: public void setSuRoot(String suRoot) {
039: this .suRoot = suRoot;
040: }
041:
042: public String getSuRoot() {
043: return suRoot;
044: }
045:
046: public void setSaveErrors(String saveErrors, boolean defaultVal) {
047: if (saveErrors == null || saveErrors.length() == 0)
048: this .saveErrors = defaultVal;
049: else
050: this .saveErrors = Boolean.parseBoolean(saveErrors);
051: }
052:
053: public void setAddRecord(String addRecord, boolean defaultVal) {
054: if (addRecord == null || addRecord.length() == 0)
055: this .addRecord = defaultVal;
056: else
057: this .addRecord = Boolean.parseBoolean(addRecord);
058: }
059:
060: public void setStripRecord(String stripRecord, boolean defaultVal) {
061: if (stripRecord == null || stripRecord.length() == 0)
062: this .stripRecord = defaultVal;
063: else
064: this .stripRecord = Boolean.parseBoolean(stripRecord);
065: }
066:
067: public void setSendMessage(String sendMessage, boolean defaultVal) {
068: if (sendMessage == null || sendMessage.length() == 0) {
069: this .sendMessage = defaultVal;
070: } else {
071: this .sendMessage = Boolean.parseBoolean(sendMessage);
072: }
073: }
074:
075: public boolean getSaveErrors() {
076: return saveErrors;
077: }
078:
079: public boolean getAddRecord() {
080: return addRecord;
081: }
082:
083: public boolean getStripRecord() {
084: return stripRecord;
085: }
086:
087: public boolean getSendMessage() {
088: return sendMessage;
089: }
090:
091: public void setNeedToRunStart(boolean val) {
092: needToRunStart = val;
093: }
094:
095: public boolean getNeedToRunStart() {
096: return needToRunStart;
097: }
098:
099: public void setNeedToRunStop(boolean val) {
100: needToRunStop = val;
101: }
102:
103: public boolean getNeedToRunStop() {
104: return needToRunStop;
105: }
106:
107: public void putUpoc(String key, UpocConfig upoc) {
108: upocs.put(key, upoc);
109: }
110:
111: public UpocConfig getUpoc(String key) {
112: return (UpocConfig) upocs.get(key);
113: }
114: }
|