001 /*
002 * XML Type: default-principalType
003 * Namespace: http://geronimo.apache.org/xml/ns/security-1.2
004 * Java type: org.apache.geronimo.xml.ns.security12.DefaultPrincipalType
005 *
006 * Automatically generated - do not modify.
007 */
008 package org.apache.geronimo.xml.ns.security12.impl;
009 /**
010 * An XML default-principalType(@http://geronimo.apache.org/xml/ns/security-1.2).
011 *
012 * This is a complex type.
013 */
014 public class DefaultPrincipalTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.xml.ns.security12.DefaultPrincipalType
015 {
016
017 public DefaultPrincipalTypeImpl(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 PRINCIPAL$2 =
025 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/security-1.2", "principal");
026 private static final javax.xml.namespace.QName LOGINDOMAINPRINCIPAL$4 =
027 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/security-1.2", "login-domain-principal");
028 private static final javax.xml.namespace.QName REALMPRINCIPAL$6 =
029 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/security-1.2", "realm-principal");
030 private static final javax.xml.namespace.QName NAMEDUSERNAMEPASSWORDCREDENTIAL$8 =
031 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/security-1.2", "named-username-password-credential");
032
033
034 /**
035 * Gets array of all "description" elements
036 */
037 public org.apache.geronimo.xml.ns.security12.DescriptionType[] getDescriptionArray()
038 {
039 synchronized (monitor())
040 {
041 check_orphaned();
042 java.util.List targetList = new java.util.ArrayList();
043 get_store().find_all_element_users(DESCRIPTION$0, targetList);
044 org.apache.geronimo.xml.ns.security12.DescriptionType[] result = new org.apache.geronimo.xml.ns.security12.DescriptionType[targetList.size()];
045 targetList.toArray(result);
046 return result;
047 }
048 }
049
050 /**
051 * Gets ith "description" element
052 */
053 public org.apache.geronimo.xml.ns.security12.DescriptionType getDescriptionArray(int i)
054 {
055 synchronized (monitor())
056 {
057 check_orphaned();
058 org.apache.geronimo.xml.ns.security12.DescriptionType target = null;
059 target = (org.apache.geronimo.xml.ns.security12.DescriptionType)get_store().find_element_user(DESCRIPTION$0, i);
060 if (target == null)
061 {
062 throw new IndexOutOfBoundsException();
063 }
064 return target;
065 }
066 }
067
068 /**
069 * Returns number of "description" element
070 */
071 public int sizeOfDescriptionArray()
072 {
073 synchronized (monitor())
074 {
075 check_orphaned();
076 return get_store().count_elements(DESCRIPTION$0);
077 }
078 }
079
080 /**
081 * Sets array of all "description" element
082 */
083 public void setDescriptionArray(org.apache.geronimo.xml.ns.security12.DescriptionType[] descriptionArray)
084 {
085 synchronized (monitor())
086 {
087 check_orphaned();
088 arraySetterHelper(descriptionArray, DESCRIPTION$0);
089 }
090 }
091
092 /**
093 * Sets ith "description" element
094 */
095 public void setDescriptionArray(int i, org.apache.geronimo.xml.ns.security12.DescriptionType description)
096 {
097 synchronized (monitor())
098 {
099 check_orphaned();
100 org.apache.geronimo.xml.ns.security12.DescriptionType target = null;
101 target = (org.apache.geronimo.xml.ns.security12.DescriptionType)get_store().find_element_user(DESCRIPTION$0, i);
102 if (target == null)
103 {
104 throw new IndexOutOfBoundsException();
105 }
106 target.set(description);
107 }
108 }
109
110 /**
111 * Inserts and returns a new empty value (as xml) as the ith "description" element
112 */
113 public org.apache.geronimo.xml.ns.security12.DescriptionType insertNewDescription(int i)
114 {
115 synchronized (monitor())
116 {
117 check_orphaned();
118 org.apache.geronimo.xml.ns.security12.DescriptionType target = null;
119 target = (org.apache.geronimo.xml.ns.security12.DescriptionType)get_store().insert_element_user(DESCRIPTION$0, i);
120 return target;
121 }
122 }
123
124 /**
125 * Appends and returns a new empty value (as xml) as the last "description" element
126 */
127 public org.apache.geronimo.xml.ns.security12.DescriptionType addNewDescription()
128 {
129 synchronized (monitor())
130 {
131 check_orphaned();
132 org.apache.geronimo.xml.ns.security12.DescriptionType target = null;
133 target = (org.apache.geronimo.xml.ns.security12.DescriptionType)get_store().add_element_user(DESCRIPTION$0);
134 return target;
135 }
136 }
137
138 /**
139 * Removes the ith "description" element
140 */
141 public void removeDescription(int i)
142 {
143 synchronized (monitor())
144 {
145 check_orphaned();
146 get_store().remove_element(DESCRIPTION$0, i);
147 }
148 }
149
150 /**
151 * Gets the "principal" element
152 */
153 public org.apache.geronimo.xml.ns.security12.PrincipalType getPrincipal()
154 {
155 synchronized (monitor())
156 {
157 check_orphaned();
158 org.apache.geronimo.xml.ns.security12.PrincipalType target = null;
159 target = (org.apache.geronimo.xml.ns.security12.PrincipalType)get_store().find_element_user(PRINCIPAL$2, 0);
160 if (target == null)
161 {
162 return null;
163 }
164 return target;
165 }
166 }
167
168 /**
169 * True if has "principal" element
170 */
171 public boolean isSetPrincipal()
172 {
173 synchronized (monitor())
174 {
175 check_orphaned();
176 return get_store().count_elements(PRINCIPAL$2) != 0;
177 }
178 }
179
180 /**
181 * Sets the "principal" element
182 */
183 public void setPrincipal(org.apache.geronimo.xml.ns.security12.PrincipalType principal)
184 {
185 synchronized (monitor())
186 {
187 check_orphaned();
188 org.apache.geronimo.xml.ns.security12.PrincipalType target = null;
189 target = (org.apache.geronimo.xml.ns.security12.PrincipalType)get_store().find_element_user(PRINCIPAL$2, 0);
190 if (target == null)
191 {
192 target = (org.apache.geronimo.xml.ns.security12.PrincipalType)get_store().add_element_user(PRINCIPAL$2);
193 }
194 target.set(principal);
195 }
196 }
197
198 /**
199 * Appends and returns a new empty "principal" element
200 */
201 public org.apache.geronimo.xml.ns.security12.PrincipalType addNewPrincipal()
202 {
203 synchronized (monitor())
204 {
205 check_orphaned();
206 org.apache.geronimo.xml.ns.security12.PrincipalType target = null;
207 target = (org.apache.geronimo.xml.ns.security12.PrincipalType)get_store().add_element_user(PRINCIPAL$2);
208 return target;
209 }
210 }
211
212 /**
213 * Unsets the "principal" element
214 */
215 public void unsetPrincipal()
216 {
217 synchronized (monitor())
218 {
219 check_orphaned();
220 get_store().remove_element(PRINCIPAL$2, 0);
221 }
222 }
223
224 /**
225 * Gets the "login-domain-principal" element
226 */
227 public org.apache.geronimo.xml.ns.security12.LoginDomainPrincipalType getLoginDomainPrincipal()
228 {
229 synchronized (monitor())
230 {
231 check_orphaned();
232 org.apache.geronimo.xml.ns.security12.LoginDomainPrincipalType target = null;
233 target = (org.apache.geronimo.xml.ns.security12.LoginDomainPrincipalType)get_store().find_element_user(LOGINDOMAINPRINCIPAL$4, 0);
234 if (target == null)
235 {
236 return null;
237 }
238 return target;
239 }
240 }
241
242 /**
243 * True if has "login-domain-principal" element
244 */
245 public boolean isSetLoginDomainPrincipal()
246 {
247 synchronized (monitor())
248 {
249 check_orphaned();
250 return get_store().count_elements(LOGINDOMAINPRINCIPAL$4) != 0;
251 }
252 }
253
254 /**
255 * Sets the "login-domain-principal" element
256 */
257 public void setLoginDomainPrincipal(org.apache.geronimo.xml.ns.security12.LoginDomainPrincipalType loginDomainPrincipal)
258 {
259 synchronized (monitor())
260 {
261 check_orphaned();
262 org.apache.geronimo.xml.ns.security12.LoginDomainPrincipalType target = null;
263 target = (org.apache.geronimo.xml.ns.security12.LoginDomainPrincipalType)get_store().find_element_user(LOGINDOMAINPRINCIPAL$4, 0);
264 if (target == null)
265 {
266 target = (org.apache.geronimo.xml.ns.security12.LoginDomainPrincipalType)get_store().add_element_user(LOGINDOMAINPRINCIPAL$4);
267 }
268 target.set(loginDomainPrincipal);
269 }
270 }
271
272 /**
273 * Appends and returns a new empty "login-domain-principal" element
274 */
275 public org.apache.geronimo.xml.ns.security12.LoginDomainPrincipalType addNewLoginDomainPrincipal()
276 {
277 synchronized (monitor())
278 {
279 check_orphaned();
280 org.apache.geronimo.xml.ns.security12.LoginDomainPrincipalType target = null;
281 target = (org.apache.geronimo.xml.ns.security12.LoginDomainPrincipalType)get_store().add_element_user(LOGINDOMAINPRINCIPAL$4);
282 return target;
283 }
284 }
285
286 /**
287 * Unsets the "login-domain-principal" element
288 */
289 public void unsetLoginDomainPrincipal()
290 {
291 synchronized (monitor())
292 {
293 check_orphaned();
294 get_store().remove_element(LOGINDOMAINPRINCIPAL$4, 0);
295 }
296 }
297
298 /**
299 * Gets the "realm-principal" element
300 */
301 public org.apache.geronimo.xml.ns.security12.RealmPrincipalType getRealmPrincipal()
302 {
303 synchronized (monitor())
304 {
305 check_orphaned();
306 org.apache.geronimo.xml.ns.security12.RealmPrincipalType target = null;
307 target = (org.apache.geronimo.xml.ns.security12.RealmPrincipalType)get_store().find_element_user(REALMPRINCIPAL$6, 0);
308 if (target == null)
309 {
310 return null;
311 }
312 return target;
313 }
314 }
315
316 /**
317 * True if has "realm-principal" element
318 */
319 public boolean isSetRealmPrincipal()
320 {
321 synchronized (monitor())
322 {
323 check_orphaned();
324 return get_store().count_elements(REALMPRINCIPAL$6) != 0;
325 }
326 }
327
328 /**
329 * Sets the "realm-principal" element
330 */
331 public void setRealmPrincipal(org.apache.geronimo.xml.ns.security12.RealmPrincipalType realmPrincipal)
332 {
333 synchronized (monitor())
334 {
335 check_orphaned();
336 org.apache.geronimo.xml.ns.security12.RealmPrincipalType target = null;
337 target = (org.apache.geronimo.xml.ns.security12.RealmPrincipalType)get_store().find_element_user(REALMPRINCIPAL$6, 0);
338 if (target == null)
339 {
340 target = (org.apache.geronimo.xml.ns.security12.RealmPrincipalType)get_store().add_element_user(REALMPRINCIPAL$6);
341 }
342 target.set(realmPrincipal);
343 }
344 }
345
346 /**
347 * Appends and returns a new empty "realm-principal" element
348 */
349 public org.apache.geronimo.xml.ns.security12.RealmPrincipalType addNewRealmPrincipal()
350 {
351 synchronized (monitor())
352 {
353 check_orphaned();
354 org.apache.geronimo.xml.ns.security12.RealmPrincipalType target = null;
355 target = (org.apache.geronimo.xml.ns.security12.RealmPrincipalType)get_store().add_element_user(REALMPRINCIPAL$6);
356 return target;
357 }
358 }
359
360 /**
361 * Unsets the "realm-principal" element
362 */
363 public void unsetRealmPrincipal()
364 {
365 synchronized (monitor())
366 {
367 check_orphaned();
368 get_store().remove_element(REALMPRINCIPAL$6, 0);
369 }
370 }
371
372 /**
373 * Gets array of all "named-username-password-credential" elements
374 */
375 public org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType[] getNamedUsernamePasswordCredentialArray()
376 {
377 synchronized (monitor())
378 {
379 check_orphaned();
380 java.util.List targetList = new java.util.ArrayList();
381 get_store().find_all_element_users(NAMEDUSERNAMEPASSWORDCREDENTIAL$8, targetList);
382 org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType[] result = new org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType[targetList.size()];
383 targetList.toArray(result);
384 return result;
385 }
386 }
387
388 /**
389 * Gets ith "named-username-password-credential" element
390 */
391 public org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType getNamedUsernamePasswordCredentialArray(int i)
392 {
393 synchronized (monitor())
394 {
395 check_orphaned();
396 org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType target = null;
397 target = (org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType)get_store().find_element_user(NAMEDUSERNAMEPASSWORDCREDENTIAL$8, i);
398 if (target == null)
399 {
400 throw new IndexOutOfBoundsException();
401 }
402 return target;
403 }
404 }
405
406 /**
407 * Returns number of "named-username-password-credential" element
408 */
409 public int sizeOfNamedUsernamePasswordCredentialArray()
410 {
411 synchronized (monitor())
412 {
413 check_orphaned();
414 return get_store().count_elements(NAMEDUSERNAMEPASSWORDCREDENTIAL$8);
415 }
416 }
417
418 /**
419 * Sets array of all "named-username-password-credential" element
420 */
421 public void setNamedUsernamePasswordCredentialArray(org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType[] namedUsernamePasswordCredentialArray)
422 {
423 synchronized (monitor())
424 {
425 check_orphaned();
426 arraySetterHelper(namedUsernamePasswordCredentialArray, NAMEDUSERNAMEPASSWORDCREDENTIAL$8);
427 }
428 }
429
430 /**
431 * Sets ith "named-username-password-credential" element
432 */
433 public void setNamedUsernamePasswordCredentialArray(int i, org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType namedUsernamePasswordCredential)
434 {
435 synchronized (monitor())
436 {
437 check_orphaned();
438 org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType target = null;
439 target = (org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType)get_store().find_element_user(NAMEDUSERNAMEPASSWORDCREDENTIAL$8, i);
440 if (target == null)
441 {
442 throw new IndexOutOfBoundsException();
443 }
444 target.set(namedUsernamePasswordCredential);
445 }
446 }
447
448 /**
449 * Inserts and returns a new empty value (as xml) as the ith "named-username-password-credential" element
450 */
451 public org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType insertNewNamedUsernamePasswordCredential(int i)
452 {
453 synchronized (monitor())
454 {
455 check_orphaned();
456 org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType target = null;
457 target = (org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType)get_store().insert_element_user(NAMEDUSERNAMEPASSWORDCREDENTIAL$8, i);
458 return target;
459 }
460 }
461
462 /**
463 * Appends and returns a new empty value (as xml) as the last "named-username-password-credential" element
464 */
465 public org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType addNewNamedUsernamePasswordCredential()
466 {
467 synchronized (monitor())
468 {
469 check_orphaned();
470 org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType target = null;
471 target = (org.apache.geronimo.xml.ns.security12.NamedUsernamePasswordCredentialType)get_store().add_element_user(NAMEDUSERNAMEPASSWORDCREDENTIAL$8);
472 return target;
473 }
474 }
475
476 /**
477 * Removes the ith "named-username-password-credential" element
478 */
479 public void removeNamedUsernamePasswordCredential(int i)
480 {
481 synchronized (monitor())
482 {
483 check_orphaned();
484 get_store().remove_element(NAMEDUSERNAMEPASSWORDCREDENTIAL$8, i);
485 }
486 }
487 }