001 /* 002 * XML Type: securityType 003 * Namespace: http://geronimo.apache.org/xml/ns/security-1.2 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-1.2). 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-1.2", "description"); 024 private static final javax.xml.namespace.QName DEFAULTPRINCIPAL$2 = 025 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/security-1.2", "default-principal"); 026 private static final javax.xml.namespace.QName ROLEMAPPINGS$4 = 027 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/security-1.2", "role-mappings"); 028 private static final javax.xml.namespace.QName DOASCURRENTCALLER$6 = 029 new javax.xml.namespace.QName("", "doas-current-caller"); 030 private static final javax.xml.namespace.QName USECONTEXTHANDLER$8 = 031 new javax.xml.namespace.QName("", "use-context-handler"); 032 private static final javax.xml.namespace.QName DEFAULTROLE$10 = 033 new javax.xml.namespace.QName("", "default-role"); 034 035 036 /** 037 * Gets array of all "description" elements 038 */ 039 public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] getDescriptionArray() 040 { 041 synchronized (monitor()) 042 { 043 check_orphaned(); 044 java.util.List targetList = new java.util.ArrayList(); 045 get_store().find_all_element_users(DESCRIPTION$0, targetList); 046 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] result = new org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[targetList.size()]; 047 targetList.toArray(result); 048 return result; 049 } 050 } 051 052 /** 053 * Gets ith "description" element 054 */ 055 public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType getDescriptionArray(int i) 056 { 057 synchronized (monitor()) 058 { 059 check_orphaned(); 060 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null; 061 target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().find_element_user(DESCRIPTION$0, i); 062 if (target == null) 063 { 064 throw new IndexOutOfBoundsException(); 065 } 066 return target; 067 } 068 } 069 070 /** 071 * Returns number of "description" element 072 */ 073 public int sizeOfDescriptionArray() 074 { 075 synchronized (monitor()) 076 { 077 check_orphaned(); 078 return get_store().count_elements(DESCRIPTION$0); 079 } 080 } 081 082 /** 083 * Sets array of all "description" element 084 */ 085 public void setDescriptionArray(org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] descriptionArray) 086 { 087 synchronized (monitor()) 088 { 089 check_orphaned(); 090 arraySetterHelper(descriptionArray, DESCRIPTION$0); 091 } 092 } 093 094 /** 095 * Sets ith "description" element 096 */ 097 public void setDescriptionArray(int i, org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType description) 098 { 099 synchronized (monitor()) 100 { 101 check_orphaned(); 102 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null; 103 target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().find_element_user(DESCRIPTION$0, i); 104 if (target == null) 105 { 106 throw new IndexOutOfBoundsException(); 107 } 108 target.set(description); 109 } 110 } 111 112 /** 113 * Inserts and returns a new empty value (as xml) as the ith "description" element 114 */ 115 public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType insertNewDescription(int i) 116 { 117 synchronized (monitor()) 118 { 119 check_orphaned(); 120 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null; 121 target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().insert_element_user(DESCRIPTION$0, i); 122 return target; 123 } 124 } 125 126 /** 127 * Appends and returns a new empty value (as xml) as the last "description" element 128 */ 129 public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType addNewDescription() 130 { 131 synchronized (monitor()) 132 { 133 check_orphaned(); 134 org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null; 135 target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().add_element_user(DESCRIPTION$0); 136 return target; 137 } 138 } 139 140 /** 141 * Removes the ith "description" element 142 */ 143 public void removeDescription(int i) 144 { 145 synchronized (monitor()) 146 { 147 check_orphaned(); 148 get_store().remove_element(DESCRIPTION$0, i); 149 } 150 } 151 152 /** 153 * Gets the "default-principal" element 154 */ 155 public org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType getDefaultPrincipal() 156 { 157 synchronized (monitor()) 158 { 159 check_orphaned(); 160 org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType target = null; 161 target = (org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType)get_store().find_element_user(DEFAULTPRINCIPAL$2, 0); 162 if (target == null) 163 { 164 return null; 165 } 166 return target; 167 } 168 } 169 170 /** 171 * Sets the "default-principal" element 172 */ 173 public void setDefaultPrincipal(org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType defaultPrincipal) 174 { 175 synchronized (monitor()) 176 { 177 check_orphaned(); 178 org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType target = null; 179 target = (org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType)get_store().find_element_user(DEFAULTPRINCIPAL$2, 0); 180 if (target == null) 181 { 182 target = (org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType)get_store().add_element_user(DEFAULTPRINCIPAL$2); 183 } 184 target.set(defaultPrincipal); 185 } 186 } 187 188 /** 189 * Appends and returns a new empty "default-principal" element 190 */ 191 public org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType addNewDefaultPrincipal() 192 { 193 synchronized (monitor()) 194 { 195 check_orphaned(); 196 org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType target = null; 197 target = (org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType)get_store().add_element_user(DEFAULTPRINCIPAL$2); 198 return target; 199 } 200 } 201 202 /** 203 * Gets the "role-mappings" element 204 */ 205 public org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType getRoleMappings() 206 { 207 synchronized (monitor()) 208 { 209 check_orphaned(); 210 org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType target = null; 211 target = (org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType)get_store().find_element_user(ROLEMAPPINGS$4, 0); 212 if (target == null) 213 { 214 return null; 215 } 216 return target; 217 } 218 } 219 220 /** 221 * True if has "role-mappings" element 222 */ 223 public boolean isSetRoleMappings() 224 { 225 synchronized (monitor()) 226 { 227 check_orphaned(); 228 return get_store().count_elements(ROLEMAPPINGS$4) != 0; 229 } 230 } 231 232 /** 233 * Sets the "role-mappings" element 234 */ 235 public void setRoleMappings(org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType roleMappings) 236 { 237 synchronized (monitor()) 238 { 239 check_orphaned(); 240 org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType target = null; 241 target = (org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType)get_store().find_element_user(ROLEMAPPINGS$4, 0); 242 if (target == null) 243 { 244 target = (org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType)get_store().add_element_user(ROLEMAPPINGS$4); 245 } 246 target.set(roleMappings); 247 } 248 } 249 250 /** 251 * Appends and returns a new empty "role-mappings" element 252 */ 253 public org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType addNewRoleMappings() 254 { 255 synchronized (monitor()) 256 { 257 check_orphaned(); 258 org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType target = null; 259 target = (org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType)get_store().add_element_user(ROLEMAPPINGS$4); 260 return target; 261 } 262 } 263 264 /** 265 * Unsets the "role-mappings" element 266 */ 267 public void unsetRoleMappings() 268 { 269 synchronized (monitor()) 270 { 271 check_orphaned(); 272 get_store().remove_element(ROLEMAPPINGS$4, 0); 273 } 274 } 275 276 /** 277 * Gets the "doas-current-caller" attribute 278 */ 279 public boolean getDoasCurrentCaller() 280 { 281 synchronized (monitor()) 282 { 283 check_orphaned(); 284 org.apache.xmlbeans.SimpleValue target = null; 285 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DOASCURRENTCALLER$6); 286 if (target == null) 287 { 288 target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(DOASCURRENTCALLER$6); 289 } 290 if (target == null) 291 { 292 return false; 293 } 294 return target.getBooleanValue(); 295 } 296 } 297 298 /** 299 * Gets (as xml) the "doas-current-caller" attribute 300 */ 301 public org.apache.xmlbeans.XmlBoolean xgetDoasCurrentCaller() 302 { 303 synchronized (monitor()) 304 { 305 check_orphaned(); 306 org.apache.xmlbeans.XmlBoolean target = null; 307 target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(DOASCURRENTCALLER$6); 308 if (target == null) 309 { 310 target = (org.apache.xmlbeans.XmlBoolean)get_default_attribute_value(DOASCURRENTCALLER$6); 311 } 312 return target; 313 } 314 } 315 316 /** 317 * True if has "doas-current-caller" attribute 318 */ 319 public boolean isSetDoasCurrentCaller() 320 { 321 synchronized (monitor()) 322 { 323 check_orphaned(); 324 return get_store().find_attribute_user(DOASCURRENTCALLER$6) != null; 325 } 326 } 327 328 /** 329 * Sets the "doas-current-caller" attribute 330 */ 331 public void setDoasCurrentCaller(boolean doasCurrentCaller) 332 { 333 synchronized (monitor()) 334 { 335 check_orphaned(); 336 org.apache.xmlbeans.SimpleValue target = null; 337 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DOASCURRENTCALLER$6); 338 if (target == null) 339 { 340 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DOASCURRENTCALLER$6); 341 } 342 target.setBooleanValue(doasCurrentCaller); 343 } 344 } 345 346 /** 347 * Sets (as xml) the "doas-current-caller" attribute 348 */ 349 public void xsetDoasCurrentCaller(org.apache.xmlbeans.XmlBoolean doasCurrentCaller) 350 { 351 synchronized (monitor()) 352 { 353 check_orphaned(); 354 org.apache.xmlbeans.XmlBoolean target = null; 355 target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(DOASCURRENTCALLER$6); 356 if (target == null) 357 { 358 target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(DOASCURRENTCALLER$6); 359 } 360 target.set(doasCurrentCaller); 361 } 362 } 363 364 /** 365 * Unsets the "doas-current-caller" attribute 366 */ 367 public void unsetDoasCurrentCaller() 368 { 369 synchronized (monitor()) 370 { 371 check_orphaned(); 372 get_store().remove_attribute(DOASCURRENTCALLER$6); 373 } 374 } 375 376 /** 377 * Gets the "use-context-handler" attribute 378 */ 379 public boolean getUseContextHandler() 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(USECONTEXTHANDLER$8); 386 if (target == null) 387 { 388 target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(USECONTEXTHANDLER$8); 389 } 390 if (target == null) 391 { 392 return false; 393 } 394 return target.getBooleanValue(); 395 } 396 } 397 398 /** 399 * Gets (as xml) the "use-context-handler" attribute 400 */ 401 public org.apache.xmlbeans.XmlBoolean xgetUseContextHandler() 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(USECONTEXTHANDLER$8); 408 if (target == null) 409 { 410 target = (org.apache.xmlbeans.XmlBoolean)get_default_attribute_value(USECONTEXTHANDLER$8); 411 } 412 return target; 413 } 414 } 415 416 /** 417 * True if has "use-context-handler" attribute 418 */ 419 public boolean isSetUseContextHandler() 420 { 421 synchronized (monitor()) 422 { 423 check_orphaned(); 424 return get_store().find_attribute_user(USECONTEXTHANDLER$8) != null; 425 } 426 } 427 428 /** 429 * Sets the "use-context-handler" attribute 430 */ 431 public void setUseContextHandler(boolean useContextHandler) 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(USECONTEXTHANDLER$8); 438 if (target == null) 439 { 440 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(USECONTEXTHANDLER$8); 441 } 442 target.setBooleanValue(useContextHandler); 443 } 444 } 445 446 /** 447 * Sets (as xml) the "use-context-handler" attribute 448 */ 449 public void xsetUseContextHandler(org.apache.xmlbeans.XmlBoolean useContextHandler) 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(USECONTEXTHANDLER$8); 456 if (target == null) 457 { 458 target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(USECONTEXTHANDLER$8); 459 } 460 target.set(useContextHandler); 461 } 462 } 463 464 /** 465 * Unsets the "use-context-handler" attribute 466 */ 467 public void unsetUseContextHandler() 468 { 469 synchronized (monitor()) 470 { 471 check_orphaned(); 472 get_store().remove_attribute(USECONTEXTHANDLER$8); 473 } 474 } 475 476 /** 477 * Gets the "default-role" attribute 478 */ 479 public java.lang.String getDefaultRole() 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(DEFAULTROLE$10); 486 if (target == null) 487 { 488 return null; 489 } 490 return target.getStringValue(); 491 } 492 } 493 494 /** 495 * Gets (as xml) the "default-role" attribute 496 */ 497 public org.apache.xmlbeans.XmlString xgetDefaultRole() 498 { 499 synchronized (monitor()) 500 { 501 check_orphaned(); 502 org.apache.xmlbeans.XmlString target = null; 503 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(DEFAULTROLE$10); 504 return target; 505 } 506 } 507 508 /** 509 * True if has "default-role" attribute 510 */ 511 public boolean isSetDefaultRole() 512 { 513 synchronized (monitor()) 514 { 515 check_orphaned(); 516 return get_store().find_attribute_user(DEFAULTROLE$10) != null; 517 } 518 } 519 520 /** 521 * Sets the "default-role" attribute 522 */ 523 public void setDefaultRole(java.lang.String defaultRole) 524 { 525 synchronized (monitor()) 526 { 527 check_orphaned(); 528 org.apache.xmlbeans.SimpleValue target = null; 529 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DEFAULTROLE$10); 530 if (target == null) 531 { 532 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DEFAULTROLE$10); 533 } 534 target.setStringValue(defaultRole); 535 } 536 } 537 538 /** 539 * Sets (as xml) the "default-role" attribute 540 */ 541 public void xsetDefaultRole(org.apache.xmlbeans.XmlString defaultRole) 542 { 543 synchronized (monitor()) 544 { 545 check_orphaned(); 546 org.apache.xmlbeans.XmlString target = null; 547 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(DEFAULTROLE$10); 548 if (target == null) 549 { 550 target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(DEFAULTROLE$10); 551 } 552 target.set(defaultRole); 553 } 554 } 555 556 /** 557 * Unsets the "default-role" attribute 558 */ 559 public void unsetDefaultRole() 560 { 561 synchronized (monitor()) 562 { 563 check_orphaned(); 564 get_store().remove_attribute(DEFAULTROLE$10); 565 } 566 } 567 }