Source Code Cross Referenced for DefaultTestStepProperty.java in  » Web-Services » soapui-1.7.5 » com » eviware » soapui » model » support » 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 » Web Services » soapui 1.7.5 » com.eviware.soapui.model.support 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  soapUI, copyright (C) 2004-2007 eviware.com 
003:         *
004:         *  soapUI is free software; you can redistribute it and/or modify it under the 
005:         *  terms of version 2.1 of the GNU Lesser General Public License as published by 
006:         *  the Free Software Foundation.
007:         *
008:         *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
009:         *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
010:         *  See the GNU Lesser General Public License for more details at gnu.org.
011:         */
012:
013:        package com.eviware.soapui.model.support;
014:
015:        import com.eviware.soapui.model.testsuite.TestStep;
016:        import com.eviware.soapui.model.testsuite.TestStepProperty;
017:
018:        /***
019:         * Default implementation of TestStepProperty interface 
020:         * 
021:         * @author Ole.Matzura
022:         */
023:
024:        public class DefaultTestStepProperty implements  TestStepProperty {
025:            private final String name;
026:            private boolean isReadOnly;
027:            private String description;
028:            private PropertyHandler handler;
029:            private final TestStep testStep;
030:
031:            public DefaultTestStepProperty(String name, boolean isReadOnly,
032:                    PropertyHandler handler, TestStep testStep) {
033:                this .name = name;
034:                this .isReadOnly = isReadOnly;
035:                this .handler = handler;
036:                this .testStep = testStep;
037:            }
038:
039:            public DefaultTestStepProperty(String name, TestStep testStep) {
040:                this (name, false, new SimplePropertyHandler(), testStep);
041:            }
042:
043:            public DefaultTestStepProperty(String name, boolean isReadOnly,
044:                    TestStep testStep) {
045:                this (name, isReadOnly, new SimplePropertyHandler(), testStep);
046:            }
047:
048:            public String getDescription() {
049:                return description;
050:            }
051:
052:            public void setDescription(String description) {
053:                this .description = description;
054:            }
055:
056:            public String getName() {
057:                return name;
058:            }
059:
060:            public void setIsReadOnly(boolean isReadOnly) {
061:                this .isReadOnly = isReadOnly;
062:            }
063:
064:            public boolean isReadOnly() {
065:                return isReadOnly;
066:            }
067:
068:            public void setPropertyHandler(PropertyHandler handler) {
069:                this .handler = handler;
070:            }
071:
072:            public String getValue() {
073:                return handler == null ? null : handler.getValue();
074:            }
075:
076:            public void setValue(String value) {
077:                if (isReadOnly())
078:                    throw new RuntimeException(
079:                            "Trying to set read-only property [" + getName()
080:                                    + "]");
081:
082:                if (handler != null) {
083:                    handler.setValue(value);
084:                }
085:            }
086:
087:            public TestStep getTestStep() {
088:                return testStep;
089:            }
090:
091:            /**
092:             * Handler for providing and setting property values
093:             * 
094:             * @author Ole.Matzura
095:             */
096:
097:            public interface PropertyHandler {
098:                public String getValue();
099:
100:                public void setValue(String value);
101:            }
102:
103:            /**
104:             * Empty implementation of PropertyHandler interface
105:             * 
106:             * @author Ole.Matzura
107:             */
108:
109:            public static class PropertyHandlerAdapter implements 
110:                    PropertyHandler {
111:                public String getValue() {
112:                    return null;
113:                }
114:
115:                public void setValue(String value) {
116:                }
117:            }
118:
119:            /**
120:             * Simple implementation of PropertyHandler interface
121:             * 
122:             * @author Ole.Matzura
123:             */
124:
125:            public static class SimplePropertyHandler implements 
126:                    PropertyHandler {
127:                private String value;
128:
129:                public String getValue() {
130:                    return value;
131:                }
132:
133:                public void setValue(String value) {
134:                    this.value = value;
135:                }
136:            }
137:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.