Source Code Cross Referenced for OperationInfo.java in  » Web-Services-apache-cxf-2.0.1 » api » org » apache » cxf » service » model » 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 apache cxf 2.0.1 » api » org.apache.cxf.service.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Licensed to the Apache Software Foundation (ASF) under one
003:         * or more contributor license agreements. See the NOTICE file
004:         * distributed with this work for additional information
005:         * regarding copyright ownership. The ASF licenses this file
006:         * to you under the Apache License, Version 2.0 (the
007:         * "License"); you may not use this file except in compliance
008:         * with the License. You may obtain a copy of the License at
009:         *
010:         * http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         * Unless required by applicable law or agreed to in writing,
013:         * software distributed under the License is distributed on an
014:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         * KIND, either express or implied. See the License for the
016:         * specific language governing permissions and limitations
017:         * under the License.
018:         */package org.apache.cxf.service.model;
019:
020:        import java.util.Collection;
021:        import java.util.Collections;
022:        import java.util.List;
023:        import java.util.Map;
024:        import java.util.concurrent.ConcurrentHashMap;
025:        import java.util.logging.Logger;
026:
027:        import javax.xml.namespace.QName;
028:
029:        import org.apache.cxf.common.i18n.Message;
030:        import org.apache.cxf.common.logging.LogUtils;
031:
032:        public class OperationInfo extends AbstractPropertiesHolder {
033:            private static final Logger LOG = LogUtils
034:                    .getL7dLogger(OperationInfo.class);
035:            InterfaceInfo intf;
036:            QName opName;
037:            String inName;
038:            MessageInfo inputMessage;
039:            String outName;
040:            MessageInfo outputMessage;
041:            Map<QName, FaultInfo> faults;
042:            OperationInfo unwrappedOperation;
043:            List<String> parameterOrdering;
044:
045:            public OperationInfo() {
046:            }
047:
048:            OperationInfo(InterfaceInfo it, QName n) {
049:                intf = it;
050:                setName(n);
051:            }
052:
053:            OperationInfo(OperationInfo op) {
054:                intf = op.getInterface();
055:                setName(op.getName());
056:            }
057:
058:            /**
059:             * Returns the name of the Operation.
060:             * @return the name of the Operation
061:             */
062:            public QName getName() {
063:                return opName;
064:            }
065:
066:            /**
067:             * Sets the name of the operation.
068:             * @param name the new name of the operation
069:             */
070:            public final void setName(QName name) {
071:                if (name == null) {
072:                    throw new NullPointerException(
073:                            "Operation Name cannot be null.");
074:                }
075:                opName = name;
076:            }
077:
078:            public InterfaceInfo getInterface() {
079:                return intf;
080:            }
081:
082:            public MessageInfo createMessage(QName nm) {
083:                return new MessageInfo(this , nm);
084:            }
085:
086:            public MessageInfo getOutput() {
087:                return outputMessage;
088:            }
089:
090:            public String getOutputName() {
091:                return outName;
092:            }
093:
094:            public void setOutput(String nm, MessageInfo out) {
095:                outName = nm;
096:                outputMessage = out;
097:            }
098:
099:            public boolean hasOutput() {
100:                return outputMessage != null;
101:            }
102:
103:            public MessageInfo getInput() {
104:                return inputMessage;
105:            }
106:
107:            public String getInputName() {
108:                return inName;
109:            }
110:
111:            public void setInput(String nm, MessageInfo in) {
112:                inName = nm;
113:                inputMessage = in;
114:            }
115:
116:            public boolean hasInput() {
117:                return inputMessage != null;
118:            }
119:
120:            public boolean isOneWay() {
121:                return inputMessage != null && outputMessage == null;
122:            }
123:
124:            public boolean isUnwrappedCapable() {
125:                return unwrappedOperation != null;
126:            }
127:
128:            public OperationInfo getUnwrappedOperation() {
129:                return unwrappedOperation;
130:            }
131:
132:            public void setUnwrappedOperation(OperationInfo op) {
133:                unwrappedOperation = op;
134:            }
135:
136:            public boolean isUnwrapped() {
137:                return false;
138:            }
139:
140:            /**
141:             * Adds an fault to this operation.
142:             *
143:             * @param name the fault name.
144:             */
145:            public FaultInfo addFault(QName name, QName message) {
146:                if (name == null) {
147:                    throw new NullPointerException(new Message(
148:                            "FAULT.NAME.NOT.NULL", LOG).toString());
149:                }
150:                if (faults != null && faults.containsKey(name)) {
151:                    throw new IllegalArgumentException(
152:                            new Message("DUPLICATED.FAULT.NAME", LOG,
153:                                    new Object[] { name }).toString());
154:                }
155:                FaultInfo fault = new FaultInfo(name, message, this );
156:                addFault(fault);
157:                return fault;
158:            }
159:
160:            /**
161:             * Adds a fault to this operation.
162:             *
163:             * @param fault the fault.
164:             */
165:            public synchronized void addFault(FaultInfo fault) {
166:                if (faults == null) {
167:                    faults = new ConcurrentHashMap<QName, FaultInfo>(4);
168:                }
169:                faults.put(fault.getFaultName(), fault);
170:            }
171:
172:            /**
173:             * Removes a fault from this operation.
174:             *
175:             * @param name the qualified fault name.
176:             */
177:            public void removeFault(QName name) {
178:                if (faults != null) {
179:                    faults.remove(name);
180:                }
181:            }
182:
183:            /**
184:             * Returns the fault with the given name, if found.
185:             *
186:             * @param name the name.
187:             * @return the fault; or <code>null</code> if not found.
188:             */
189:            public FaultInfo getFault(QName name) {
190:                if (faults != null) {
191:                    return faults.get(name);
192:                }
193:                return null;
194:            }
195:
196:            /**
197:             * Returns all faults for this operation.
198:             *
199:             * @return all faults.
200:             */
201:            public Collection<FaultInfo> getFaults() {
202:                if (faults == null) {
203:                    return Collections.emptyList();
204:                }
205:                return Collections.unmodifiableCollection(faults.values());
206:            }
207:
208:            public void setParameterOrdering(List<String> o) {
209:                this .parameterOrdering = o;
210:            }
211:
212:            public List<String> getParameterOrdering() {
213:                return parameterOrdering;
214:            }
215:
216:            @Override
217:            public String toString() {
218:                return new StringBuilder().append("[OperationInfo: ").append(
219:                        opName).append("]").toString();
220:            }
221:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.