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.XmlRootElement;
   26   import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
   27   import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
   28   import java.util.ArrayList;
   29   import java.util.Collection;
   30   import java.util.List;
   31   import java.util.Map;
   32   
   33   @XmlRootElement(name = "webservices")
   34   @XmlAccessorType(XmlAccessType.FIELD)
   35   @XmlType(name = "webservicesType", propOrder = {
   36       "description",
   37       "displayName",
   38       "icon",
   39       "webserviceDescription"
   40   })
   41   public class Webservices {
   42       protected List<String> description;
   43       @XmlElement(name = "display-name")
   44       protected List<String> displayName;
   45       @XmlElement(name = "icon")
   46       protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
   47       @XmlElement(name = "webservice-description", required = true)
   48       protected KeyedCollection<String, WebserviceDescription> webserviceDescription;
   49       @XmlAttribute
   50       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
   51       @XmlID
   52       protected String id;
   53       @XmlAttribute(required = true)
   54       protected String version;
   55   
   56       public List<String> getDescription() {
   57           if (description == null) {
   58               description = new ArrayList<String>();
   59           }
   60           return this.description;
   61       }
   62   
   63       public List<String> getDisplayName() {
   64           if (displayName == null) {
   65               displayName = new ArrayList<String>();
   66           }
   67           return this.displayName;
   68       }
   69   
   70       public Collection<Icon> getIcons() {
   71           if (icon == null) {
   72               icon = new LocalCollection<Icon>();
   73           }
   74           return icon;
   75       }
   76   
   77       public Map<String, Icon> getIconMap() {
   78           if (icon == null) {
   79               icon = new LocalCollection<Icon>();
   80           }
   81           return icon.toMap();
   82       }
   83   
   84       public Icon getIcon() {
   85           return icon.getLocal();
   86       }
   87   
   88       public Collection<WebserviceDescription> getWebserviceDescription() {
   89           if (webserviceDescription == null) {
   90               webserviceDescription = new KeyedCollection<String, WebserviceDescription>();
   91           }
   92           return this.webserviceDescription;
   93       }
   94   
   95       public Map<String, WebserviceDescription> getWebserviceDescriptionMap() {
   96           if (webserviceDescription == null) {
   97               webserviceDescription = new KeyedCollection<String, WebserviceDescription>();
   98           }
   99           return webserviceDescription.toMap();
  100       }
  101   
  102       public String getId() {
  103           return id;
  104       }
  105   
  106       public void setId(String value) {
  107           this.id = value;
  108       }
  109   
  110       public String getVersion() {
  111           if (version == null) {
  112               return "1.2";
  113           } else {
  114               return version;
  115           }
  116       }
  117   
  118       public void setVersion(String value) {
  119           this.version = value;
  120       }
  121   }

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