01: // Copyright (c) 2004-2005 Sun Microsystems Inc., All Rights Reserved.
02: /*
03: * ManagementMessageHolder.java
04: *
05: * SUN PROPRIETARY/CONFIDENTIAL.
06: * This software is the proprietary information of Sun Microsystems, Inc.
07: * Use is subject to license terms.
08: *
09: */
10: package com.sun.jbi.common.management;
11:
12: /**
13: * This provides necessary methods for various management services to pass the task
14: * result data to ManagemntMessageBuilder. ManagementMessageBuilder constructs an XML
15: * document based on this.
16: *
17: * @author Sun Microsystems, Inc.
18: */
19: public class ManagementMessageHolder extends ComponentMessageHolder {
20: /**
21: * Framework locale.
22: */
23: private String mFrameworkLocale = null;
24:
25: /**
26: * Exception cause.
27: */
28: private boolean mIsCauseFramework = true;
29:
30: /**
31: * Creates a new instance of MessageContentHolder with a message type.
32: *
33: * @param msgType String describing the message type to build.
34: */
35: public ManagementMessageHolder(String msgType) {
36: super (msgType);
37: }
38:
39: /**
40: * Set the JBI Framework locale.
41: *
42: * @param locale JBI Framework Locale
43: */
44: public void setFrameworkLocale(String locale) {
45: mFrameworkLocale = locale;
46: }
47:
48: /**
49: * Set the value indicating if JBI Framework is cause of the exception.
50: *
51: * @param isCauseFramework set value indicating cause
52: */
53: public void setCauseFramework(boolean isCauseFramework) {
54: mIsCauseFramework = isCauseFramework;
55: }
56:
57: /**
58: * Get the type(status, exception) of message to be built for this component.
59: *
60: * @return Task Result
61: */
62: public String getManagementMessageType() {
63: return super .getComponentMessageType();
64: }
65:
66: /**
67: * Get the JBI Framework Locales.
68: *
69: * @return JBI Framework locale
70: */
71: public String getFrameworkLocale() {
72: return mFrameworkLocale;
73: }
74:
75: /**
76: * Return the value indicating if the cause of this exception is JBI Framework.
77: *
78: * @return value indicating exception cause
79: */
80: public String isCauseFramework() {
81: return Boolean.toString(mIsCauseFramework);
82: }
83: }
|