001/* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2007-2009 Sun Microsystems, Inc. 025 */ 026 027package org.opends.server.admin.client; 028 029 030 031import java.util.Collection; 032import java.util.SortedSet; 033 034import org.opends.server.admin.AbstractManagedObjectDefinition; 035import org.opends.server.admin.Configuration; 036import org.opends.server.admin.PropertyException; 037import org.opends.server.admin.DefinitionDecodingException; 038import org.opends.server.admin.InstantiableRelationDefinition; 039import org.opends.server.admin.ManagedObjectAlreadyExistsException; 040import org.opends.server.admin.ManagedObjectDefinition; 041import org.opends.server.admin.ConfigurationClient; 042import org.opends.server.admin.ManagedObjectNotFoundException; 043import org.opends.server.admin.ManagedObjectPath; 044import org.opends.server.admin.OptionalRelationDefinition; 045import org.opends.server.admin.PropertyDefinition; 046import org.opends.server.admin.PropertyProvider; 047import org.opends.server.admin.SetRelationDefinition; 048import org.opends.server.admin.SingletonRelationDefinition; 049 050 051 052/** 053 * A generic interface for accessing client-side managed objects. 054 * <p> 055 * A managed object comprises of zero or more properties. A property 056 * has associated with it three sets of property value(s). These are: 057 * <ul> 058 * <li><i>default value(s)</i> - these value(s) represent the 059 * default behavior for the property when it has no active values. 060 * When a property inherits its default value(s) from elsewhere (i.e. 061 * a property in another managed object), the default value(s) 062 * represent the active value(s) of the inherited property at the time 063 * the managed object was retrieved 064 * <li><i>active value(s)</i> - these value(s) represent the state 065 * of the property at the time the managed object was retrieved 066 * <li><i>pending value(s)</i> - these value(s) represent any 067 * modifications made to the property's value(s) since the managed 068 * object object was retrieved and before the changes have been 069 * committed using the {@link #commit()} method, the pending values 070 * can be empty indicating that the property should be modified back 071 * to its default values. 072 * </ul> 073 * In addition, a property has an <i>effective state</i> defined by 074 * its <i>effective values</i> which are derived by evaluating the 075 * following rules in the order presented: 076 * <ul> 077 * <li>the <i>pending values</i> if defined and non-empty 078 * <li>or, the <i>default values</i> if the pending values are 079 * defined but are empty 080 * <li>or, the <i>active values</i> if defined and non-empty 081 * <li>or, the <i>default values</i> if there are no active values 082 * <li>or, an empty set of values, if there are no default values. 083 * </ul> 084 * 085 * @param <T> 086 * The type of client configuration represented by the client 087 * managed object. 088 */ 089public interface ManagedObject<T extends ConfigurationClient> extends 090 PropertyProvider { 091 092 /** 093 * Adds this managed object to the server or commits any changes 094 * made to it depending on whether or not the managed object already 095 * exists on the server. Pending property values will be committed 096 * to the managed object. If successful, the pending values will 097 * become active values. 098 * <p> 099 * See the class description for more information regarding pending 100 * and active values. 101 * 102 * @throws ManagedObjectAlreadyExistsException 103 * If the managed object cannot be added to the server 104 * because it already exists. 105 * @throws MissingMandatoryPropertiesException 106 * If the managed object contains some mandatory 107 * properties which have been left undefined. 108 * @throws ConcurrentModificationException 109 * If the managed object is being added to the server but 110 * its parent has been removed by another client, or if 111 * this managed object is being modified but it has been 112 * removed from the server by another client. 113 * @throws OperationRejectedException 114 * If this managed object cannot be added or modified due 115 * to some client-side or server-side constraint which 116 * cannot be satisfied. 117 * @throws AuthorizationException 118 * If the server refuses to add or modify this managed 119 * object because the client does not have the correct 120 * privileges. 121 * @throws CommunicationException 122 * If the client cannot contact the server due to an 123 * underlying communication problem. 124 */ 125 void commit() throws ManagedObjectAlreadyExistsException, 126 MissingMandatoryPropertiesException, ConcurrentModificationException, 127 OperationRejectedException, AuthorizationException, 128 CommunicationException; 129 130 131 /** 132 * Determines whether or not this managed object has been modified since it 133 * was constructed. 134 * In other words, whether or not the set of pending values differs from 135 * the set of active values. 136 * 137 * @return Returns <code>true</code> if this managed object has been 138 * modified since it was constructed. 139 */ 140 boolean isModified(); 141 142 143 /** 144 * Creates a new child managed object bound to the specified 145 * instantiable relation. The new managed object will initially not 146 * contain any property values (including mandatory properties). 147 * Once the managed object has been configured it can be added to 148 * the server using the {@link #commit()} method. 149 * 150 * @param <C> 151 * The expected type of the child managed object 152 * configuration client. 153 * @param <S> 154 * The expected type of the child managed object 155 * server configuration. 156 * @param <CC> 157 * The actual type of the added managed object 158 * configuration client. 159 * @param r 160 * The instantiable relation definition. 161 * @param d 162 * The definition of the managed object to be created. 163 * @param name 164 * The name of the child managed object. 165 * @param exceptions 166 * A collection in which to place any 167 * {@link PropertyException}s that occurred whilst 168 * attempting to determine the managed object's default 169 * values. 170 * @return Returns a new child managed object bound to the specified 171 * instantiable relation. 172 * @throws IllegalManagedObjectNameException 173 * If the name of the child managed object is invalid. 174 * @throws IllegalArgumentException 175 * If the relation definition is not associated with this 176 * managed object's definition. 177 */ 178 <C extends ConfigurationClient, S extends Configuration, CC extends C> 179 ManagedObject<CC> createChild(InstantiableRelationDefinition<C, S> r, 180 ManagedObjectDefinition<CC, ? extends S> d, String name, 181 Collection<PropertyException> exceptions) 182 throws IllegalManagedObjectNameException, IllegalArgumentException; 183 184 185 186 /** 187 * Creates a new child managed object bound to the specified 188 * optional relation. The new managed object will initially not 189 * contain any property values (including mandatory properties). 190 * Once the managed object has been configured it can be added to 191 * the server using the {@link #commit()} method. 192 * 193 * @param <C> 194 * The expected type of the child managed object 195 * configuration client. 196 * @param <S> 197 * The expected type of the child managed object 198 * server configuration. 199 * @param <CC> 200 * The actual type of the added managed object 201 * configuration client. 202 * @param r 203 * The optional relation definition. 204 * @param d 205 * The definition of the managed object to be created. 206 * @param exceptions 207 * A collection in which to place any 208 * {@link PropertyException}s that occurred whilst 209 * attempting to determine the managed object's default 210 * values. 211 * @return Returns a new child managed object bound to the specified 212 * optional relation. 213 * @throws IllegalArgumentException 214 * If the relation definition is not associated with this 215 * managed object's definition. 216 */ 217 <C extends ConfigurationClient, S extends Configuration, CC extends C> 218 ManagedObject<CC> createChild(OptionalRelationDefinition<C, S> r, 219 ManagedObjectDefinition<CC, ? extends S> d, 220 Collection<PropertyException> exceptions) 221 throws IllegalArgumentException; 222 223 224 225 /** 226 * Creates a new child managed object bound to the specified 227 * set relation. The new managed object will initially not 228 * contain any property values (including mandatory properties). 229 * Once the managed object has been configured it can be added to 230 * the server using the {@link #commit()} method. 231 * 232 * @param <C> 233 * The expected type of the child managed object 234 * configuration client. 235 * @param <S> 236 * The expected type of the child managed object 237 * server configuration. 238 * @param <CC> 239 * The actual type of the added managed object 240 * configuration client. 241 * @param r 242 * The set relation definition. 243 * @param d 244 * The definition of the managed object to be created. 245 * @param exceptions 246 * A collection in which to place any 247 * {@link PropertyException}s that occurred whilst 248 * attempting to determine the managed object's default 249 * values. 250 * @return Returns a new child managed object bound to the specified 251 * set relation. 252 * @throws IllegalArgumentException 253 * If the relation definition is not associated with this 254 * managed object's definition. 255 */ 256 <C extends ConfigurationClient, S extends Configuration, CC extends C> 257 ManagedObject<CC> createChild(SetRelationDefinition<C, S> r, 258 ManagedObjectDefinition<CC, ? extends S> d, 259 Collection<PropertyException> exceptions) 260 throws IllegalArgumentException; 261 262 263 264 /** 265 * Retrieves an instantiable child managed object. 266 * 267 * @param <C> 268 * The requested type of the child managed object 269 * configuration client. 270 * @param <S> 271 * The type of server managed object configuration that the 272 * relation definition refers to. 273 * @param r 274 * The instantiable relation definition. 275 * @param name 276 * The name of the child managed object. 277 * @return Returns the instantiable child managed object. 278 * @throws IllegalArgumentException 279 * If the relation definition is not associated with this 280 * managed object's definition. 281 * @throws DefinitionDecodingException 282 * If the managed object was found but its type could not 283 * be determined. 284 * @throws ManagedObjectDecodingException 285 * If the managed object was found but one or more of its 286 * properties could not be decoded. 287 * @throws ManagedObjectNotFoundException 288 * If the requested managed object could not be found on 289 * the server. 290 * @throws ConcurrentModificationException 291 * If this managed object has been removed from the server 292 * by another client. 293 * @throws AuthorizationException 294 * If the server refuses to retrieve the managed object 295 * because the client does not have the correct 296 * privileges. 297 * @throws CommunicationException 298 * If the client cannot contact the server due to an 299 * underlying communication problem. 300 */ 301 <C extends ConfigurationClient, S extends Configuration> 302 ManagedObject<? extends C> getChild(InstantiableRelationDefinition<C, S> r, 303 String name) throws IllegalArgumentException, DefinitionDecodingException, 304 ManagedObjectDecodingException, ManagedObjectNotFoundException, 305 ConcurrentModificationException, AuthorizationException, 306 CommunicationException; 307 308 309 310 /** 311 * Retrieves an optional child managed object. 312 * 313 * @param <C> 314 * The requested type of the child managed object 315 * configuration client. 316 * @param <S> 317 * The type of server managed object configuration that the 318 * relation definition refers to. 319 * @param r 320 * The optional relation definition. 321 * @return Returns the optional child managed object. 322 * @throws IllegalArgumentException 323 * If the relation definition is not associated with this 324 * managed object's definition. 325 * @throws DefinitionDecodingException 326 * If the managed object was found but its type could not 327 * be determined. 328 * @throws ManagedObjectDecodingException 329 * If the managed object was found but one or more of its 330 * properties could not be decoded. 331 * @throws ManagedObjectNotFoundException 332 * If the requested managed object could not be found on 333 * the server. 334 * @throws ConcurrentModificationException 335 * If this managed object has been removed from the server 336 * by another client. 337 * @throws AuthorizationException 338 * If the server refuses to retrieve the managed object 339 * because the client does not have the correct 340 * privileges. 341 * @throws CommunicationException 342 * If the client cannot contact the server due to an 343 * underlying communication problem. 344 */ 345 <C extends ConfigurationClient, S extends Configuration> 346 ManagedObject<? extends C> getChild(OptionalRelationDefinition<C, S> r) 347 throws IllegalArgumentException, DefinitionDecodingException, 348 ManagedObjectDecodingException, ManagedObjectNotFoundException, 349 ConcurrentModificationException, AuthorizationException, 350 CommunicationException; 351 352 353 354 /** 355 * Retrieves a singleton child managed object. 356 * 357 * @param <C> 358 * The requested type of the child managed object 359 * configuration client. 360 * @param <S> 361 * The type of server managed object configuration that the 362 * relation definition refers to. 363 * @param r 364 * The singleton relation definition. 365 * @return Returns the singleton child managed object. 366 * @throws IllegalArgumentException 367 * If the relation definition is not associated with this 368 * managed object's definition. 369 * @throws DefinitionDecodingException 370 * If the managed object was found but its type could not 371 * be determined. 372 * @throws ManagedObjectDecodingException 373 * If the managed object was found but one or more of its 374 * properties could not be decoded. 375 * @throws ManagedObjectNotFoundException 376 * If the requested managed object could not be found on 377 * the server. 378 * @throws ConcurrentModificationException 379 * If this managed object has been removed from the server 380 * by another client. 381 * @throws AuthorizationException 382 * If the server refuses to retrieve the managed object 383 * because the client does not have the correct 384 * privileges. 385 * @throws CommunicationException 386 * If the client cannot contact the server due to an 387 * underlying communication problem. 388 */ 389 <C extends ConfigurationClient, S extends Configuration> 390 ManagedObject<? extends C> getChild(SingletonRelationDefinition<C, S> r) 391 throws IllegalArgumentException, DefinitionDecodingException, 392 ManagedObjectDecodingException, ManagedObjectNotFoundException, 393 ConcurrentModificationException, AuthorizationException, 394 CommunicationException; 395 396 397 398 /** 399 * Retrieves a set child managed object. 400 * 401 * @param <C> 402 * The requested type of the child managed object 403 * configuration client. 404 * @param <S> 405 * The type of server managed object configuration that the 406 * relation definition refers to. 407 * @param r 408 * The set relation definition. 409 * @param name 410 * The name of the child managed object. 411 * @return Returns the set child managed object. 412 * @throws IllegalArgumentException 413 * If the relation definition is not associated with this 414 * managed object's definition. 415 * @throws DefinitionDecodingException 416 * If the managed object was found but its type could not 417 * be determined. 418 * @throws ManagedObjectDecodingException 419 * If the managed object was found but one or more of its 420 * properties could not be decoded. 421 * @throws ManagedObjectNotFoundException 422 * If the requested managed object could not be found on 423 * the server. 424 * @throws ConcurrentModificationException 425 * If this managed object has been removed from the server 426 * by another client. 427 * @throws AuthorizationException 428 * If the server refuses to retrieve the managed object 429 * because the client does not have the correct 430 * privileges. 431 * @throws CommunicationException 432 * If the client cannot contact the server due to an 433 * underlying communication problem. 434 */ 435 <C extends ConfigurationClient, S extends Configuration> 436 ManagedObject<? extends C> getChild(SetRelationDefinition<C, S> r, 437 String name) throws IllegalArgumentException, DefinitionDecodingException, 438 ManagedObjectDecodingException, ManagedObjectNotFoundException, 439 ConcurrentModificationException, AuthorizationException, 440 CommunicationException; 441 442 443 444 /** 445 * Creates a client configuration view of this managed object. 446 * Modifications made to this managed object will be reflected in 447 * the client configuration view and vice versa. 448 * 449 * @return Returns a client configuration view of this managed 450 * object. 451 */ 452 T getConfiguration(); 453 454 455 456 /** 457 * Gets the definition associated with this managed object. 458 * 459 * @return Returns the definition associated with this managed 460 * object. 461 */ 462 ManagedObjectDefinition<T, ? extends Configuration> 463 getManagedObjectDefinition(); 464 465 466 467 /** 468 * Gets the path of this managed object. 469 * 470 * @return Returns the path of this managed object. 471 */ 472 ManagedObjectPath<T, ? extends Configuration> getManagedObjectPath(); 473 474 475 476 /** 477 * Gets a mutable copy of the set of default values for the 478 * specified property. 479 * 480 * @param <PD> 481 * The type of the property to be retrieved. 482 * @param pd 483 * The property to be retrieved. 484 * @return Returns the property's default values, or an empty set if 485 * there are no default values defined. 486 * @throws IllegalArgumentException 487 * If the property definition is not associated with this 488 * managed object's definition. 489 */ 490 <PD> SortedSet<PD> getPropertyDefaultValues(PropertyDefinition<PD> pd) 491 throws IllegalArgumentException; 492 493 494 495 /** 496 * Gets the effective value of the specified property. 497 * <p> 498 * See the class description for more information about how the 499 * effective property value is derived. 500 * 501 * @param <PD> 502 * The type of the property to be retrieved. 503 * @param pd 504 * The property to be retrieved. 505 * @return Returns the property's effective value, or 506 * <code>null</code> if there is no effective value 507 * defined. 508 * @throws IllegalArgumentException 509 * If the property definition is not associated with this 510 * managed object's definition. 511 */ 512 <PD> PD getPropertyValue(PropertyDefinition<PD> pd) 513 throws IllegalArgumentException; 514 515 516 517 /** 518 * Gets a mutable copy of the set of effective values for the 519 * specified property. 520 * <p> 521 * See the class description for more information about how the 522 * effective property values are derived. 523 * 524 * @param <PD> 525 * The type of the property to be retrieved. 526 * @param pd 527 * The property to be retrieved. 528 * @return Returns the property's effective values, or an empty set 529 * if there are no effective values defined. 530 * @throws IllegalArgumentException 531 * If the property definition is not associated with this 532 * managed object's definition. 533 */ 534 <PD> SortedSet<PD> getPropertyValues(PropertyDefinition<PD> pd) 535 throws IllegalArgumentException; 536 537 538 539 /** 540 * Determines whether or not the specified property is set. If the 541 * property is unset, then any default behavior associated with the 542 * property applies. 543 * 544 * @param pd 545 * The property definition. 546 * @return Returns <code>true</code> if the property has been set, 547 * or <code>false</code> if it is unset and any default 548 * behavior associated with the property applies. 549 * @throws IllegalArgumentException 550 * If the property definition is not associated with this 551 * managed object's definition. 552 */ 553 boolean isPropertyPresent(PropertyDefinition<?> pd) 554 throws IllegalArgumentException; 555 556 557 558 /** 559 * Determines whether or not the optional managed object associated 560 * with the specified optional relations exists. 561 * 562 * @param <C> 563 * The type of client managed object configuration that the 564 * relation definition refers to. 565 * @param <S> 566 * The type of server managed object configuration that the 567 * relation definition refers to. 568 * @param r 569 * The optional relation definition. 570 * @return Returns <code>true</code> if the optional managed 571 * object exists, <code>false</code> otherwise. 572 * @throws IllegalArgumentException 573 * If the relation definition is not associated with this 574 * managed object's definition. 575 * @throws ConcurrentModificationException 576 * If this managed object has been removed from the server 577 * by another client. 578 * @throws AuthorizationException 579 * If the server refuses to make the determination because 580 * the client does not have the correct privileges. 581 * @throws CommunicationException 582 * If the client cannot contact the server due to an 583 * underlying communication problem. 584 */ 585 <C extends ConfigurationClient, S extends Configuration> 586 boolean hasChild(OptionalRelationDefinition<C, S> r) 587 throws IllegalArgumentException, ConcurrentModificationException, 588 AuthorizationException, CommunicationException; 589 590 591 592 /** 593 * Lists the child managed objects associated with the specified 594 * instantiable relation. 595 * 596 * @param <C> 597 * The type of client managed object configuration that the 598 * relation definition refers to. 599 * @param <S> 600 * The type of server managed object configuration that the 601 * relation definition refers to. 602 * @param r 603 * The instantiable relation definition. 604 * @return Returns the names of the child managed objects. 605 * @throws IllegalArgumentException 606 * If the relation definition is not associated with this 607 * managed object's definition. 608 * @throws ConcurrentModificationException 609 * If this managed object has been removed from the server 610 * by another client. 611 * @throws AuthorizationException 612 * If the server refuses to list the managed objects 613 * because the client does not have the correct 614 * privileges. 615 * @throws CommunicationException 616 * If the client cannot contact the server due to an 617 * underlying communication problem. 618 */ 619 <C extends ConfigurationClient, S extends Configuration> 620 String[] listChildren(InstantiableRelationDefinition<C, S> r) 621 throws IllegalArgumentException, ConcurrentModificationException, 622 AuthorizationException, CommunicationException; 623 624 625 626 /** 627 * Lists the child managed objects associated with the specified 628 * instantiable relation which are a sub-type of the specified 629 * managed object definition. 630 * 631 * @param <C> 632 * The type of client managed object configuration that the 633 * relation definition refers to. 634 * @param <S> 635 * The type of server managed object configuration that the 636 * relation definition refers to. 637 * @param r 638 * The instantiable relation definition. 639 * @param d 640 * The managed object definition. 641 * @return Returns the names of the child managed objects which are 642 * a sub-type of the specified managed object definition. 643 * @throws IllegalArgumentException 644 * If the relation definition is not associated with this 645 * managed object's definition. 646 * @throws ConcurrentModificationException 647 * If this managed object has been removed from the server 648 * by another client. 649 * @throws AuthorizationException 650 * If the server refuses to list the managed objects 651 * because the client does not have the correct 652 * privileges. 653 * @throws CommunicationException 654 * If the client cannot contact the server due to an 655 * underlying communication problem. 656 */ 657 <C extends ConfigurationClient, S extends Configuration> 658 String[] listChildren(InstantiableRelationDefinition<C, S> r, 659 AbstractManagedObjectDefinition<? extends C, ? extends S> d) 660 throws IllegalArgumentException, ConcurrentModificationException, 661 AuthorizationException, CommunicationException; 662 663 664 665 /** 666 * Lists the child managed objects associated with the specified set 667 * relation. 668 * 669 * @param <C> 670 * The type of client managed object configuration that the 671 * relation definition refers to. 672 * @param <S> 673 * The type of server managed object configuration that the 674 * relation definition refers to. 675 * @param r 676 * The set relation definition. 677 * @return Returns the names of the child managed objects which for 678 * set relations are the definition names of each managed 679 * object. 680 * @throws IllegalArgumentException 681 * If the relation definition is not associated with this 682 * managed object's definition. 683 * @throws ConcurrentModificationException 684 * If this managed object has been removed from the server 685 * by another client. 686 * @throws AuthorizationException 687 * If the server refuses to list the managed objects because 688 * the client does not have the correct privileges. 689 * @throws CommunicationException 690 * If the client cannot contact the server due to an 691 * underlying communication problem. 692 */ 693 <C extends ConfigurationClient, S extends Configuration> 694 String[] listChildren(SetRelationDefinition<C, S> r) 695 throws IllegalArgumentException, ConcurrentModificationException, 696 AuthorizationException, CommunicationException; 697 698 699 700 /** 701 * Lists the child managed objects associated with the specified set 702 * relation which are a sub-type of the specified managed object 703 * definition. 704 * 705 * @param <C> 706 * The type of client managed object configuration that the 707 * relation definition refers to. 708 * @param <S> 709 * The type of server managed object configuration that the 710 * relation definition refers to. 711 * @param r 712 * The set relation definition. 713 * @param d 714 * The managed object definition. 715 * @return Returns the names of the child managed objects which for 716 * set relations are the definition names of each managed 717 * object. 718 * @throws IllegalArgumentException 719 * If the relation definition is not associated with this 720 * managed object's definition. 721 * @throws ConcurrentModificationException 722 * If this managed object has been removed from the server 723 * by another client. 724 * @throws AuthorizationException 725 * If the server refuses to list the managed objects because 726 * the client does not have the correct privileges. 727 * @throws CommunicationException 728 * If the client cannot contact the server due to an 729 * underlying communication problem. 730 */ 731 <C extends ConfigurationClient, S extends Configuration> 732 String[] listChildren(SetRelationDefinition<C, S> r, 733 AbstractManagedObjectDefinition<? extends C, ? extends S> d) 734 throws IllegalArgumentException, ConcurrentModificationException, 735 AuthorizationException, CommunicationException; 736 737 738 739 /** 740 * Removes the named instantiable child managed object. 741 * 742 * @param <C> 743 * The type of client managed object configuration that the 744 * relation definition refers to. 745 * @param <S> 746 * The type of server managed object configuration that the 747 * relation definition refers to. 748 * @param r 749 * The instantiable relation definition. 750 * @param name 751 * The name of the child managed object to be removed. 752 * @throws IllegalArgumentException 753 * If the relation definition is not associated with this 754 * managed object's definition. 755 * @throws ManagedObjectNotFoundException 756 * If the managed object could not be removed because it 757 * could not found on the server. 758 * @throws OperationRejectedException 759 * If the managed object cannot be removed due to some 760 * client-side or server-side constraint which cannot be 761 * satisfied (for example, if it is referenced by another 762 * managed object). 763 * @throws ConcurrentModificationException 764 * If this managed object has been removed from the server 765 * by another client. 766 * @throws AuthorizationException 767 * If the server refuses to remove the managed objects 768 * because the client does not have the correct 769 * privileges. 770 * @throws CommunicationException 771 * If the client cannot contact the server due to an 772 * underlying communication problem. 773 */ 774 <C extends ConfigurationClient, S extends Configuration> 775 void removeChild(InstantiableRelationDefinition<C, S> r, String name) 776 throws IllegalArgumentException, ManagedObjectNotFoundException, 777 OperationRejectedException, ConcurrentModificationException, 778 AuthorizationException, CommunicationException; 779 780 781 782 /** 783 * Removes an optional child managed object. 784 * 785 * @param <C> 786 * The type of client managed object configuration that the 787 * relation definition refers to. 788 * @param <S> 789 * The type of server managed object configuration that the 790 * relation definition refers to. 791 * @param r 792 * The optional relation definition. 793 * @throws IllegalArgumentException 794 * If the relation definition is not associated with this 795 * managed object's definition. 796 * @throws ManagedObjectNotFoundException 797 * If the managed object could not be removed because it 798 * could not found on the server. 799 * @throws OperationRejectedException 800 * If the managed object cannot be removed due to some 801 * client-side or server-side constraint which cannot be 802 * satisfied (for example, if it is referenced by another 803 * managed object). 804 * @throws ConcurrentModificationException 805 * If this managed object has been removed from the server 806 * by another client. 807 * @throws AuthorizationException 808 * If the server refuses to remove the managed objects 809 * because the client does not have the correct 810 * privileges. 811 * @throws CommunicationException 812 * If the client cannot contact the server due to an 813 * underlying communication problem. 814 */ 815 <C extends ConfigurationClient, S extends Configuration> 816 void removeChild(OptionalRelationDefinition<C, S> r) 817 throws IllegalArgumentException, ManagedObjectNotFoundException, 818 OperationRejectedException, ConcurrentModificationException, 819 AuthorizationException, CommunicationException; 820 821 822 823 /** 824 * Removes s set child managed object. 825 * 826 * @param <C> 827 * The type of client managed object configuration that the 828 * relation definition refers to. 829 * @param <S> 830 * The type of server managed object configuration that the 831 * relation definition refers to. 832 * @param r 833 * The set relation definition. 834 * @param name 835 * The name of the child managed object to be removed. 836 * @throws IllegalArgumentException 837 * If the relation definition is not associated with this 838 * managed object's definition. 839 * @throws ManagedObjectNotFoundException 840 * If the managed object could not be removed because it 841 * could not found on the server. 842 * @throws OperationRejectedException 843 * If the managed object cannot be removed due to some 844 * client-side or server-side constraint which cannot be 845 * satisfied (for example, if it is referenced by another 846 * managed object). 847 * @throws ConcurrentModificationException 848 * If this managed object has been removed from the server 849 * by another client. 850 * @throws AuthorizationException 851 * If the server refuses to remove the managed objects 852 * because the client does not have the correct 853 * privileges. 854 * @throws CommunicationException 855 * If the client cannot contact the server due to an 856 * underlying communication problem. 857 */ 858 <C extends ConfigurationClient, S extends Configuration> 859 void removeChild(SetRelationDefinition<C, S> r, String name) 860 throws IllegalArgumentException, ManagedObjectNotFoundException, 861 OperationRejectedException, ConcurrentModificationException, 862 AuthorizationException, CommunicationException; 863 864 865 866 /** 867 * Sets a new pending value for the specified property. 868 * <p> 869 * See the class description for more information regarding pending values. 870 * 871 * @param <PD> 872 * The type of the property to be modified. 873 * @param pd 874 * The property to be modified. 875 * @param value 876 * The new pending value for the property, or <code>null</code> if 877 * the property should be reset to its default behavior. 878 * @throws PropertyException 879 * If the new pending value is deemed to be invalid according to the 880 * property definition, or if this is not a new managed object and 881 * the property is read-only or for monitoring purposes, or if an 882 * attempt was made to remove a mandatory property. 883 * @throws IllegalArgumentException 884 * If the specified property definition is not associated with this 885 * managed object. 886 */ 887 <PD> void setPropertyValue(PropertyDefinition<PD> pd, PD value) 888 throws PropertyException, IllegalArgumentException; 889 890 891 892 /** 893 * Sets a new pending values for the specified property. 894 * <p> 895 * See the class description for more information regarding pending values. 896 * 897 * @param <PD> 898 * The type of the property to be modified. 899 * @param pd 900 * The property to be modified. 901 * @param values 902 * A non-<code>null</code> set of new pending values for the property 903 * (an empty set indicates that the property should be reset to its 904 * default behavior). The set will not be referenced by this managed 905 * object. 906 * @throws PropertyException 907 * If a new pending value is deemed to be invalid according to the 908 * property definition, or if an attempt was made to add multiple 909 * pending values to a single-valued property, or if this is not a 910 * new managed object and the property is read-only or for 911 * monitoring purposes, or if an attempt was made to remove a 912 * mandatory property. 913 * @throws IllegalArgumentException 914 * If the specified property definition is not associated with this 915 * managed object. 916 */ 917 <PD> void setPropertyValues(PropertyDefinition<PD> pd, Collection<PD> values) 918 throws PropertyException, IllegalArgumentException; 919 920}