Home » geronimo-eclipse-plugin-2.2-source-release » org.apache.geronimo.jee.web » [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   
   18   package org.apache.geronimo.jee.web;
   19   
   20   import java.io.Serializable;
   21   import java.util.ArrayList;
   22   import java.util.List;
   23   
   24   import javax.xml.bind.JAXBElement;
   25   import javax.xml.bind.annotation.XmlAccessType;
   26   import javax.xml.bind.annotation.XmlAccessorType;
   27   import javax.xml.bind.annotation.XmlElement;
   28   import javax.xml.bind.annotation.XmlElementRef;
   29   import javax.xml.bind.annotation.XmlElementRefs;
   30   import javax.xml.bind.annotation.XmlType;
   31   
   32   import org.apache.geronimo.jee.application.AbstractSecurity;
   33   import org.apache.geronimo.jee.deployment.AbstractService;
   34   import org.apache.geronimo.jee.deployment.Environment;
   35   import org.apache.geronimo.jee.deployment.Gbean;
   36   import org.apache.geronimo.jee.naming.AbstractNamingEntry;
   37   import org.apache.geronimo.jee.naming.EjbLocalRef;
   38   import org.apache.geronimo.jee.naming.EjbRef;
   39   import org.apache.geronimo.jee.naming.GbeanLocator;
   40   import org.apache.geronimo.jee.naming.GbeanRef;
   41   import org.apache.geronimo.jee.naming.MessageDestination;
   42   import org.apache.geronimo.jee.naming.PersistenceContextRef;
   43   import org.apache.geronimo.jee.naming.PersistenceUnitRef;
   44   import org.apache.geronimo.jee.naming.ResourceEnvRef;
   45   import org.apache.geronimo.jee.naming.ResourceRef;
   46   import org.apache.geronimo.jee.naming.ServiceRef;
   47   import org.apache.geronimo.jee.persistence.Persistence;
   48   
   49   
   50   /**
   51    * <p>Java class for web-app complex type.
   52    * 
   53    * <p>The following schema fragment specifies the expected content contained within this class.
   54    * 
   55    * <pre>
   56    * &lt;complexType name="web-app">
   57    *   &lt;complexContent>
   58    *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
   59    *       &lt;sequence>
   60    *         &lt;element ref="{http://geronimo.apache.org/xml/ns/deployment-1.2}environment" minOccurs="0"/>
   61    *         &lt;element name="context-root" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
   62    *         &lt;element name="work-dir" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
   63    *         &lt;element ref="{http://geronimo.apache.org/xml/ns/naming-1.2}web-container" minOccurs="0"/>
   64    *         &lt;element name="container-config" type="{http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1}container-configType" minOccurs="0"/>
   65    *         &lt;group ref="{http://geronimo.apache.org/xml/ns/naming-1.2}jndiEnvironmentRefsGroup"/>
   66    *         &lt;element ref="{http://geronimo.apache.org/xml/ns/naming-1.2}message-destination" maxOccurs="unbounded" minOccurs="0"/>
   67    *         &lt;sequence minOccurs="0">
   68    *           &lt;element name="security-realm-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
   69    *           &lt;element ref="{http://geronimo.apache.org/xml/ns/j2ee/application-2.0}security" minOccurs="0"/>
   70    *         &lt;/sequence>
   71    *         &lt;choice maxOccurs="unbounded" minOccurs="0">
   72    *           &lt;element ref="{http://geronimo.apache.org/xml/ns/deployment-1.2}service" maxOccurs="unbounded" minOccurs="0"/>
   73    *           &lt;element ref="{http://java.sun.com/xml/ns/persistence}persistence"/>
   74    *         &lt;/choice>
   75    *       &lt;/sequence>
   76    *     &lt;/restriction>
   77    *   &lt;/complexContent>
   78    * &lt;/complexType>
   79    * </pre>
   80    * 
   81    * @version $Rev: 672410 $ $Date: 2008-06-28 06:16:51 +0800 (Sat, 28 Jun 2008) $
   82    */
   83   @XmlAccessorType(XmlAccessType.FIELD)
   84   @XmlType(name = "web-appType", propOrder = {
   85       "environment",
   86       "contextRoot",
   87       "workDir",
   88       "webContainer",
   89       "containerConfig",
   90       "abstractNamingEntry",
   91       "ejbRef",
   92       "ejbLocalRef",
   93       "serviceRef",
   94       "resourceRef",
   95       "resourceEnvRef",
   96       "messageDestination",
   97       "securityRealmName",
   98       "security",
   99       "serviceOrPersistence"
  100   })
  101   public class WebApp
  102       implements Serializable
  103   {
  104   
  105       private final static long serialVersionUID = 12343L;
  106       @XmlElement(namespace = "http://geronimo.apache.org/xml/ns/deployment-1.2")
  107       protected Environment environment;
  108       @XmlElement(name = "context-root")
  109       protected String contextRoot;
  110       @XmlElement(name = "work-dir")
  111       protected String workDir;
  112       @XmlElement(name = "web-container", namespace = "http://geronimo.apache.org/xml/ns/naming-1.2")
  113       protected GbeanLocator webContainer;
  114       @XmlElement(name = "container-config")
  115       protected ContainerConfig containerConfig;
  116       @XmlElementRef(name = "abstract-naming-entry", namespace = "http://geronimo.apache.org/xml/ns/naming-1.2", type = JAXBElement.class)
  117       protected List<JAXBElement<? extends AbstractNamingEntry>> abstractNamingEntry;
  118       @XmlElement(name = "ejb-ref", namespace = "http://geronimo.apache.org/xml/ns/naming-1.2")
  119       protected List<EjbRef> ejbRef;
  120       @XmlElement(name = "ejb-local-ref", namespace = "http://geronimo.apache.org/xml/ns/naming-1.2")
  121       protected List<EjbLocalRef> ejbLocalRef;
  122       @XmlElement(name = "service-ref", namespace = "http://geronimo.apache.org/xml/ns/naming-1.2")
  123       protected List<ServiceRef> serviceRef;
  124       @XmlElement(name = "resource-ref", namespace = "http://geronimo.apache.org/xml/ns/naming-1.2")
  125       protected List<ResourceRef> resourceRef;
  126       @XmlElement(name = "resource-env-ref", namespace = "http://geronimo.apache.org/xml/ns/naming-1.2")
  127       protected List<ResourceEnvRef> resourceEnvRef;
  128       @XmlElement(name = "message-destination", namespace = "http://geronimo.apache.org/xml/ns/naming-1.2")
  129       protected List<MessageDestination> messageDestination;
  130       @XmlElement(name = "security-realm-name")
  131       protected String securityRealmName;
  132       @XmlElementRef(name = "security", namespace = "http://geronimo.apache.org/xml/ns/j2ee/application-2.0", type = JAXBElement.class)
  133       protected JAXBElement<? extends AbstractSecurity> security;
  134       @XmlElementRefs({
  135           @XmlElementRef(name = "service", namespace = "http://geronimo.apache.org/xml/ns/deployment-1.2", type = JAXBElement.class),
  136           @XmlElementRef(name = "persistence", namespace = "http://java.sun.com/xml/ns/persistence", type = Persistence.class)
  137       })
  138       protected List<Serializable> serviceOrPersistence;
  139   
  140       /**
  141        *                          
  142        *                         This is the first part of the URL used to access the web application.
  143        *                         For example context-root of "Sample-App" will have URL of 
  144        *                         http://host:port/Sample-App" and a context-root of "/" would be make this the default web application to the server.
  145        * 
  146        *                         If the web application is packaged as an EAR that can use application context
  147        *                         in the "application.xml". This element is necessary unless you want context root to default to the WAR 
  148        *                         name.
  149        *                     
  150        * 
  151        * @return
  152        *     possible object is
  153        *     {@link Environment}
  154        *     
  155        */
  156       public Environment getEnvironment() {
  157           return environment;
  158       }
  159   
  160       /**
  161        *                          
  162        *                         This is the first part of the URL used to access the web application.
  163        *                         For example context-root of "Sample-App" will have URL of 
  164        *                         http://host:port/Sample-App" and a context-root of "/" would be make this the default web application to the server.
  165        * 
  166        *                         If the web application is packaged as an EAR that can use application context
  167        *                         in the "application.xml". This element is necessary unless you want context root to default to the WAR 
  168        *                         name.
  169        *                     
  170        * 
  171        * @param value
  172        *     allowed object is
  173        *     {@link Environment}
  174        *     
  175        */
  176       public void setEnvironment(Environment value) {
  177           this.environment = value;
  178       }
  179   
  180       /**
  181        * Gets the value of the contextRoot property.
  182        * 
  183        * @return
  184        *     possible object is
  185        *     {@link String }
  186        *     
  187        */
  188       public String getContextRoot() {
  189           return contextRoot;
  190       }
  191   
  192       /**
  193        * Sets the value of the contextRoot property.
  194        * 
  195        * @param value
  196        *     allowed object is
  197        *     {@link String }
  198        *     
  199        */
  200       public void setContextRoot(String value) {
  201           if (value == null || value.length() == 0)
  202               this.contextRoot = null;
  203           else
  204               this.contextRoot = value;
  205       }
  206   
  207       /**
  208        * Gets the value of the workDir property.
  209        * 
  210        * @return
  211        *     possible object is
  212        *     {@link String }
  213        *     
  214        */
  215       public String getWorkDir() {
  216           return workDir;
  217       }
  218   
  219       /**
  220        * Sets the value of the workDir property.
  221        * 
  222        * @param value
  223        *     allowed object is
  224        *     {@link String }
  225        *     
  226        */
  227       public void setWorkDir(String value) {
  228           if (value == null || value.length() == 0)
  229               this.workDir = null;
  230           else
  231               this.workDir = value;
  232       }
  233   
  234       /**
  235        * Gets the value of the webContainer property.
  236        * 
  237        * @return
  238        *     possible object is
  239        *     {@link GbeanLocator}
  240        *     
  241        */
  242       public GbeanLocator getWebContainer() {
  243           return webContainer;
  244       }
  245   
  246       /**
  247        * Sets the value of the webContainer property.
  248        * 
  249        * @param value
  250        *     allowed object is
  251        *     {@link GbeanLocator}
  252        *     
  253        */
  254       public void setWebContainer(GbeanLocator value) {
  255           this.webContainer = value;
  256       }
  257   
  258       /**
  259        * Gets the value of the containerConfig property.
  260        * 
  261        * @return
  262        *     possible object is
  263        *     {@link ContainerConfig}
  264        *     
  265        */
  266       public ContainerConfig getContainerConfig() {
  267           return containerConfig;
  268       }
  269   
  270       /**
  271        * Sets the value of the containerConfig property.
  272        * 
  273        * @param value
  274        *     allowed object is
  275        *     {@link ContainerConfig}
  276        *     
  277        */
  278       public void setContainerConfig(ContainerConfig value) {
  279           this.containerConfig = value;
  280       }
  281   
  282       /**
  283        * Gets the value of the abstractNamingEntry property.
  284        * 
  285        * <p>
  286        * This accessor method returns a reference to the live list,
  287        * not a snapshot. Therefore any modification you make to the
  288        * returned list will be present inside the JAXB object.
  289        * This is why there is not a <CODE>set</CODE> method for the abstractNamingEntry property.
  290        * 
  291        * <p>
  292        * For example, to add a new item, do as follows:
  293        * <pre>
  294        *    getAbstractNamingEntry().add(newItem);
  295        * </pre>
  296        * 
  297        * 
  298        * <p>
  299        * Objects of the following type(s) are allowed in the list
  300        * {@link JAXBElement }{@code <}{@link GbeanRef}{@code >}
  301        * {@link JAXBElement }{@code <}{@link PersistenceContextRef}{@code >}
  302        * {@link JAXBElement }{@code <}{@link AbstractNamingEntry}{@code >}
  303        * {@link JAXBElement }{@code <}{@link PersistenceUnitRef}{@code >}
  304        * 
  305        * 
  306        */
  307       public List<JAXBElement<? extends AbstractNamingEntry>> getAbstractNamingEntry() {
  308           if (abstractNamingEntry == null) {
  309               abstractNamingEntry = new ArrayList<JAXBElement<? extends AbstractNamingEntry>>();
  310           }
  311           return this.abstractNamingEntry;
  312       }
  313   
  314       /**
  315        * Gets the value of the ejbRef property.
  316        * 
  317        * <p>
  318        * This accessor method returns a reference to the live list,
  319        * not a snapshot. Therefore any modification you make to the
  320        * returned list will be present inside the JAXB object.
  321        * This is why there is not a <CODE>set</CODE> method for the ejbRef property.
  322        * 
  323        * <p>
  324        * For example, to add a new item, do as follows:
  325        * <pre>
  326        *    getEjbRef().add(newItem);
  327        * </pre>
  328        * 
  329        * 
  330        * <p>
  331        * Objects of the following type(s) are allowed in the list
  332        * {@link EjbRef}
  333        * 
  334        * 
  335        */
  336       public List<EjbRef> getEjbRef() {
  337           if (ejbRef == null) {
  338               ejbRef = new ArrayList<EjbRef>();
  339           }
  340           return this.ejbRef;
  341       }
  342   
  343       /**
  344        * Gets the value of the ejbLocalRef property.
  345        * 
  346        * <p>
  347        * This accessor method returns a reference to the live list,
  348        * not a snapshot. Therefore any modification you make to the
  349        * returned list will be present inside the JAXB object.
  350        * This is why there is not a <CODE>set</CODE> method for the ejbLocalRef property.
  351        * 
  352        * <p>
  353        * For example, to add a new item, do as follows:
  354        * <pre>
  355        *    getEjbLocalRef().add(newItem);
  356        * </pre>
  357        * 
  358        * 
  359        * <p>
  360        * Objects of the following type(s) are allowed in the list
  361        * {@link EjbLocalRef}
  362        * 
  363        * 
  364        */
  365       public List<EjbLocalRef> getEjbLocalRef() {
  366           if (ejbLocalRef == null) {
  367               ejbLocalRef = new ArrayList<EjbLocalRef>();
  368           }
  369           return this.ejbLocalRef;
  370       }
  371   
  372       /**
  373        * Gets the value of the serviceRef property.
  374        * 
  375        * <p>
  376        * This accessor method returns a reference to the live list,
  377        * not a snapshot. Therefore any modification you make to the
  378        * returned list will be present inside the JAXB object.
  379        * This is why there is not a <CODE>set</CODE> method for the serviceRef property.
  380        * 
  381        * <p>
  382        * For example, to add a new item, do as follows:
  383        * <pre>
  384        *    getServiceRef().add(newItem);
  385        * </pre>
  386        * 
  387        * 
  388        * <p>
  389        * Objects of the following type(s) are allowed in the list
  390        * {@link ServiceRef}
  391        * 
  392        * 
  393        */
  394       public List<ServiceRef> getServiceRef() {
  395           if (serviceRef == null) {
  396               serviceRef = new ArrayList<ServiceRef>();
  397           }
  398           return this.serviceRef;
  399       }
  400   
  401       /**
  402        * Gets the value of the resourceRef property.
  403        * 
  404        * <p>
  405        * This accessor method returns a reference to the live list,
  406        * not a snapshot. Therefore any modification you make to the
  407        * returned list will be present inside the JAXB object.
  408        * This is why there is not a <CODE>set</CODE> method for the resourceRef property.
  409        * 
  410        * <p>
  411        * For example, to add a new item, do as follows:
  412        * <pre>
  413        *    getResourceRef().add(newItem);
  414        * </pre>
  415        * 
  416        * 
  417        * <p>
  418        * Objects of the following type(s) are allowed in the list
  419        * {@link ResourceRef}
  420        * 
  421        * 
  422        */
  423       public List<ResourceRef> getResourceRef() {
  424           if (resourceRef == null) {
  425               resourceRef = new ArrayList<ResourceRef>();
  426           }
  427           return this.resourceRef;
  428       }
  429   
  430       /**
  431        * Gets the value of the resourceEnvRef property.
  432        * 
  433        * <p>
  434        * This accessor method returns a reference to the live list,
  435        * not a snapshot. Therefore any modification you make to the
  436        * returned list will be present inside the JAXB object.
  437        * This is why there is not a <CODE>set</CODE> method for the resourceEnvRef property.
  438        * 
  439        * <p>
  440        * For example, to add a new item, do as follows:
  441        * <pre>
  442        *    getResourceEnvRef().add(newItem);
  443        * </pre>
  444        * 
  445        * 
  446        * <p>
  447        * Objects of the following type(s) are allowed in the list
  448        * {@link ResourceEnvRef}
  449        * 
  450        * 
  451        */
  452       public List<ResourceEnvRef> getResourceEnvRef() {
  453           if (resourceEnvRef == null) {
  454               resourceEnvRef = new ArrayList<ResourceEnvRef>();
  455           }
  456           return this.resourceEnvRef;
  457       }
  458   
  459       /**
  460        * Gets the value of the messageDestination property.
  461        * 
  462        * <p>
  463        * This accessor method returns a reference to the live list,
  464        * not a snapshot. Therefore any modification you make to the
  465        * returned list will be present inside the JAXB object.
  466        * This is why there is not a <CODE>set</CODE> method for the messageDestination property.
  467        * 
  468        * <p>
  469        * For example, to add a new item, do as follows:
  470        * <pre>
  471        *    getMessageDestination().add(newItem);
  472        * </pre>
  473        * 
  474        * 
  475        * <p>
  476        * Objects of the following type(s) are allowed in the list
  477        * {@link MessageDestination}
  478        * 
  479        * 
  480        */
  481       public List<MessageDestination> getMessageDestination() {
  482           if (messageDestination == null) {
  483               messageDestination = new ArrayList<MessageDestination>();
  484           }
  485           return this.messageDestination;
  486       }
  487   
  488       /**
  489        * Gets the value of the securityRealmName property.
  490        * 
  491        * @return
  492        *     possible object is
  493        *     {@link String }
  494        *     
  495        */
  496       public String getSecurityRealmName() {
  497           return securityRealmName;
  498       }
  499   
  500       /**
  501        * Sets the value of the securityRealmName property.
  502        * 
  503        * @param value
  504        *     allowed object is
  505        *     {@link String }
  506        *     
  507        */
  508       public void setSecurityRealmName(String value) {
  509           if (value == null || value.length() == 0)
  510               this.securityRealmName = null;
  511           else
  512               this.securityRealmName = value;
  513       }
  514   
  515       /**
  516        * Gets the value of the security property.
  517        * 
  518        * @return
  519        *     possible object is
  520        *     {@link JAXBElement }{@code <}{@link AbstractSecurity}{@code >}
  521        *     {@link JAXBElement }{@code <}{@link org.apache.geronimo.jee.security.Security}{@code >}
  522        *     
  523        */
  524       public JAXBElement<? extends AbstractSecurity> getSecurity() {
  525           return security;
  526       }
  527   
  528       /**
  529        * Sets the value of the security property.
  530        * 
  531        * @param value
  532        *     allowed object is
  533        *     {@link JAXBElement }{@code <}{@link AbstractSecurity}{@code >}
  534        *     {@link JAXBElement }{@code <}{@link org.apache.geronimo.jee.security.Security}{@code >}
  535        *     
  536        */
  537       public void setSecurity(JAXBElement<? extends AbstractSecurity> value) {
  538           this.security = ((JAXBElement<? extends AbstractSecurity> ) value);
  539       }
  540   
  541       /**
  542        * Gets the value of the serviceOrPersistence property.
  543        * 
  544        * <p>
  545        * This accessor method returns a reference to the live list,
  546        * not a snapshot. Therefore any modification you make to the
  547        * returned list will be present inside the JAXB object.
  548        * This is why there is not a <CODE>set</CODE> method for the serviceOrPersistence property.
  549        * 
  550        * <p>
  551        * For example, to add a new item, do as follows:
  552        * <pre>
  553        *    getServiceOrPersistence().add(newItem);
  554        * </pre>
  555        * 
  556        * 
  557        * <p>
  558        * Objects of the following type(s) are allowed in the list
  559        * {@link JAXBElement }{@code <}{@link AbstractService}{@code >}
  560        * {@link JAXBElement }{@code <}{@link Gbean}{@code >}
  561        * {@link Persistence }
  562        * 
  563        * 
  564        */
  565       public List<Serializable> getServiceOrPersistence() {
  566           if (serviceOrPersistence == null) {
  567               serviceOrPersistence = new ArrayList<Serializable>();
  568           }
  569           return this.serviceOrPersistence;
  570       }
  571   
  572   }

Home » geronimo-eclipse-plugin-2.2-source-release » org.apache.geronimo.jee.web » [javadoc | source]