Source Code Cross Referenced for Domain.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas_domain » xml » 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 » J2EE » JOnAS 4.8.6 » org.objectweb.jonas_domain.xml 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * JOnAS: Java(TM) Open Application Server
003:         * Copyright (C) 2005-2006 Bull S.A.S.
004:         * Contact: jonas-team@objectweb.org
005:         *
006:         * This library is free software; you can redistribute it and/or
007:         *
008:         * modify it under the terms of the GNU Lesser General Public
009:         * License as published by the Free Software Foundation; either
010:         * version 2.1 of the License, or 1any later version.
011:         *
012:         * This library is distributed in the hope that it will be useful,
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
014:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
015:         * Lesser General Public License for more details.
016:         *
017:         * You should have received a copy of the GNU Lesser General Public
018:         * License along with this library; if not, write to the Free Software
019:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
020:         * USA
021:         *
022:         * --------------------------------------------------------------------------
023:         * $Id: Domain.java 9869 2006-11-27 08:30:31Z sauthieg $
024:         * --------------------------------------------------------------------------
025:         */package org.objectweb.jonas_domain.xml;
026:
027:        import org.objectweb.jonas_domain.api.DomainSchemas;
028:        import org.objectweb.jonas_lib.deployment.xml.AbsDescriptionElement;
029:        import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
030:        import org.objectweb.jonas_lib.deployment.xml.TopLevelElement;
031:
032:        /**
033:         * This class defines the implementation of the domain
034:         *
035:         * @author Adriana Danes
036:         */
037:
038:        public class Domain extends AbsDescriptionElement implements 
039:                TopLevelElement {
040:
041:            /**
042:             * Version UID
043:             */
044:            private static final long serialVersionUID = 3866056043763651049L;
045:
046:            /**
047:             * domain element XML header.
048:             */
049:            public static final String DOMAIN_ELEMENT = "<?xml version=\"1.0\"?>\n"
050:                    + "<domain xmlns=\"http://www.objectweb.org/jonas/ns\"\n"
051:                    + "        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
052:                    + "        xsi:schemaLocation=\"http://www.objectweb.org/jonas/ns\n"
053:                    + "        http://www.objectweb.org/jonas/ns/"
054:                    + DomainSchemas.getLastSchema() + "\">\n";
055:
056:            /**
057:             * servers
058:             */
059:            private JLinkedList serverList = null;
060:
061:            /**
062:             * cluster daemons
063:             */
064:            private JLinkedList clusterDaemonList = null;
065:
066:            /**
067:             * cluster
068:             */
069:            private JLinkedList clusterList = null;
070:
071:            /**
072:             * Domain name
073:             */
074:            private String name = null;
075:
076:            /**
077:             * Constructor
078:             */
079:            public Domain() {
080:                super ();
081:                serverList = new JLinkedList("server");
082:                clusterList = new JLinkedList("cluster");
083:                clusterDaemonList = new JLinkedList("clusterDaemon");
084:            }
085:
086:            /**
087:             * @return Returns the name.
088:             */
089:            public String getName() {
090:                return name;
091:            }
092:
093:            /**
094:             * @param name The name to set.
095:             */
096:            public void setName(String name) {
097:                this .name = name;
098:            }
099:
100:            /**
101:             * Add a new cluster element to this object
102:             * @param cluster the Cluster object
103:             */
104:            public void addCluster(Cluster cluster) {
105:                clusterList.add(cluster);
106:            }
107:
108:            /**
109:             * Add a new cluster daemon element to this object
110:             * @param clusterDaemon the ClusterDaemon object
111:             */
112:            public void addClusterDaemon(ClusterDaemon clusterDaemon) {
113:                clusterDaemonList.add(clusterDaemon);
114:            }
115:
116:            /**
117:             * Add a new server element to this object
118:             * @param server the Server object
119:             */
120:            public void addServer(Server server) {
121:                serverList.add(server);
122:            }
123:
124:            /**
125:             * @return Returns the clusterList.
126:             */
127:            public JLinkedList getClusterList() {
128:                return clusterList;
129:            }
130:
131:            /**
132:             * @param clusterList The clusterList to set.
133:             */
134:            public void setClusterList(JLinkedList clusterList) {
135:                this .clusterList = clusterList;
136:            }
137:
138:            /**
139:             * @param clusterDaemonList The clusterDaemonList to set.
140:             */
141:            public void setClusterDaemonList(JLinkedList clusterDaemonList) {
142:                this .clusterDaemonList = clusterDaemonList;
143:            }
144:
145:            /**
146:             * @return Returns the clusterDaemonList.
147:             */
148:            public JLinkedList getClusterDaemonList() {
149:                return clusterDaemonList;
150:            }
151:
152:            /**
153:             * @return Returns the serverList.
154:             */
155:            public JLinkedList getServerList() {
156:                return serverList;
157:            }
158:
159:            /**
160:             * @param serverList The serverList to set.
161:             */
162:            public void setServerList(JLinkedList serverList) {
163:                this .serverList = serverList;
164:            }
165:
166:            /**
167:             * Represents this element by it's XML description.
168:             * @param indent use this indent for prexifing XML representation.
169:             * @return the XML description of this object.
170:             */
171:            public String toXML(int indent) {
172:                StringBuffer sb = new StringBuffer();
173:                sb.append(indent(indent));
174:                sb.append(DOMAIN_ELEMENT);
175:                indent += 2;
176:
177:                // name
178:                if (name != null) {
179:                    sb.append(xmlElement(getName(), "name", indent));
180:                }
181:                // description
182:                if (getDescription() != null) {
183:                    sb.append(xmlElement(getDescription(), "description",
184:                            indent));
185:                }
186:                // cluster daemons
187:                sb.append(getClusterDaemonList().toXML(indent));
188:
189:                // servers
190:                sb.append(getServerList().toXML(indent));
191:
192:                // clusters
193:                sb.append(getClusterList().toXML(indent));
194:
195:                indent -= 2;
196:                sb.append(indent(indent));
197:                sb.append("</domain>\n");
198:
199:                return sb.toString();
200:            }
201:
202:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.