001 /* 002 * XML Type: securityType 003 * Namespace: http://geronimo.apache.org/xml/ns/security-2.0 004 * Java type: org.apache.geronimo.xbeans.geronimo.security.GerSecurityType 005 * 006 * Automatically generated - do not modify. 007 */ 008 package org.apache.geronimo.xbeans.geronimo.security.impl; 009 /** 010 * An XML securityType(@http://geronimo.apache.org/xml/ns/security-2.0). 011 * 012 * This is a complex type. 013 */ 014 public class GerSecurityTypeImpl extends org.apache.geronimo.xbeans.geronimo.j2ee.impl.GerAbstractSecurityTypeImpl implements org.apache.geronimo.xbeans.geronimo.security.GerSecurityType 015 { 016 017 public GerSecurityTypeImpl(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-2.0", "description"); 024 private static final javax.xml.namespace.QName CREDENTIALSTOREREF$2 = 025 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/security-2.0", "credential-store-ref"); 026 private static final javax.xml.namespace.QName DEFAULTSUBJECT$4 = 027 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/security-2.0", "default-subject"); 028 private static final javax.xml.namespace.QName ROLEMAPPINGS$6 = 029 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/security-2.0", "role-mappings"); 030 private static final javax.xml.namespace.QName DOASCURRENTCALLER$8 = 031 new javax.xml.namespace.QName("", "doas-current-caller"); 032 private static final javax.xml.namespace.QName USECONTEXTHANDLER$10 = 033 new javax.xml.namespace.QName("", "use-context-handler"); 034 private static final javax.xml.namespace.QName DEFAULTROLE$12 = 035 new javax.xml.namespace.QName("", "default-role"); 036 037 038 /** 039 * Gets array of all "description" elements 040 */ 041 public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] getDescriptionArray() 042 { 043 synchronized (monitor()) 044 { 045 check_orphaned(); 046 java.util.List targetList = new java.util.ArrayList(); 047 get_store().find_all_element_users(DESCRIPTION$0, targetList); 048 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] result = new org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[targetList.size()]; 049 targetList.toArray(result); 050 return result; 051 } 052 } 053 054 /** 055 * Gets ith "description" element 056 */ 057 public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType getDescriptionArray(int i) 058 { 059 synchronized (monitor()) 060 { 061 check_orphaned(); 062 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null; 063 target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().find_element_user(DESCRIPTION$0, i); 064 if (target == null) 065 { 066 throw new IndexOutOfBoundsException(); 067 } 068 return target; 069 } 070 } 071 072 /** 073 * Returns number of "description" element 074 */ 075 public int sizeOfDescriptionArray() 076 { 077 synchronized (monitor()) 078 { 079 check_orphaned(); 080 return get_store().count_elements(DESCRIPTION$0); 081 } 082 } 083 084 /** 085 * Sets array of all "description" element 086 */ 087 public void setDescriptionArray(org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] descriptionArray) 088 { 089 synchronized (monitor()) 090 { 091 check_orphaned(); 092 arraySetterHelper(descriptionArray, DESCRIPTION$0); 093 } 094 } 095 096 /** 097 * Sets ith "description" element 098 */ 099 public void setDescriptionArray(int i, org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType description) 100 { 101 synchronized (monitor()) 102 { 103 check_orphaned(); 104 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null; 105 target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().find_element_user(DESCRIPTION$0, i); 106 if (target == null) 107 { 108 throw new IndexOutOfBoundsException(); 109 } 110 target.set(description); 111 } 112 } 113 114 /** 115 * Inserts and returns a new empty value (as xml) as the ith "description" element 116 */ 117 public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType insertNewDescription(int i) 118 { 119 synchronized (monitor()) 120 { 121 check_orphaned(); 122 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null; 123 target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().insert_element_user(DESCRIPTION$0, i); 124 return target; 125 } 126 } 127 128 /** 129 * Appends and returns a new empty value (as xml) as the last "description" element 130 */ 131 public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType addNewDescription() 132 { 133 synchronized (monitor()) 134 { 135 check_orphaned(); 136 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null; 137 target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().add_element_user(DESCRIPTION$0); 138 return target; 139 } 140 } 141 142 /** 143 * Removes the ith "description" element 144 */ 145 public void removeDescription(int i) 146 { 147 synchronized (monitor()) 148 { 149 check_orphaned(); 150 get_store().remove_element(DESCRIPTION$0, i); 151 } 152 } 153 154 /** 155 * Gets the "credential-store-ref" element 156 */ 157 public org.apache.geronimo.deployment.xbeans.PatternType getCredentialStoreRef() 158 { 159 synchronized (monitor()) 160 { 161 check_orphaned(); 162 org.apache.geronimo.deployment.xbeans.PatternType target = null; 163 target = (org.apache.geronimo.deployment.xbeans.PatternType)get_store().find_element_user(CREDENTIALSTOREREF$2, 0); 164 if (target == null) 165 { 166 return null; 167 } 168 return target; 169 } 170 } 171 172 /** 173 * True if has "credential-store-ref" element 174 */ 175 public boolean isSetCredentialStoreRef() 176 { 177 synchronized (monitor()) 178 { 179 check_orphaned(); 180 return get_store().count_elements(CREDENTIALSTOREREF$2) != 0; 181 } 182 } 183 184 /** 185 * Sets the "credential-store-ref" element 186 */ 187 public void setCredentialStoreRef(org.apache.geronimo.deployment.xbeans.PatternType credentialStoreRef) 188 { 189 synchronized (monitor()) 190 { 191 check_orphaned(); 192 org.apache.geronimo.deployment.xbeans.PatternType target = null; 193 target = (org.apache.geronimo.deployment.xbeans.PatternType)get_store().find_element_user(CREDENTIALSTOREREF$2, 0); 194 if (target == null) 195 { 196 target = (org.apache.geronimo.deployment.xbeans.PatternType)get_store().add_element_user(CREDENTIALSTOREREF$2); 197 } 198 target.set(credentialStoreRef); 199 } 200 } 201 202 /** 203 * Appends and returns a new empty "credential-store-ref" element 204 */ 205 public org.apache.geronimo.deployment.xbeans.PatternType addNewCredentialStoreRef() 206 { 207 synchronized (monitor()) 208 { 209 check_orphaned(); 210 org.apache.geronimo.deployment.xbeans.PatternType target = null; 211 target = (org.apache.geronimo.deployment.xbeans.PatternType)get_store().add_element_user(CREDENTIALSTOREREF$2); 212 return target; 213 } 214 } 215 216 /** 217 * Unsets the "credential-store-ref" element 218 */ 219 public void unsetCredentialStoreRef() 220 { 221 synchronized (monitor()) 222 { 223 check_orphaned(); 224 get_store().remove_element(CREDENTIALSTOREREF$2, 0); 225 } 226 } 227 228 /** 229 * Gets the "default-subject" element 230 */ 231 public org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType getDefaultSubject() 232 { 233 synchronized (monitor()) 234 { 235 check_orphaned(); 236 org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType target = null; 237 target = (org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType)get_store().find_element_user(DEFAULTSUBJECT$4, 0); 238 if (target == null) 239 { 240 return null; 241 } 242 return target; 243 } 244 } 245 246 /** 247 * True if has "default-subject" element 248 */ 249 public boolean isSetDefaultSubject() 250 { 251 synchronized (monitor()) 252 { 253 check_orphaned(); 254 return get_store().count_elements(DEFAULTSUBJECT$4) != 0; 255 } 256 } 257 258 /** 259 * Sets the "default-subject" element 260 */ 261 public void setDefaultSubject(org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType defaultSubject) 262 { 263 synchronized (monitor()) 264 { 265 check_orphaned(); 266 org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType target = null; 267 target = (org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType)get_store().find_element_user(DEFAULTSUBJECT$4, 0); 268 if (target == null) 269 { 270 target = (org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType)get_store().add_element_user(DEFAULTSUBJECT$4); 271 } 272 target.set(defaultSubject); 273 } 274 } 275 276 /** 277 * Appends and returns a new empty "default-subject" element 278 */ 279 public org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType addNewDefaultSubject() 280 { 281 synchronized (monitor()) 282 { 283 check_orphaned(); 284 org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType target = null; 285 target = (org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType)get_store().add_element_user(DEFAULTSUBJECT$4); 286 return target; 287 } 288 } 289 290 /** 291 * Unsets the "default-subject" element 292 */ 293 public void unsetDefaultSubject() 294 { 295 synchronized (monitor()) 296 { 297 check_orphaned(); 298 get_store().remove_element(DEFAULTSUBJECT$4, 0); 299 } 300 } 301 302 /** 303 * Gets the "role-mappings" element 304 */ 305 public org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType getRoleMappings() 306 { 307 synchronized (monitor()) 308 { 309 check_orphaned(); 310 org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType target = null; 311 target = (org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType)get_store().find_element_user(ROLEMAPPINGS$6, 0); 312 if (target == null) 313 { 314 return null; 315 } 316 return target; 317 } 318 } 319 320 /** 321 * True if has "role-mappings" element 322 */ 323 public boolean isSetRoleMappings() 324 { 325 synchronized (monitor()) 326 { 327 check_orphaned(); 328 return get_store().count_elements(ROLEMAPPINGS$6) != 0; 329 } 330 } 331 332 /** 333 * Sets the "role-mappings" element 334 */ 335 public void setRoleMappings(org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType roleMappings) 336 { 337 synchronized (monitor()) 338 { 339 check_orphaned(); 340 org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType target = null; 341 target = (org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType)get_store().find_element_user(ROLEMAPPINGS$6, 0); 342 if (target == null) 343 { 344 target = (org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType)get_store().add_element_user(ROLEMAPPINGS$6); 345 } 346 target.set(roleMappings); 347 } 348 } 349 350 /** 351 * Appends and returns a new empty "role-mappings" element 352 */ 353 public org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType addNewRoleMappings() 354 { 355 synchronized (monitor()) 356 { 357 check_orphaned(); 358 org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType target = null; 359 target = (org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType)get_store().add_element_user(ROLEMAPPINGS$6); 360 return target; 361 } 362 } 363 364 /** 365 * Unsets the "role-mappings" element 366 */ 367 public void unsetRoleMappings() 368 { 369 synchronized (monitor()) 370 { 371 check_orphaned(); 372 get_store().remove_element(ROLEMAPPINGS$6, 0); 373 } 374 } 375 376 /** 377 * Gets the "doas-current-caller" attribute 378 */ 379 public boolean getDoasCurrentCaller() 380 { 381 synchronized (monitor()) 382 { 383 check_orphaned(); 384 org.apache.xmlbeans.SimpleValue target = null; 385 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DOASCURRENTCALLER$8); 386 if (target == null) 387 { 388 target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(DOASCURRENTCALLER$8); 389 } 390 if (target == null) 391 { 392 return false; 393 } 394 return target.getBooleanValue(); 395 } 396 } 397 398 /** 399 * Gets (as xml) the "doas-current-caller" attribute 400 */ 401 public org.apache.xmlbeans.XmlBoolean xgetDoasCurrentCaller() 402 { 403 synchronized (monitor()) 404 { 405 check_orphaned(); 406 org.apache.xmlbeans.XmlBoolean target = null; 407 target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(DOASCURRENTCALLER$8); 408 if (target == null) 409 { 410 target = (org.apache.xmlbeans.XmlBoolean)get_default_attribute_value(DOASCURRENTCALLER$8); 411 } 412 return target; 413 } 414 } 415 416 /** 417 * True if has "doas-current-caller" attribute 418 */ 419 public boolean isSetDoasCurrentCaller() 420 { 421 synchronized (monitor()) 422 { 423 check_orphaned(); 424 return get_store().find_attribute_user(DOASCURRENTCALLER$8) != null; 425 } 426 } 427 428 /** 429 * Sets the "doas-current-caller" attribute 430 */ 431 public void setDoasCurrentCaller(boolean doasCurrentCaller) 432 { 433 synchronized (monitor()) 434 { 435 check_orphaned(); 436 org.apache.xmlbeans.SimpleValue target = null; 437 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DOASCURRENTCALLER$8); 438 if (target == null) 439 { 440 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DOASCURRENTCALLER$8); 441 } 442 target.setBooleanValue(doasCurrentCaller); 443 } 444 } 445 446 /** 447 * Sets (as xml) the "doas-current-caller" attribute 448 */ 449 public void xsetDoasCurrentCaller(org.apache.xmlbeans.XmlBoolean doasCurrentCaller) 450 { 451 synchronized (monitor()) 452 { 453 check_orphaned(); 454 org.apache.xmlbeans.XmlBoolean target = null; 455 target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(DOASCURRENTCALLER$8); 456 if (target == null) 457 { 458 target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(DOASCURRENTCALLER$8); 459 } 460 target.set(doasCurrentCaller); 461 } 462 } 463 464 /** 465 * Unsets the "doas-current-caller" attribute 466 */ 467 public void unsetDoasCurrentCaller() 468 { 469 synchronized (monitor()) 470 { 471 check_orphaned(); 472 get_store().remove_attribute(DOASCURRENTCALLER$8); 473 } 474 } 475 476 /** 477 * Gets the "use-context-handler" attribute 478 */ 479 public boolean getUseContextHandler() 480 { 481 synchronized (monitor()) 482 { 483 check_orphaned(); 484 org.apache.xmlbeans.SimpleValue target = null; 485 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(USECONTEXTHANDLER$10); 486 if (target == null) 487 { 488 target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(USECONTEXTHANDLER$10); 489 } 490 if (target == null) 491 { 492 return false; 493 } 494 return target.getBooleanValue(); 495 } 496 } 497 498 /** 499 * Gets (as xml) the "use-context-handler" attribute 500 */ 501 public org.apache.xmlbeans.XmlBoolean xgetUseContextHandler() 502 { 503 synchronized (monitor()) 504 { 505 check_orphaned(); 506 org.apache.xmlbeans.XmlBoolean target = null; 507 target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(USECONTEXTHANDLER$10); 508 if (target == null) 509 { 510 target = (org.apache.xmlbeans.XmlBoolean)get_default_attribute_value(USECONTEXTHANDLER$10); 511 } 512 return target; 513 } 514 } 515 516 /** 517 * True if has "use-context-handler" attribute 518 */ 519 public boolean isSetUseContextHandler() 520 { 521 synchronized (monitor()) 522 { 523 check_orphaned(); 524 return get_store().find_attribute_user(USECONTEXTHANDLER$10) != null; 525 } 526 } 527 528 /** 529 * Sets the "use-context-handler" attribute 530 */ 531 public void setUseContextHandler(boolean useContextHandler) 532 { 533 synchronized (monitor()) 534 { 535 check_orphaned(); 536 org.apache.xmlbeans.SimpleValue target = null; 537 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(USECONTEXTHANDLER$10); 538 if (target == null) 539 { 540 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(USECONTEXTHANDLER$10); 541 } 542 target.setBooleanValue(useContextHandler); 543 } 544 } 545 546 /** 547 * Sets (as xml) the "use-context-handler" attribute 548 */ 549 public void xsetUseContextHandler(org.apache.xmlbeans.XmlBoolean useContextHandler) 550 { 551 synchronized (monitor()) 552 { 553 check_orphaned(); 554 org.apache.xmlbeans.XmlBoolean target = null; 555 target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(USECONTEXTHANDLER$10); 556 if (target == null) 557 { 558 target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(USECONTEXTHANDLER$10); 559 } 560 target.set(useContextHandler); 561 } 562 } 563 564 /** 565 * Unsets the "use-context-handler" attribute 566 */ 567 public void unsetUseContextHandler() 568 { 569 synchronized (monitor()) 570 { 571 check_orphaned(); 572 get_store().remove_attribute(USECONTEXTHANDLER$10); 573 } 574 } 575 576 /** 577 * Gets the "default-role" attribute 578 */ 579 public java.lang.String getDefaultRole() 580 { 581 synchronized (monitor()) 582 { 583 check_orphaned(); 584 org.apache.xmlbeans.SimpleValue target = null; 585 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DEFAULTROLE$12); 586 if (target == null) 587 { 588 return null; 589 } 590 return target.getStringValue(); 591 } 592 } 593 594 /** 595 * Gets (as xml) the "default-role" attribute 596 */ 597 public org.apache.xmlbeans.XmlString xgetDefaultRole() 598 { 599 synchronized (monitor()) 600 { 601 check_orphaned(); 602 org.apache.xmlbeans.XmlString target = null; 603 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(DEFAULTROLE$12); 604 return target; 605 } 606 } 607 608 /** 609 * True if has "default-role" attribute 610 */ 611 public boolean isSetDefaultRole() 612 { 613 synchronized (monitor()) 614 { 615 check_orphaned(); 616 return get_store().find_attribute_user(DEFAULTROLE$12) != null; 617 } 618 } 619 620 /** 621 * Sets the "default-role" attribute 622 */ 623 public void setDefaultRole(java.lang.String defaultRole) 624 { 625 synchronized (monitor()) 626 { 627 check_orphaned(); 628 org.apache.xmlbeans.SimpleValue target = null; 629 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DEFAULTROLE$12); 630 if (target == null) 631 { 632 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DEFAULTROLE$12); 633 } 634 target.setStringValue(defaultRole); 635 } 636 } 637 638 /** 639 * Sets (as xml) the "default-role" attribute 640 */ 641 public void xsetDefaultRole(org.apache.xmlbeans.XmlString defaultRole) 642 { 643 synchronized (monitor()) 644 { 645 check_orphaned(); 646 org.apache.xmlbeans.XmlString target = null; 647 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(DEFAULTROLE$12); 648 if (target == null) 649 { 650 target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(DEFAULTROLE$12); 651 } 652 target.set(defaultRole); 653 } 654 } 655 656 /** 657 * Unsets the "default-role" attribute 658 */ 659 public void unsetDefaultRole() 660 { 661 synchronized (monitor()) 662 { 663 check_orphaned(); 664 get_store().remove_attribute(DEFAULTROLE$12); 665 } 666 } 667 }