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