001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)UtilBase.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi.binding.jms.deploy;
030:
031: /**
032: * Base class for all utility.
033: *
034: * @author Sun Microsystems Inc.
035: */
036: public class UtilBase {
037: /**
038: * Exception.
039: */
040: private Exception mException;
041: /**
042: * Error.
043: */
044: private String mError = "";
045: /**
046: * Warning.
047: */
048: private String mWarning = "";
049: /**
050: * Validity.
051: */
052: private boolean mValid = true;
053:
054: /**
055: * Creates a new UtilBase object.
056: */
057: public UtilBase() {
058: ;
059: }
060:
061: /**
062: * Returns error.
063: *
064: * @return
065: */
066: public String getError() {
067: return mError;
068: }
069:
070: /**
071: * Returns exception.
072: *
073: * @return
074: */
075: public Exception getException() {
076: return mException;
077: }
078:
079: /**
080: * Validity.
081: *
082: * @return
083: */
084: public boolean isValid() {
085: return mValid;
086: }
087:
088: /**
089: * returns warning.
090: *
091: * @return
092: */
093: public String getWarning() {
094: return mWarning;
095: }
096:
097: /**
098: *
099: *
100: * @param error
101: */
102: protected void setError(String error) {
103: mError = error;
104: }
105:
106: /**
107: *
108: *
109: * @param e
110: */
111: protected void setException(Exception e) {
112: mException = e;
113: }
114:
115: /**
116: *
117: *
118: * @param valid
119: */
120: protected void setValid(boolean valid) {
121: mValid = valid;
122: }
123:
124: /**
125: *
126: *
127: * @param warn
128: */
129: protected void setWarning(String warn) {
130: mWarning = warn;
131: }
132: }
|