Source Code Cross Referenced for ComponentMessageHolder.java in  » Workflow-Engines » Dalma » com » sun » jbi » common » management » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » Dalma » com.sun.jbi.common.management 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // Copyright (c) 2004-2005 Sun Microsystems Inc., All Rights Reserved.
002:        /*
003:         * ComponentMessageHolder.java
004:         *
005:         * SUN PROPRIETARY/CONFIDENTIAL.
006:         * This software is the proprietary information of Sun Microsystems, Inc.
007:         * Use is subject to license terms.
008:         *
009:         */
010:        package com.sun.jbi.common.management;
011:
012:        import java.util.HashMap;
013:
014:        /**
015:         * This provides necessary methods for the components to  pass the task result data to
016:         * ManagemntMessageBuilder. ManagementMessageBuilder constructs an XML document based on
017:         * this.
018:         *
019:         * @author Sun Microsystems, Inc.
020:         */
021:        public class ComponentMessageHolder {
022:            /**
023:             * Type of message to build. Currently it can either be 'Status' or 'Exception'
024:             */
025:            private String mMsgTypeToBuild = null;
026:
027:            /**
028:             * Cache for Localized Tokens
029:             */
030:            private HashMap mLocTokenCache = new HashMap();
031:
032:            /**
033:             * Cache for Localized Tokens
034:             */
035:            private HashMap mLocMessageCache = new HashMap();
036:
037:            /**
038:             * Cache for Localized Tokens
039:             */
040:            private HashMap mLocParamCache = new HashMap();
041:
042:            /**
043:             * Exception Object
044:             */
045:            private Throwable mExceptionObject = null;
046:
047:            /**
048:             * task name
049:             */
050:            private String mTaskName = null;
051:
052:            /**
053:             * task result
054:             */
055:            private String mTaskResult = null;
056:
057:            /**
058:             * status message type
059:             */
060:            private String mStatusMsgType = null;
061:
062:            /**
063:             * exception message type
064:             */
065:            private String mExceptionMsgType = null;
066:
067:            /**
068:             * component name
069:             */
070:            private String mComponentName = null;
071:
072:            /**
073:             * Creates a new instance of MessageContentHolder with a message type.
074:             *
075:             * @param msgType String describing the message type to build.
076:             */
077:            public ComponentMessageHolder(String msgType) {
078:                mMsgTypeToBuild = msgType;
079:            }
080:
081:            /**
082:             * Set the name of the task executed by component.
083:             *
084:             * @param taskName - task executed by component.
085:             */
086:            public void setTaskName(String taskName) {
087:                mTaskName = taskName;
088:            }
089:
090:            /**
091:             * Set the name of the component that executed the task.
092:             *
093:             * @param name - Name of the component.
094:             */
095:            public void setComponentName(String name) {
096:                mComponentName = name;
097:            }
098:
099:            /**
100:             * Set the result of the task executed by component.
101:             *
102:             * @param taskResult - result of task executed by component.
103:             */
104:            public void setTaskResult(String taskResult) {
105:                mTaskResult = taskResult;
106:            }
107:
108:            /**
109:             * Set the exception object.
110:             *
111:             * @param exObj - exception object.
112:             */
113:            public void setExceptionObject(Throwable exObj) {
114:                mExceptionObject = exObj;
115:            }
116:
117:            /**
118:             * Set the message type being returned by the component.
119:             *
120:             * @param statMsgType - type of success message that is  being returned by the
121:             *        component.
122:             */
123:            public void setStatusMessageType(String statMsgType) {
124:                mStatusMsgType = statMsgType;
125:            }
126:
127:            /**
128:             * Set the exception message type being returned by the component.
129:             *
130:             * @param exMsgType - type of exception message that is  being returned by the
131:             *        component.
132:             */
133:            public void setExceptionMessageType(String exMsgType) {
134:                mExceptionMsgType = exMsgType;
135:            }
136:
137:            /**
138:             * Set the message token for the exception being thrown by the component.
139:             *
140:             * @param nestingLevel - nesting level of the exception
141:             * @param locToken - message token.
142:             */
143:            public void setLocToken(int nestingLevel, String locToken) {
144:                mLocTokenCache.put(String.valueOf(nestingLevel), locToken);
145:            }
146:
147:            /**
148:             * Set the message for the exception being thrown by the component.
149:             *
150:             * @param nestingLevel - nesting level of the exception.
151:             * @param locMessage - exception message.
152:             */
153:            public void setLocMessage(int nestingLevel, String locMessage) {
154:                mLocMessageCache.put(String.valueOf(nestingLevel), locMessage);
155:            }
156:
157:            /**
158:             * Set the message parameters for the exception being thrown by the component.
159:             *
160:             * @param nestingLevel - nesting level of the exception.
161:             * @param locParam - exception message parameters.
162:             */
163:            public void setLocParam(int nestingLevel, String[] locParam) {
164:                mLocParamCache.put(String.valueOf(nestingLevel), locParam);
165:            }
166:
167:            /**
168:             * Returns the message token.
169:             *
170:             * @param nestingLevel nesting level of the exception.
171:             *
172:             * @return message token at the given nesting level.
173:             */
174:            public String getLocToken(int nestingLevel) {
175:                return (String) mLocTokenCache
176:                        .get(String.valueOf(nestingLevel));
177:            }
178:
179:            /**
180:             * Returns the exception message.
181:             *
182:             * @param nestingLevel nesting level of the exception
183:             *
184:             * @return exception message at the given nesting level
185:             */
186:            public String getLocMessage(int nestingLevel) {
187:                return (String) mLocMessageCache.get(String
188:                        .valueOf(nestingLevel));
189:            }
190:
191:            /**
192:             * Returns the exception message parameters.
193:             *
194:             * @param nestingLevel nesting level of the exception.
195:             *
196:             * @return exception message parameters at the given nesting level.
197:             */
198:            public String[] getLocParam(int nestingLevel) {
199:                return (String[]) mLocParamCache.get(String
200:                        .valueOf(nestingLevel));
201:            }
202:
203:            /**
204:             * Get the exception object being thrown by this component.
205:             *
206:             * @return Exception Object.
207:             */
208:            public Throwable getExceptionObject() {
209:                return mExceptionObject;
210:            }
211:
212:            /**
213:             * Get the name of the task executed by this component.
214:             *
215:             * @return Task name.
216:             */
217:            public String getTaskName() {
218:                return mTaskName;
219:            }
220:
221:            /**
222:             * Get the result of the task executed by this component.
223:             *
224:             * @return Task Result.
225:             */
226:            public String getTaskResult() {
227:                return mTaskResult;
228:            }
229:
230:            /**
231:             * Get the type(status, exception) of message to be built for this component.
232:             *
233:             * @return Task Result.
234:             */
235:            public String getComponentMessageType() {
236:                return mMsgTypeToBuild;
237:            }
238:
239:            /**
240:             * Get the status message type being returned by the component.
241:             *
242:             * @return Status message type.
243:             */
244:            public String getStatusMessageType() {
245:                return mStatusMsgType;
246:            }
247:
248:            /**
249:             * Get the exception message type being returned by the component.
250:             *
251:             * @return Status message type.
252:             */
253:            public String getExceptionMessageType() {
254:                return mExceptionMsgType;
255:            }
256:
257:            /**
258:             * Return the name of the component.
259:             *
260:             * @return component name.
261:             */
262:            public String getComponentName() {
263:                return mComponentName;
264:            }
265:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.