001 /*
002 * XML Type: principalType
003 * Namespace: http://geronimo.apache.org/xml/ns/security-1.2
004 * Java type: org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType
005 *
006 * Automatically generated - do not modify.
007 */
008 package org.apache.geronimo.xbeans.geronimo.security.impl;
009 /**
010 * An XML principalType(@http://geronimo.apache.org/xml/ns/security-1.2).
011 *
012 * This is a complex type.
013 */
014 public class GerPrincipalTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType
015 {
016
017 public GerPrincipalTypeImpl(org.apache.xmlbeans.SchemaType sType)
018 {
019 super(sType);
020 }
021
022 private static final javax.xml.namespace.QName DESCRIPTION$0 =
023 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/security-1.2", "description");
024 private static final javax.xml.namespace.QName CLASS1$2 =
025 new javax.xml.namespace.QName("", "class");
026 private static final javax.xml.namespace.QName NAME$4 =
027 new javax.xml.namespace.QName("", "name");
028 private static final javax.xml.namespace.QName DESIGNATEDRUNAS$6 =
029 new javax.xml.namespace.QName("", "designated-run-as");
030
031
032 /**
033 * Gets array of all "description" elements
034 */
035 public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] getDescriptionArray()
036 {
037 synchronized (monitor())
038 {
039 check_orphaned();
040 java.util.List targetList = new java.util.ArrayList();
041 get_store().find_all_element_users(DESCRIPTION$0, targetList);
042 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] result = new org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[targetList.size()];
043 targetList.toArray(result);
044 return result;
045 }
046 }
047
048 /**
049 * Gets ith "description" element
050 */
051 public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType getDescriptionArray(int i)
052 {
053 synchronized (monitor())
054 {
055 check_orphaned();
056 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null;
057 target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().find_element_user(DESCRIPTION$0, i);
058 if (target == null)
059 {
060 throw new IndexOutOfBoundsException();
061 }
062 return target;
063 }
064 }
065
066 /**
067 * Returns number of "description" element
068 */
069 public int sizeOfDescriptionArray()
070 {
071 synchronized (monitor())
072 {
073 check_orphaned();
074 return get_store().count_elements(DESCRIPTION$0);
075 }
076 }
077
078 /**
079 * Sets array of all "description" element
080 */
081 public void setDescriptionArray(org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] descriptionArray)
082 {
083 synchronized (monitor())
084 {
085 check_orphaned();
086 arraySetterHelper(descriptionArray, DESCRIPTION$0);
087 }
088 }
089
090 /**
091 * Sets ith "description" element
092 */
093 public void setDescriptionArray(int i, org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType description)
094 {
095 synchronized (monitor())
096 {
097 check_orphaned();
098 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null;
099 target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().find_element_user(DESCRIPTION$0, i);
100 if (target == null)
101 {
102 throw new IndexOutOfBoundsException();
103 }
104 target.set(description);
105 }
106 }
107
108 /**
109 * Inserts and returns a new empty value (as xml) as the ith "description" element
110 */
111 public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType insertNewDescription(int i)
112 {
113 synchronized (monitor())
114 {
115 check_orphaned();
116 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null;
117 target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().insert_element_user(DESCRIPTION$0, i);
118 return target;
119 }
120 }
121
122 /**
123 * Appends and returns a new empty value (as xml) as the last "description" element
124 */
125 public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType addNewDescription()
126 {
127 synchronized (monitor())
128 {
129 check_orphaned();
130 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null;
131 target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().add_element_user(DESCRIPTION$0);
132 return target;
133 }
134 }
135
136 /**
137 * Removes the ith "description" element
138 */
139 public void removeDescription(int i)
140 {
141 synchronized (monitor())
142 {
143 check_orphaned();
144 get_store().remove_element(DESCRIPTION$0, i);
145 }
146 }
147
148 /**
149 * Gets the "class" attribute
150 */
151 public java.lang.String getClass1()
152 {
153 synchronized (monitor())
154 {
155 check_orphaned();
156 org.apache.xmlbeans.SimpleValue target = null;
157 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLASS1$2);
158 if (target == null)
159 {
160 return null;
161 }
162 return target.getStringValue();
163 }
164 }
165
166 /**
167 * Gets (as xml) the "class" attribute
168 */
169 public org.apache.xmlbeans.XmlString xgetClass1()
170 {
171 synchronized (monitor())
172 {
173 check_orphaned();
174 org.apache.xmlbeans.XmlString target = null;
175 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(CLASS1$2);
176 return target;
177 }
178 }
179
180 /**
181 * Sets the "class" attribute
182 */
183 public void setClass1(java.lang.String class1)
184 {
185 synchronized (monitor())
186 {
187 check_orphaned();
188 org.apache.xmlbeans.SimpleValue target = null;
189 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLASS1$2);
190 if (target == null)
191 {
192 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CLASS1$2);
193 }
194 target.setStringValue(class1);
195 }
196 }
197
198 /**
199 * Sets (as xml) the "class" attribute
200 */
201 public void xsetClass1(org.apache.xmlbeans.XmlString class1)
202 {
203 synchronized (monitor())
204 {
205 check_orphaned();
206 org.apache.xmlbeans.XmlString target = null;
207 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(CLASS1$2);
208 if (target == null)
209 {
210 target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(CLASS1$2);
211 }
212 target.set(class1);
213 }
214 }
215
216 /**
217 * Gets the "name" attribute
218 */
219 public java.lang.String getName()
220 {
221 synchronized (monitor())
222 {
223 check_orphaned();
224 org.apache.xmlbeans.SimpleValue target = null;
225 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$4);
226 if (target == null)
227 {
228 return null;
229 }
230 return target.getStringValue();
231 }
232 }
233
234 /**
235 * Gets (as xml) the "name" attribute
236 */
237 public org.apache.xmlbeans.XmlString xgetName()
238 {
239 synchronized (monitor())
240 {
241 check_orphaned();
242 org.apache.xmlbeans.XmlString target = null;
243 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$4);
244 return target;
245 }
246 }
247
248 /**
249 * Sets the "name" attribute
250 */
251 public void setName(java.lang.String name)
252 {
253 synchronized (monitor())
254 {
255 check_orphaned();
256 org.apache.xmlbeans.SimpleValue target = null;
257 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$4);
258 if (target == null)
259 {
260 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$4);
261 }
262 target.setStringValue(name);
263 }
264 }
265
266 /**
267 * Sets (as xml) the "name" attribute
268 */
269 public void xsetName(org.apache.xmlbeans.XmlString name)
270 {
271 synchronized (monitor())
272 {
273 check_orphaned();
274 org.apache.xmlbeans.XmlString target = null;
275 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$4);
276 if (target == null)
277 {
278 target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$4);
279 }
280 target.set(name);
281 }
282 }
283
284 /**
285 * Gets the "designated-run-as" attribute
286 */
287 public boolean getDesignatedRunAs()
288 {
289 synchronized (monitor())
290 {
291 check_orphaned();
292 org.apache.xmlbeans.SimpleValue target = null;
293 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DESIGNATEDRUNAS$6);
294 if (target == null)
295 {
296 target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(DESIGNATEDRUNAS$6);
297 }
298 if (target == null)
299 {
300 return false;
301 }
302 return target.getBooleanValue();
303 }
304 }
305
306 /**
307 * Gets (as xml) the "designated-run-as" attribute
308 */
309 public org.apache.xmlbeans.XmlBoolean xgetDesignatedRunAs()
310 {
311 synchronized (monitor())
312 {
313 check_orphaned();
314 org.apache.xmlbeans.XmlBoolean target = null;
315 target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(DESIGNATEDRUNAS$6);
316 if (target == null)
317 {
318 target = (org.apache.xmlbeans.XmlBoolean)get_default_attribute_value(DESIGNATEDRUNAS$6);
319 }
320 return target;
321 }
322 }
323
324 /**
325 * True if has "designated-run-as" attribute
326 */
327 public boolean isSetDesignatedRunAs()
328 {
329 synchronized (monitor())
330 {
331 check_orphaned();
332 return get_store().find_attribute_user(DESIGNATEDRUNAS$6) != null;
333 }
334 }
335
336 /**
337 * Sets the "designated-run-as" attribute
338 */
339 public void setDesignatedRunAs(boolean designatedRunAs)
340 {
341 synchronized (monitor())
342 {
343 check_orphaned();
344 org.apache.xmlbeans.SimpleValue target = null;
345 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DESIGNATEDRUNAS$6);
346 if (target == null)
347 {
348 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DESIGNATEDRUNAS$6);
349 }
350 target.setBooleanValue(designatedRunAs);
351 }
352 }
353
354 /**
355 * Sets (as xml) the "designated-run-as" attribute
356 */
357 public void xsetDesignatedRunAs(org.apache.xmlbeans.XmlBoolean designatedRunAs)
358 {
359 synchronized (monitor())
360 {
361 check_orphaned();
362 org.apache.xmlbeans.XmlBoolean target = null;
363 target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(DESIGNATEDRUNAS$6);
364 if (target == null)
365 {
366 target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(DESIGNATEDRUNAS$6);
367 }
368 target.set(designatedRunAs);
369 }
370 }
371
372 /**
373 * Unsets the "designated-run-as" attribute
374 */
375 public void unsetDesignatedRunAs()
376 {
377 synchronized (monitor())
378 {
379 check_orphaned();
380 get_store().remove_attribute(DESIGNATEDRUNAS$6);
381 }
382 }
383 }