Save This Page
Home » openejb-3.1.2-src » org.apache » openejb » jee » [javadoc | source]
    1   /**
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *     http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    *  Unless required by applicable law or agreed to in writing, software
   12    *  distributed under the License is distributed on an "AS IS" BASIS,
   13    *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    *  See the License for the specific language governing permissions and
   15    *  limitations under the License.
   16    */
   17   package org.apache.openejb.jee;
   18   
   19   import javax.xml.bind.annotation.XmlAccessType;
   20   import javax.xml.bind.annotation.XmlAccessorType;
   21   import javax.xml.bind.annotation.XmlAttribute;
   22   import javax.xml.bind.annotation.XmlElement;
   23   import javax.xml.bind.annotation.XmlID;
   24   import javax.xml.bind.annotation.XmlType;
   25   import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
   26   import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
   27   import javax.xml.namespace.QName;
   28   import java.util.ArrayList;
   29   import java.util.Collection;
   30   import java.util.List;
   31   import java.util.Map;
   32   
   33   /**
   34    * Declares the handler for a port-component. Handlers can access the
   35    * init-param name/value pairs using the HandlerInfo interface.
   36    * <p/>
   37    * Used in: port-component
   38    */
   39   @XmlAccessorType(XmlAccessType.FIELD)
   40   @XmlType(name = "port-component_handlerType", propOrder = {
   41       "description",
   42       "displayName",
   43       "icon",
   44       "handlerName",
   45       "handlerClass",
   46       "initParam",
   47       "soapHeader",
   48       "soapRole",
   49       "portName"
   50   })
   51   public class Handler {
   52       protected List<String> description;
   53       @XmlElement(name = "display-name")
   54       protected List<String> displayName;
   55       @XmlElement(name = "icon")
   56       protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
   57       @XmlElement(name = "handler-name", required = true)
   58       protected String handlerName;
   59       @XmlElement(name = "handler-class", required = true)
   60       protected String handlerClass;
   61       @XmlElement(name = "init-param")
   62       protected List<ParamValue> initParam;
   63       @XmlElement(name = "soap-header")
   64       protected List<QName> soapHeader;
   65       @XmlElement(name = "soap-role")
   66       protected List<String> soapRole;
   67       // only used by service-refs
   68       @XmlElement(name = "port-name", required = true)
   69       protected List<String> portName;
   70       @XmlAttribute
   71       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
   72       @XmlID
   73       protected String id;
   74   
   75       public List<String> getDescription() {
   76           if (description == null) {
   77               description = new ArrayList<String>();
   78           }
   79           return this.description;
   80       }
   81   
   82       public List<String> getDisplayName() {
   83           if (displayName == null) {
   84               displayName = new ArrayList<String>();
   85           }
   86           return this.displayName;
   87       }
   88   
   89       public Collection<Icon> getIcons() {
   90           if (icon == null) {
   91               icon = new LocalCollection<Icon>();
   92           }
   93           return icon;
   94       }
   95   
   96       public Map<String, Icon> getIconMap() {
   97           if (icon == null) {
   98               icon = new LocalCollection<Icon>();
   99           }
  100           return icon.toMap();
  101       }
  102   
  103       public Icon getIcon() {
  104           return icon.getLocal();
  105       }
  106   
  107       public String getHandlerName() {
  108           return handlerName;
  109       }
  110   
  111       public void setHandlerName(String value) {
  112           this.handlerName = value;
  113       }
  114   
  115       public String getHandlerClass() {
  116           return handlerClass;
  117       }
  118   
  119       public void setHandlerClass(String value) {
  120           this.handlerClass = value;
  121       }
  122   
  123       public List<ParamValue> getInitParam() {
  124           if (initParam == null) {
  125               initParam = new ArrayList<ParamValue>();
  126           }
  127           return this.initParam;
  128       }
  129   
  130       public List<QName> getSoapHeader() {
  131           if (soapHeader == null) {
  132               soapHeader = new ArrayList<QName>();
  133           }
  134           return this.soapHeader;
  135       }
  136   
  137       public List<String> getSoapRole() {
  138           if (soapRole == null) {
  139               soapRole = new ArrayList<String>();
  140           }
  141           return this.soapRole;
  142       }
  143   
  144       public List<String> getPortName() {
  145           if (portName == null) {
  146               portName = new ArrayList<String>();
  147           }
  148           return this.portName;
  149       }
  150   
  151       public String getId() {
  152           return id;
  153       }
  154   
  155       public void setId(String value) {
  156           this.id = value;
  157       }
  158   }

Save This Page
Home » openejb-3.1.2-src » org.apache » openejb » jee » [javadoc | source]