Source Code Cross Referenced for SimpleNotifyingBean.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » components » notification » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.components.notification 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package org.apache.cocoon.components.notification;
018:
019:        import java.util.HashMap;
020:        import java.util.Map;
021:
022:        /**
023:         *  A simple bean implementation of Notifying.
024:         *
025:         * @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a>
026:         * @version CVS $Id: SimpleNotifyingBean.java 433543 2006-08-22 06:22:54Z crossley $
027:         */
028:        public class SimpleNotifyingBean implements  Notifying {
029:
030:            /**
031:             * The type of the notification. Examples can be "warning" or "error"
032:             */
033:            private String type = "unknown";
034:
035:            /**
036:             * The title of the notification.
037:             */
038:            private String title = "Generic notification";
039:
040:            /**
041:             * The source that generates the notification.
042:             */
043:            private String source = getClass().getName();
044:
045:            /**
046:             * The sender of the notification.
047:             */
048:            private String sender = "unknown";
049:
050:            /**
051:             * The notification itself.
052:             */
053:            private String message = "Message not known.";
054:
055:            /**
056:             * A more detailed description of the notification.
057:             */
058:            private String description = "";
059:
060:            /**
061:             * A HashMap containing extra notifications
062:             */
063:            private Map extraDescriptions = new HashMap();
064:
065:            public SimpleNotifyingBean() {
066:            }
067:
068:            public SimpleNotifyingBean(Object sender) {
069:                this .sender = sender.getClass().getName();
070:            }
071:
072:            /**
073:             * Sets the Type of the SimpleNotifyingBean object
074:             *
075:             * @param  type  The new Type value
076:             */
077:            public void setType(String type) {
078:                this .type = type;
079:            }
080:
081:            /**
082:             * Sets the Title of the SimpleNotifyingBean object
083:             *
084:             * @param  title  The new Title value
085:             */
086:            public void setTitle(String title) {
087:                this .title = title;
088:            }
089:
090:            /**
091:             * Sets the Source of the SimpleNotifyingBean object
092:             *
093:             * @param  source  The new Source value
094:             */
095:            public void setSource(String source) {
096:                this .source = source;
097:            }
098:
099:            /**
100:             * Sets the Message of the SimpleNotifyingBean object
101:             *
102:             * @param  message  The new Message value
103:             */
104:            public void setMessage(String message) {
105:                this .message = message;
106:            }
107:
108:            /**
109:             * Sets the Description of the SimpleNotifyingBean object
110:             *
111:             * @param  description  The new Description value
112:             */
113:            public void setDescription(String description) {
114:                this .description = description;
115:            }
116:
117:            /**
118:             * Adds the ExtraDescription to the SimpleNotifyingBean object
119:             *
120:             * @param  extraDescriptionDescription  The additional ExtraDescription name
121:             * @param  extraDescription The additional ExtraDescription value
122:             */
123:            public void addExtraDescription(String extraDescriptionDescription,
124:                    String extraDescription) {
125:                this .extraDescriptions.put(extraDescriptionDescription,
126:                        extraDescription);
127:            }
128:
129:            /**
130:             * Replaces the ExtraDescriptions of the SimpleNotifyingBean object
131:             */
132:            protected void replaceExtraDescriptions(Map extraDescriptions) {
133:                this .extraDescriptions = extraDescriptions;
134:            }
135:
136:            /**
137:             * Adds the ExtraDescriptions to the SimpleNotifyingBean object
138:             */
139:            protected void addExtraDescriptions(Map extraDescriptions) {
140:                if (this .extraDescriptions == null) {
141:                    replaceExtraDescriptions(extraDescriptions);
142:                } else {
143:                    this .extraDescriptions.putAll(extraDescriptions);
144:                }
145:            }
146:
147:            /**
148:             * Gets the Type of the SimpleNotifyingBean object
149:             */
150:            public String getType() {
151:                return type;
152:            }
153:
154:            /**
155:             * Gets the Title of the SimpleNotifyingBean object
156:             */
157:            public String getTitle() {
158:                return title;
159:            }
160:
161:            /**
162:             * Gets the Source of the SimpleNotifyingBean object
163:             */
164:            public String getSource() {
165:                return source;
166:            }
167:
168:            /**
169:             * Gets the Sender of the SimpleNotifyingBean object
170:             */
171:            public String getSender() {
172:                return sender;
173:            }
174:
175:            /**
176:             * Gets the Message of the SimpleNotifyingBean object
177:             */
178:            public String getMessage() {
179:                return message;
180:            }
181:
182:            /**
183:             * Gets the Description of the SimpleNotifyingBean object
184:             */
185:            public String getDescription() {
186:                return description;
187:            }
188:
189:            /**
190:             * Gets the ExtraDescriptions of the SimpleNotifyingBean object
191:             */
192:            public Map getExtraDescriptions() {
193:                return extraDescriptions;
194:            }
195:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.