1 /* 2 * Copyright 2001-2004 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.apache.geronimo.ews.ws4j2ee.context.webservices.server; 17 18 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFInitParam; 19 20 /*** 21 * This will encapsulate the init parameter element and the information will be able access 22 * using the interface published. 23 */ 24 public abstract class AbstractWSCFInitParam extends WSCFElement implements WSCFInitParam { 25 26 /*** 27 * Init parameter name 28 */ 29 protected String paramName; 30 31 /*** 32 * Init parameter value 33 */ 34 protected String paramValue; 35 36 /*** 37 * Init parameter description 38 */ 39 protected String description; 40 41 public AbstractWSCFInitParam() { 42 } 43 44 45 ////////////////////////////////////////jaxb intefacing block//////////////////////////// 46 47 // public WSCFInitParamImpl(ParamValueType jaxbInitParameter){ 48 // this.jaxbInitParameter = jaxbInitParameter; 49 // 50 // /////////////////asigning values/////////////////// 51 // if(null != jaxbInitParameter.getParamName()) 52 // this.paramName = jaxbInitParameter.getParamName().getValue(); 53 // 54 // if(null != jaxbInitParameter.getParamValue()) 55 // this.paramValue = jaxbInitParameter.getParamValue().getValue(); 56 // 57 // List temp = null; 58 // temp = jaxbInitParameter.getDescription(); 59 // if(0 != temp.size()) 60 // this.description = ((DescriptionType)temp.get(0)).getValue(); 61 // 62 // } 63 // 64 // 65 // ///////////////////////////////////////////////////////////////////////////////////////// 66 // 67 // /*** 68 // * The constructor. this willget the child nodes that provide teh sufficient statistics about the init parameters. 69 // * @param e init parameter Element 70 // * @throws WSCFException 71 // */ 72 // public AbstractWSCFInitParamImpl(Element e) throws WSCFException{ 73 // super(e); 74 // 75 // //extract param name 76 // Element element = this.getChildElement(e, WSCFConstants.ELEM_WSCF_PARAM_NAME); 77 // if(null != element){this.paramName = element.getChildNodes().item(0).toString();} 78 // 79 // //extract param value 80 // element = this.getChildElement(e, WSCFConstants.ELEM_WSCF_PARAM_VLAUE); 81 // if(null != element){this.paramValue = element.getChildNodes().item(0).toString();} 82 // 83 // // extract the description 84 // element = this.getChildElement(e, WSCFConstants.ELEM_WSCF_DESCRIPTION); 85 // if(null != element){this.description = element.getChildNodes().item(0).toString();} 86 // 87 // 88 // } 89 90 91 /*** 92 * Gets the description of the init parameter element 93 * 94 * @return description 95 */ 96 public String getDescription() { 97 return description; 98 } 99 100 /*** 101 * Gets the name of the init parameter element 102 * 103 * @return name 104 */ 105 public String getParamName() { 106 return paramName; 107 } 108 109 /*** 110 * Gets the value of the init parameter element 111 * 112 * @return value 113 */ 114 public String getParamValue() { 115 return paramValue; 116 } 117 }