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: * @(#)ManagementMessageHolder.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi.common.management;
030:
031: /**
032: * This provides necessary methods for various management services to pass the task
033: * result data to ManagemntMessageBuilder. ManagementMessageBuilder constructs an XML
034: * document based on this.
035: *
036: * @author Sun Microsystems, Inc.
037: */
038: public class ManagementMessageHolder extends ComponentMessageHolder {
039: /**
040: * Framework locale.
041: */
042: private String mFrameworkLocale = null;
043:
044: /**
045: * Exception cause.
046: */
047: private boolean mIsCauseFramework = true;
048:
049: /**
050: * Creates a new instance of MessageContentHolder with a message type.
051: *
052: * @param msgType String describing the message type to build.
053: */
054: public ManagementMessageHolder(String msgType) {
055: super (msgType);
056: }
057:
058: /**
059: * Set the JBI Framework locale.
060: *
061: * @param locale JBI Framework Locale
062: */
063: public void setFrameworkLocale(String locale) {
064: mFrameworkLocale = locale;
065: }
066:
067: /**
068: * Set the value indicating if JBI Framework is cause of the exception.
069: *
070: * @param isCauseFramework set value indicating cause
071: */
072: public void setCauseFramework(boolean isCauseFramework) {
073: mIsCauseFramework = isCauseFramework;
074: }
075:
076: /**
077: * Get the type(status, exception) of message to be built for this component.
078: *
079: * @return Task Result
080: */
081: public String getManagementMessageType() {
082: return super .getComponentMessageType();
083: }
084:
085: /**
086: * Get the JBI Framework Locales.
087: *
088: * @return JBI Framework locale
089: */
090: public String getFrameworkLocale() {
091: return mFrameworkLocale;
092: }
093:
094: /**
095: * Return the value indicating if the cause of this exception is JBI Framework.
096: *
097: * @return value indicating exception cause
098: */
099: public String isCauseFramework() {
100: return Boolean.toString(mIsCauseFramework);
101: }
102: }
|