Source Code Cross Referenced for MockParameterDefinition.java in  » Development » Java-Plugin-Framework » org » java » plugin » tools » mocks » 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 » Development » Java Plugin Framework » org.java.plugin.tools.mocks 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*****************************************************************************
002:         * Java Plug-in Framework (JPF)
003:         * Copyright (C) 2006-2007 Dmitry Olshansky
004:         * 
005:         * This library is free software; you can redistribute it and/or
006:         * modify it under the terms of the GNU Lesser General Public
007:         * License as published by the Free Software Foundation; either
008:         * version 2.1 of the License, or (at your option) any later version.
009:         * 
010:         * This library is distributed in the hope that it will be useful,
011:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
012:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013:         * Lesser General Public License for more details.
014:         * 
015:         * You should have received a copy of the GNU Lesser General Public
016:         * License along with this library; if not, write to the Free Software
017:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
018:         *****************************************************************************/package org.java.plugin.tools.mocks;
019:
020:        import java.util.Collection;
021:        import java.util.Collections;
022:        import java.util.LinkedList;
023:        import org.java.plugin.registry.ExtensionPoint;
024:        import org.java.plugin.registry.ParameterMultiplicity;
025:        import org.java.plugin.registry.ParameterType;
026:        import org.java.plugin.registry.ExtensionPoint.ParameterDefinition;
027:
028:        /**
029:         * @version $Id$
030:         */
031:        public class MockParameterDefinition extends
032:                MockPluginElement<ParameterDefinition> implements 
033:                ParameterDefinition {
034:            private String customData;
035:            private ExtensionPoint declaringExtensionPoint;
036:            private String defaultValue;
037:            private ParameterMultiplicity multiplicity;
038:            private ParameterType type;
039:            private ParameterDefinition super Definition;
040:            private LinkedList<ParameterDefinition> subDefinitions = new LinkedList<ParameterDefinition>();
041:
042:            /**
043:             * @see org.java.plugin.registry.ExtensionPoint.ParameterDefinition#getCustomData()
044:             */
045:            public String getCustomData() {
046:                return customData;
047:            }
048:
049:            /**
050:             * @param value the custom data to set
051:             * @return this instance
052:             */
053:            public MockParameterDefinition setCustomData(final String value) {
054:                customData = value;
055:                return this ;
056:            }
057:
058:            /**
059:             * @see org.java.plugin.registry.ExtensionPoint.ParameterDefinition#getDeclaringExtensionPoint()
060:             */
061:            public ExtensionPoint getDeclaringExtensionPoint() {
062:                return declaringExtensionPoint;
063:            }
064:
065:            /**
066:             * @param value the declaring extension point to set
067:             * @return this instance
068:             */
069:            public MockParameterDefinition setDeclaringExtensionPoint(
070:                    final ExtensionPoint value) {
071:                declaringExtensionPoint = value;
072:                return this ;
073:            }
074:
075:            /**
076:             * @see org.java.plugin.registry.ExtensionPoint.ParameterDefinition#getDefaultValue()
077:             */
078:            public String getDefaultValue() {
079:                return defaultValue;
080:            }
081:
082:            /**
083:             * @param value the default value to set
084:             * @return this instance
085:             */
086:            public MockParameterDefinition setDefaultValue(final String value) {
087:                defaultValue = value;
088:                return this ;
089:            }
090:
091:            /**
092:             * @see org.java.plugin.registry.ExtensionPoint.ParameterDefinition#getMultiplicity()
093:             */
094:            public ParameterMultiplicity getMultiplicity() {
095:                return multiplicity;
096:            }
097:
098:            /**
099:             * @param value the multiplicity to set
100:             * @return this instance
101:             */
102:            public MockParameterDefinition setMultiplicity(
103:                    final ParameterMultiplicity value) {
104:                multiplicity = value;
105:                return this ;
106:            }
107:
108:            /**
109:             * @see org.java.plugin.registry.ExtensionPoint.ParameterDefinition#getSubDefinition(java.lang.String)
110:             */
111:            public ParameterDefinition getSubDefinition(String id) {
112:                for (ParameterDefinition paramDef : subDefinitions) {
113:                    if (paramDef.getId().equals(id)) {
114:                        return paramDef;
115:                    }
116:                }
117:                throw new IllegalArgumentException(
118:                        "unknown parameter definition ID " + id); //$NON-NLS-1$
119:            }
120:
121:            /**
122:             * @see org.java.plugin.registry.ExtensionPoint.ParameterDefinition#getSubDefinitions()
123:             */
124:            public Collection<ParameterDefinition> getSubDefinitions() {
125:                return Collections.unmodifiableCollection(subDefinitions);
126:            }
127:
128:            /**
129:             * @param parameterDefinition sub-parameter definition to add
130:             * @return this instance
131:             */
132:            public MockParameterDefinition addSubDefinition(
133:                    final ParameterDefinition parameterDefinition) {
134:                subDefinitions.add(parameterDefinition);
135:                return this ;
136:            }
137:
138:            /**
139:             * @see org.java.plugin.registry.ExtensionPoint.ParameterDefinition#getSuperDefinition()
140:             */
141:            public ParameterDefinition getSuperDefinition() {
142:                return super Definition;
143:            }
144:
145:            /**
146:             * @param value the super definition to set
147:             * @return this instance
148:             */
149:            public MockParameterDefinition setSuperDefinition(
150:                    final ParameterDefinition value) {
151:                super Definition = value;
152:                return this ;
153:            }
154:
155:            /**
156:             * @see org.java.plugin.registry.ExtensionPoint.ParameterDefinition#getType()
157:             */
158:            public ParameterType getType() {
159:                return type;
160:            }
161:
162:            /**
163:             * @param value the type to set
164:             * @return this instance
165:             */
166:            public MockParameterDefinition setType(final ParameterType value) {
167:                type = value;
168:                return this;
169:            }
170:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.