View Javadoc
1   /**
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements. See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership. The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License. You may obtain a copy of the License at
9    *
10   * http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied. See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  //
20  // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
21  // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
22  // Any modifications to this file will be lost upon recompilation of the source schema.
23  // Generated on: 2014.03.27 at 03:31:20 PM GMT
24  //
25  
26  
27  package org.apache.wss4j.binding.wss10;
28  
29  import java.util.ArrayList;
30  import java.util.HashMap;
31  import java.util.List;
32  import java.util.Map;
33  import jakarta.xml.bind.annotation.XmlAccessType;
34  import jakarta.xml.bind.annotation.XmlAccessorType;
35  import jakarta.xml.bind.annotation.XmlAnyAttribute;
36  import jakarta.xml.bind.annotation.XmlAnyElement;
37  import jakarta.xml.bind.annotation.XmlAttribute;
38  import jakarta.xml.bind.annotation.XmlElement;
39  import jakarta.xml.bind.annotation.XmlID;
40  import jakarta.xml.bind.annotation.XmlSchemaType;
41  import jakarta.xml.bind.annotation.XmlType;
42  import jakarta.xml.bind.annotation.adapters.CollapsedStringAdapter;
43  import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
44  import javax.xml.namespace.QName;
45  import org.w3c.dom.Element;
46  
47  
48  /**
49   * This type represents a username token per Section 4.1
50   *
51   * <p>Java class for UsernameTokenType complex type.
52   *
53   * <p>The following schema fragment specifies the expected content contained within this class.
54   *
55   * <pre>
56   * &lt;complexType name="UsernameTokenType">
57   *   &lt;complexContent>
58   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
59   *       &lt;sequence>
60   *         &lt;element name="Username" type="{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}AttributedString"/>
61   *         &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
62   *       &lt;/sequence>
63   *       &lt;attribute ref="{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Id"/>
64   *       &lt;anyAttribute processContents='lax' namespace='##other'/>
65   *     &lt;/restriction>
66   *   &lt;/complexContent>
67   * &lt;/complexType>
68   * </pre>
69   *
70   *
71   */
72  @XmlAccessorType(XmlAccessType.FIELD)
73  @XmlType(name = "UsernameTokenType", propOrder = {
74      "username",
75      "any"
76  })
77  public class UsernameTokenType {
78  
79      @XmlElement(name = "Username", required = true)
80      private AttributedString username;
81      @XmlAnyElement(lax = true)
82      private List<Object> any;
83      @XmlAttribute(name = "Id", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd")
84      @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
85      @XmlID
86      @XmlSchemaType(name = "ID")
87      private String id;
88      @XmlAnyAttribute
89      private Map<QName, String> otherAttributes = new HashMap<>();
90  
91      /**
92       * Gets the value of the username property.
93       *
94       * @return
95       *     possible object is
96       *     {@link AttributedString }
97       *
98       */
99      public AttributedString getUsername() {
100         return username;
101     }
102 
103     /**
104      * Sets the value of the username property.
105      *
106      * @param value
107      *     allowed object is
108      *     {@link AttributedString }
109      *
110      */
111     public void setUsername(AttributedString value) {
112         this.username = value;
113     }
114 
115     /**
116      * Gets the value of the any property.
117      *
118      * <p>
119      * This accessor method returns a reference to the live list,
120      * not a snapshot. Therefore any modification you make to the
121      * returned list will be present inside the JAXB object.
122      * This is why there is not a <CODE>set</CODE> method for the any property.
123      *
124      * <p>
125      * For example, to add a new item, do as follows:
126      * <pre>
127      *    getAny().add(newItem);
128      * </pre>
129      *
130      *
131      * <p>
132      * Objects of the following type(s) are allowed in the list
133      * {@link Element }
134      * {@link Object }
135      *
136      *
137      */
138     public List<Object> getAny() {
139         if (any == null) {
140             any = new ArrayList<>();
141         }
142         return this.any;
143     }
144 
145     /**
146      * Gets the value of the id property.
147      *
148      * @return
149      *     possible object is
150      *     {@link String }
151      *
152      */
153     public String getId() {
154         return id;
155     }
156 
157     /**
158      * Sets the value of the id property.
159      *
160      * @param value
161      *     allowed object is
162      *     {@link String }
163      *
164      */
165     public void setId(String value) {
166         this.id = value;
167     }
168 
169     /**
170      * Gets a map that contains attributes that aren't bound to any typed property on this class.
171      *
172      * <p>
173      * the map is keyed by the name of the attribute and
174      * the value is the string value of the attribute.
175      *
176      * the map returned by this method is live, and you can add new attribute
177      * by updating the map directly. Because of this design, there's no setter.
178      *
179      *
180      * @return
181      *     always non-null
182      */
183     public Map<QName, String> getOtherAttributes() {
184         return otherAttributes;
185     }
186 
187 }