Source Code Cross Referenced for SystemImpl.java in  » UML » MetaBoss » com » metaboss » sdlctools » models » impl » metabossmodel » enterprisemodel » 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 » UML » MetaBoss » com.metaboss.sdlctools.models.impl.metabossmodel.enterprisemodel 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // THIS SOFTWARE IS PROVIDED BY SOFTARIS PTY.LTD. AND OTHER METABOSS
002:        // CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
003:        // BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
004:        // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTARIS PTY.LTD.
005:        // OR OTHER METABOSS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
006:        // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
007:        // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
008:        // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
009:        // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
010:        // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
011:        // EVEN IF SOFTARIS PTY.LTD. OR OTHER METABOSS CONTRIBUTORS ARE ADVISED OF THE
012:        // POSSIBILITY OF SUCH DAMAGE.
013:        //
014:        // Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
015:        package com.metaboss.sdlctools.models.impl.metabossmodel.enterprisemodel;
016:
017:        import java.util.ArrayList;
018:        import java.util.Collection;
019:        import java.util.Collections;
020:        import java.util.HashSet;
021:        import java.util.Iterator;
022:        import java.util.List;
023:        import java.util.Set;
024:
025:        import org.netbeans.mdr.storagemodel.StorableObject;
026:
027:        import com.metaboss.sdlctools.models.impl.metabossmodel.ModelElementImpl;
028:        import com.metaboss.sdlctools.models.metabossmodel.datadictionarymodel.DataDictionary;
029:        import com.metaboss.sdlctools.models.metabossmodel.enterprisemodel.Servicemodule;
030:        import com.metaboss.sdlctools.models.metabossmodel.enterprisemodel.SystemDependency;
031:        import com.metaboss.sdlctools.models.metabossmodel.enterprisemodel.systemimplementationmodel.Domain;
032:
033:        public abstract class SystemImpl extends ModelElementImpl
034:                implements 
035:                com.metaboss.sdlctools.models.metabossmodel.enterprisemodel.System {
036:            // Required constructor
037:            protected SystemImpl(StorableObject storable) {
038:                super (storable);
039:            }
040:
041:            /**
042:             * @param pServicemoduleName 
043:             * @return requested Servicemodule or throws exception if none found
044:             */
045:            public Servicemodule getServicemodule(String pServicemoduleName) {
046:                Servicemodule lFoundServicemodule = findServicemodule(pServicemoduleName);
047:                // Throw exception if nothing found
048:                if (lFoundServicemodule == null)
049:                    throw new IllegalArgumentException(
050:                            "Unable to locate Servicemodule named '"
051:                                    + pServicemoduleName
052:                                    + "' in System. SystemRef: " + getRef());
053:                return lFoundServicemodule;
054:            }
055:
056:            /**
057:             * @param pServicemoduleName 
058:             * @return requested Servicemodule or null if none found
059:             */
060:            public Servicemodule findServicemodule(String pServicemoduleName) {
061:                Collection lServicemodules = getServicemodules();
062:                if (!lServicemodules.isEmpty()) {
063:                    for (Iterator lServicemodulesIterator = lServicemodules
064:                            .iterator(); lServicemodulesIterator.hasNext();) {
065:                        Servicemodule lServicemodule = (Servicemodule) lServicemodulesIterator
066:                                .next();
067:                        if (lServicemodule.getName().equals(pServicemoduleName))
068:                            return lServicemodule;
069:                    }
070:                }
071:                return null;
072:            }
073:
074:            /** Returns read-only collection of all data types available for use in this system Includes all own types, enterprise dictionary types and types from all used systems */
075:            public Collection getAvailableDatatypes() {
076:                List lAvailableDatatypes = new ArrayList();
077:                // Add all datatypes from own data dictionary
078:                lAvailableDatatypes.addAll(getDataDictionary()
079:                        .getCombinedDataTypes());
080:                // Add all datatypes from all design library data dictionaries
081:                for (Iterator lDesignLibraryDictionariesIterator = getEnterprise()
082:                        .getDesignLibrary().getDataDictionaries().iterator(); lDesignLibraryDictionariesIterator
083:                        .hasNext();) {
084:                    DataDictionary lDesignLibraryDataDictionary = (DataDictionary) lDesignLibraryDictionariesIterator
085:                            .next();
086:                    lAvailableDatatypes.addAll(lDesignLibraryDataDictionary
087:                            .getCombinedDataTypes());
088:                }
089:                // Add all datatypes from the servant systems
090:                for (Iterator lServantSystemsIterator = getServants()
091:                        .iterator(); lServantSystemsIterator.hasNext();) {
092:                    com.metaboss.sdlctools.models.metabossmodel.enterprisemodel.System lServantSystem = (com.metaboss.sdlctools.models.metabossmodel.enterprisemodel.System) lServantSystemsIterator
093:                            .next();
094:                    lAvailableDatatypes.addAll(lServantSystem
095:                            .getDataDictionary().getCombinedDataTypes());
096:                }
097:                return Collections.unmodifiableCollection(lAvailableDatatypes);
098:            }
099:
100:            /** Returns read-only collection of all client systems */
101:            public Collection getClients() {
102:                List lClients = new ArrayList();
103:                for (Iterator lClientDependenciesIterator = getClientDependencies()
104:                        .iterator(); lClientDependenciesIterator.hasNext();) {
105:                    SystemDependency lClientDependency = (SystemDependency) lClientDependenciesIterator
106:                            .next();
107:                    com.metaboss.sdlctools.models.metabossmodel.enterprisemodel.System lClientSystem = lClientDependency
108:                            .getClient();
109:                    lClients.add(lClientSystem);
110:                }
111:                return Collections.unmodifiableCollection(lClients);
112:            }
113:
114:            /** Returns read-only collection of all servant systems */
115:            public Collection getServants() {
116:                List lServants = new ArrayList();
117:                for (Iterator lServantDependenciesIterator = getServantDependencies()
118:                        .iterator(); lServantDependenciesIterator.hasNext();) {
119:                    SystemDependency lServantDependency = (SystemDependency) lServantDependenciesIterator
120:                            .next();
121:                    com.metaboss.sdlctools.models.metabossmodel.enterprisemodel.System lServantSystem = lServantDependency
122:                            .getServant();
123:                    lServants.add(lServantSystem);
124:                }
125:                return Collections.unmodifiableCollection(lServants);
126:            }
127:
128:            /**
129:             * @param pDomainName 
130:             * @return requested Domain or throws exception if none found
131:             */
132:            public Domain getDomain(String pDomainName) {
133:                Domain lFoundDomain = findDomain(pDomainName);
134:                // Throw exception if nothing found
135:                if (lFoundDomain == null)
136:                    throw new IllegalArgumentException(
137:                            "Unable to locate Domain named '" + pDomainName
138:                                    + "' in System. SystemRef: " + getRef());
139:                return lFoundDomain;
140:            }
141:
142:            /**
143:             * @param pDomainName 
144:             * @return requested Domain or null if none found
145:             */
146:            public Domain findDomain(String pDomainName) {
147:                Collection lDomains = getDomains();
148:                if (!lDomains.isEmpty()) {
149:                    for (Iterator lDomainsIterator = lDomains.iterator(); lDomainsIterator
150:                            .hasNext();) {
151:                        Domain lDomain = (Domain) lDomainsIterator.next();
152:                        if (lDomain.getName().equals(pDomainName))
153:                            return lDomain;
154:                    }
155:                }
156:                return null;
157:            }
158:
159:            // Returns list of DataTypes, Structures and Messages used in the Servicemodule. This includes owned and referenced elements
160:            public Collection getCombinedTypes() {
161:                Set lCombinedTypes = new HashSet();
162:                // Interrogate the datadictionary types
163:                lCombinedTypes.addAll(getDataDictionary().getCombinedTypes());
164:                for (Iterator lServicemodulesIterator = getServicemodules()
165:                        .iterator(); lServicemodulesIterator.hasNext();) {
166:                    Servicemodule lServicemodule = (Servicemodule) lServicemodulesIterator
167:                            .next();
168:                    lCombinedTypes.addAll(lServicemodule.getCombinedTypes());
169:                }
170:                for (Iterator lDomainsIterator = getDomains().iterator(); lDomainsIterator
171:                        .hasNext();) {
172:                    Domain lDomain = (Domain) lDomainsIterator.next();
173:                    lCombinedTypes.addAll(lDomain.getCombinedTypes());
174:                }
175:                return java.util.Collections
176:                        .unmodifiableCollection(lCombinedTypes);
177:            }
178:        }
w___w__w___.___j_a_va__2__s_.__co_m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.