|
|||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| ServiceConfigurationDescriptor.java | - | 75.9% | 50% | 68.3% |
|
||||||||||||||
| 1 |
/**
|
|
| 2 |
* @(#)ServiceConfiguration.java
|
|
| 3 |
*
|
|
| 4 |
* JFoxSOAF, Service-Oriented Application Framework
|
|
| 5 |
*
|
|
| 6 |
* Copyright(c) JFoxSOAF Team
|
|
| 7 |
*
|
|
| 8 |
* Licensed under the GNU LGPL, Version 2.1 (the "License");
|
|
| 9 |
* you may not use this file except in compliance with the License.
|
|
| 10 |
* You may obtain a copy of the License at
|
|
| 11 |
*
|
|
| 12 |
* http://www.gnu.org/copyleft/lesser.html
|
|
| 13 |
*
|
|
| 14 |
* Unless required by applicable law or agreed to in writing, software
|
|
| 15 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
| 16 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
| 17 |
* See the License for the specific language governing permissions and
|
|
| 18 |
* limitations under the License.
|
|
| 19 |
*
|
|
| 20 |
* For more information, please visit:
|
|
| 21 |
* http://www.jfox.cn/confluence/display/JFoxSOAF/Home
|
|
| 22 |
* http://www.huihoo.org/jfox/jfoxsoaf
|
|
| 23 |
*/
|
|
| 24 |
|
|
| 25 |
package org.huihoo.jfox.soaf.schema.config;
|
|
| 26 |
|
|
| 27 |
/**
|
|
| 28 |
* Class ServiceConfigurationDescriptor.
|
|
| 29 |
*
|
|
| 30 |
* @version $Revision: 1.5 $ $Date: 2005/05/22 06:47:43 $
|
|
| 31 |
*/
|
|
| 32 |
public class ServiceConfigurationDescriptor extends |
|
| 33 |
org.exolab.castor.xml.util.XMLClassDescriptorImpl {
|
|
| 34 |
|
|
| 35 |
/**
|
|
| 36 |
* Field nsPrefix
|
|
| 37 |
*/
|
|
| 38 |
private java.lang.String nsPrefix;
|
|
| 39 |
|
|
| 40 |
/**
|
|
| 41 |
* Field nsURI
|
|
| 42 |
*/
|
|
| 43 |
private java.lang.String nsURI;
|
|
| 44 |
|
|
| 45 |
/**
|
|
| 46 |
* Field xmlName
|
|
| 47 |
*/
|
|
| 48 |
private java.lang.String xmlName;
|
|
| 49 |
|
|
| 50 |
/**
|
|
| 51 |
* Field identity
|
|
| 52 |
*/
|
|
| 53 |
private org.exolab.castor.xml.XMLFieldDescriptor identity;
|
|
| 54 |
|
|
| 55 | 12 |
public ServiceConfigurationDescriptor() {
|
| 56 | 12 |
super();
|
| 57 | 12 |
xmlName = "service-configuration";
|
| 58 |
|
|
| 59 |
//-- set grouping compositor
|
|
| 60 | 12 |
setCompositorAsSequence(); |
| 61 | 12 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
|
| 62 | 12 |
org.exolab.castor.xml.XMLFieldHandler handler = null;
|
| 63 | 12 |
org.exolab.castor.xml.FieldValidator fieldValidator = null;
|
| 64 |
//-- initialize attribute descriptors
|
|
| 65 |
|
|
| 66 |
//-- initialize element descriptors
|
|
| 67 |
|
|
| 68 |
//-- _configurationEntryList
|
|
| 69 | 12 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
|
| 70 |
org.huihoo.jfox.soaf.schema.config.ConfigurationEntry.class,
|
|
| 71 |
"_configurationEntryList", "configuration-entry", |
|
| 72 |
org.exolab.castor.xml.NodeType.Element); |
|
| 73 | 12 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
| 74 | 12 |
public java.lang.Object getValue(java.lang.Object object)
|
| 75 |
throws IllegalStateException {
|
|
| 76 | 12 |
ServiceConfiguration target = (ServiceConfiguration) object; |
| 77 | 12 |
return target.getConfigurationEntry();
|
| 78 |
} |
|
| 79 |
|
|
| 80 | 84 |
public void setValue(java.lang.Object object, java.lang.Object value) |
| 81 |
throws IllegalStateException, IllegalArgumentException {
|
|
| 82 | 84 |
try {
|
| 83 | 84 |
ServiceConfiguration target = (ServiceConfiguration) object; |
| 84 | 84 |
target |
| 85 |
.addConfigurationEntry((org.huihoo.jfox.soaf.schema.config.ConfigurationEntry) value); |
|
| 86 |
} catch (java.lang.Exception ex) {
|
|
| 87 | 0 |
throw new IllegalStateException(ex.toString()); |
| 88 |
} |
|
| 89 |
} |
|
| 90 |
|
|
| 91 | 84 |
public java.lang.Object newInstance(java.lang.Object parent) {
|
| 92 | 84 |
return new org.huihoo.jfox.soaf.schema.config.ConfigurationEntry(); |
| 93 |
} |
|
| 94 |
}); |
|
| 95 | 12 |
desc.setHandler(handler); |
| 96 | 12 |
desc.setMultivalued(true);
|
| 97 | 12 |
addFieldDescriptor(desc); |
| 98 |
|
|
| 99 |
//-- validation code for: _configurationEntryList
|
|
| 100 | 12 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
| 101 | 12 |
fieldValidator.setMinOccurs(0); |
| 102 |
{ //-- local scope
|
|
| 103 |
} |
|
| 104 | 12 |
desc.setValidator(fieldValidator); |
| 105 |
} |
|
| 106 |
|
|
| 107 |
/**
|
|
| 108 |
* Method getAccessMode
|
|
| 109 |
*/
|
|
| 110 | 0 |
public org.exolab.castor.mapping.AccessMode getAccessMode() {
|
| 111 | 0 |
return null; |
| 112 |
} |
|
| 113 |
|
|
| 114 |
/**
|
|
| 115 |
* Method getExtends
|
|
| 116 |
*/
|
|
| 117 | 0 |
public org.exolab.castor.mapping.ClassDescriptor getExtends() {
|
| 118 | 0 |
return null; |
| 119 |
} |
|
| 120 |
|
|
| 121 |
/**
|
|
| 122 |
* Method getIdentity
|
|
| 123 |
*/
|
|
| 124 | 0 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
|
| 125 | 0 |
return identity;
|
| 126 |
} |
|
| 127 |
|
|
| 128 |
/**
|
|
| 129 |
* Method getJavaClass
|
|
| 130 |
*/
|
|
| 131 | 24 |
public java.lang.Class getJavaClass() {
|
| 132 | 24 |
return org.huihoo.jfox.soaf.schema.config.ServiceConfiguration.class; |
| 133 |
} |
|
| 134 |
|
|
| 135 |
/**
|
|
| 136 |
* Method getNameSpacePrefix
|
|
| 137 |
*/
|
|
| 138 | 0 |
public java.lang.String getNameSpacePrefix() {
|
| 139 | 0 |
return nsPrefix;
|
| 140 |
} |
|
| 141 |
|
|
| 142 |
/**
|
|
| 143 |
* Method getNameSpaceURI
|
|
| 144 |
*/
|
|
| 145 | 0 |
public java.lang.String getNameSpaceURI() {
|
| 146 | 0 |
return nsURI;
|
| 147 |
} |
|
| 148 |
|
|
| 149 |
/**
|
|
| 150 |
* Method getValidator
|
|
| 151 |
*/
|
|
| 152 | 12 |
public org.exolab.castor.xml.TypeValidator getValidator() {
|
| 153 | 12 |
return this; |
| 154 |
} |
|
| 155 |
|
|
| 156 |
/**
|
|
| 157 |
* Method getXMLName
|
|
| 158 |
*/
|
|
| 159 | 0 |
public java.lang.String getXMLName() {
|
| 160 | 0 |
return xmlName;
|
| 161 |
} |
|
| 162 |
|
|
| 163 |
} |
|
||||||||||