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 * Portions Copyright 2014-2016 ForgeRock AS.
016 */
017
018package org.forgerock.opendj.config.client;
019
020import java.util.Collection;
021import java.util.SortedSet;
022
023import org.forgerock.opendj.config.AbstractManagedObjectDefinition;
024import org.forgerock.opendj.config.Configuration;
025import org.forgerock.opendj.config.ConfigurationClient;
026import org.forgerock.opendj.config.PropertyException;
027import org.forgerock.opendj.config.DefinitionDecodingException;
028import org.forgerock.opendj.config.InstantiableRelationDefinition;
029import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException;
030import org.forgerock.opendj.config.ManagedObjectDefinition;
031import org.forgerock.opendj.config.ManagedObjectNotFoundException;
032import org.forgerock.opendj.config.ManagedObjectPath;
033import org.forgerock.opendj.config.OptionalRelationDefinition;
034import org.forgerock.opendj.config.PropertyDefinition;
035import org.forgerock.opendj.config.PropertyProvider;
036import org.forgerock.opendj.config.SetRelationDefinition;
037import org.forgerock.opendj.config.SingletonRelationDefinition;
038import org.forgerock.opendj.ldap.LdapException;
039
040/**
041 * A generic interface for accessing client-side managed objects.
042 * <p>
043 * A managed object comprises of zero or more properties. A property has
044 * associated with it three sets of property value(s). These are:
045 * <ul>
046 * <li><i>default value(s)</i> - these value(s) represent the default behavior
047 * for the property when it has no active values. When a property inherits its
048 * default value(s) from elsewhere (i.e. a property in another managed object),
049 * the default value(s) represent the active value(s) of the inherited property
050 * at the time the managed object was retrieved
051 * <li><i>active value(s)</i> - these value(s) represent the state of the
052 * property at the time the managed object was retrieved
053 * <li><i>pending value(s)</i> - these value(s) represent any modifications made
054 * to the property's value(s) since the managed object object was retrieved and
055 * before the changes have been committed using the {@link #commit()} method,
056 * the pending values can be empty indicating that the property should be
057 * modified back to its default values.
058 * </ul>
059 * In addition, a property has an <i>effective state</i> defined by its
060 * <i>effective values</i> which are derived by evaluating the following rules
061 * in the order presented:
062 * <ul>
063 * <li>the <i>pending values</i> if defined and non-empty
064 * <li>or, the <i>default values</i> if the pending values are defined but are
065 * empty
066 * <li>or, the <i>active values</i> if defined and non-empty
067 * <li>or, the <i>default values</i> if there are no active values
068 * <li>or, an empty set of values, if there are no default values.
069 * </ul>
070 *
071 * @param <T>
072 *            The type of client configuration represented by the client managed
073 *            object.
074 */
075public interface ManagedObject<T extends ConfigurationClient> extends PropertyProvider {
076
077    /**
078     * Adds this managed object to the server or commits any changes made to it
079     * depending on whether the managed object already exists on the
080     * server. Pending property values will be committed to the managed object.
081     * If successful, the pending values will become active values.
082     * <p>
083     * See the class description for more information regarding pending and
084     * active values.
085     *
086     * @throws ManagedObjectAlreadyExistsException
087     *             If the managed object cannot be added to the server because
088     *             it already exists.
089     * @throws MissingMandatoryPropertiesException
090     *             If the managed object contains some mandatory properties
091     *             which have been left undefined.
092     * @throws ConcurrentModificationException
093     *             If the managed object is being added to the server but its
094     *             parent has been removed by another client, or if this managed
095     *             object is being modified but it has been removed from the
096     *             server by another client.
097     * @throws OperationRejectedException
098     *             If this managed object cannot be added or modified due to
099     *             some client-side or server-side constraint which cannot be
100     *             satisfied.
101     * @throws LdapException
102     *             If any other error occurs.
103     */
104    void commit() throws ManagedObjectAlreadyExistsException, MissingMandatoryPropertiesException,
105            ConcurrentModificationException, OperationRejectedException, LdapException;
106
107    /**
108     * Determines whether this managed object has been modified since it
109     * was constructed. In other words, whether the set of pending values
110     * differs from the set of active values.
111     *
112     * @return Returns <code>true</code> if this managed object has been
113     *         modified since it was constructed.
114     */
115    boolean isModified();
116
117    /**
118     * Creates a new child managed object bound to the specified instantiable
119     * relation. The new managed object will initially not contain any property
120     * values (including mandatory properties). Once the managed object has been
121     * configured it can be added to the server using the {@link #commit()}
122     * method.
123     *
124     * @param <C>
125     *            The expected type of the child managed object configuration
126     *            client.
127     * @param <S>
128     *            The expected type of the child managed object server
129     *            configuration.
130     * @param <C1>
131     *            The actual type of the added managed object configuration
132     *            client.
133     * @param r
134     *            The instantiable relation definition.
135     * @param d
136     *            The definition of the managed object to be created.
137     * @param name
138     *            The name of the child managed object.
139     * @param exceptions
140     *            A collection in which to place any
141     *            {@link PropertyException}s that occurred whilst
142     *            attempting to determine the managed object's default values.
143     * @return Returns a new child managed object bound to the specified
144     *         instantiable relation.
145     * @throws IllegalManagedObjectNameException
146     *             If the name of the child managed object is invalid.
147     * @throws IllegalArgumentException
148     *             If the relation definition is not associated with this
149     *             managed object's definition.
150     */
151    <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
152            InstantiableRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d, String name,
153            Collection<PropertyException> exceptions) throws IllegalManagedObjectNameException;
154
155    /**
156     * Creates a new child managed object bound to the specified optional
157     * relation. The new managed object will initially not contain any property
158     * values (including mandatory properties). Once the managed object has been
159     * configured it can be added to the server using the {@link #commit()}
160     * method.
161     *
162     * @param <C>
163     *            The expected type of the child managed object configuration
164     *            client.
165     * @param <S>
166     *            The expected type of the child managed object server
167     *            configuration.
168     * @param <C1>
169     *            The actual type of the added managed object configuration
170     *            client.
171     * @param r
172     *            The optional relation definition.
173     * @param d
174     *            The definition of the managed object to be created.
175     * @param exceptions
176     *            A collection in which to place any
177     *            {@link PropertyException}s that occurred whilst
178     *            attempting to determine the managed object's default values.
179     * @return Returns a new child managed object bound to the specified
180     *         optional relation.
181     * @throws IllegalArgumentException
182     *             If the relation definition is not associated with this
183     *             managed object's definition.
184     */
185    <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
186            OptionalRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d,
187            Collection<PropertyException> exceptions);
188
189    /**
190     * Creates a new child managed object bound to the specified set relation.
191     * The new managed object will initially not contain any property values
192     * (including mandatory properties). Once the managed object has been
193     * configured it can be added to the server using the {@link #commit()}
194     * method.
195     *
196     * @param <C>
197     *            The expected type of the child managed object configuration
198     *            client.
199     * @param <S>
200     *            The expected type of the child managed object server
201     *            configuration.
202     * @param <C1>
203     *            The actual type of the added managed object configuration
204     *            client.
205     * @param r
206     *            The set relation definition.
207     * @param d
208     *            The definition of the managed object to be created.
209     * @param exceptions
210     *            A collection in which to place any
211     *            {@link PropertyException}s that occurred whilst
212     *            attempting to determine the managed object's default values.
213     * @return Returns a new child managed object bound to the specified set
214     *         relation.
215     * @throws IllegalArgumentException
216     *             If the relation definition is not associated with this
217     *             managed object's definition.
218     */
219    <C extends ConfigurationClient, S extends Configuration, C1 extends C> ManagedObject<C1> createChild(
220            SetRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d,
221            Collection<PropertyException> exceptions);
222
223    /**
224     * Retrieves an instantiable child managed object.
225     *
226     * @param <C>
227     *            The requested type of the child managed object configuration
228     *            client.
229     * @param <S>
230     *            The type of server managed object configuration that the
231     *            relation definition refers to.
232     * @param r
233     *            The instantiable relation definition.
234     * @param name
235     *            The name of the child managed object.
236     * @return Returns the instantiable child managed object.
237     * @throws IllegalArgumentException
238     *             If the relation definition is not associated with this
239     *             managed object's definition.
240     * @throws DefinitionDecodingException
241     *             If the managed object was found but its type could not be
242     *             determined.
243     * @throws ManagedObjectDecodingException
244     *             If the managed object was found but one or more of its
245     *             properties could not be decoded.
246     * @throws ManagedObjectNotFoundException
247     *             If the requested managed object could not be found on the
248     *             server.
249     * @throws ConcurrentModificationException
250     *             If this managed object has been removed from the server by
251     *             another client.
252     * @throws LdapException
253     *             If any other error occurs.
254     */
255    <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
256            InstantiableRelationDefinition<C, S> r, String name) throws
257            DefinitionDecodingException, ManagedObjectDecodingException, ManagedObjectNotFoundException,
258            ConcurrentModificationException, LdapException;
259
260    /**
261     * Retrieves an optional child managed object.
262     *
263     * @param <C>
264     *            The requested type of the child managed object configuration
265     *            client.
266     * @param <S>
267     *            The type of server managed object configuration that the
268     *            relation definition refers to.
269     * @param r
270     *            The optional relation definition.
271     * @return Returns the optional child managed object.
272     * @throws IllegalArgumentException
273     *             If the relation definition is not associated with this
274     *             managed object's definition.
275     * @throws DefinitionDecodingException
276     *             If the managed object was found but its type could not be
277     *             determined.
278     * @throws ManagedObjectDecodingException
279     *             If the managed object was found but one or more of its
280     *             properties could not be decoded.
281     * @throws ManagedObjectNotFoundException
282     *             If the requested managed object could not be found on the
283     *             server.
284     * @throws ConcurrentModificationException
285     *             If this managed object has been removed from the server by
286     *             another client.
287     * @throws LdapException
288     *             If any other error occurs.
289     */
290    <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
291            OptionalRelationDefinition<C, S> r) throws DefinitionDecodingException,
292            ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
293            LdapException;
294
295    /**
296     * Retrieves a singleton child managed object.
297     *
298     * @param <C>
299     *            The requested type of the child managed object configuration
300     *            client.
301     * @param <S>
302     *            The type of server managed object configuration that the
303     *            relation definition refers to.
304     * @param r
305     *            The singleton relation definition.
306     * @return Returns the singleton child managed object.
307     * @throws IllegalArgumentException
308     *             If the relation definition is not associated with this
309     *             managed object's definition.
310     * @throws DefinitionDecodingException
311     *             If the managed object was found but its type could not be
312     *             determined.
313     * @throws ManagedObjectDecodingException
314     *             If the managed object was found but one or more of its
315     *             properties could not be decoded.
316     * @throws ManagedObjectNotFoundException
317     *             If the requested managed object could not be found on the
318     *             server.
319     * @throws ConcurrentModificationException
320     *             If this managed object has been removed from the server by
321     *             another client.
322     * @throws LdapException
323     *             If any other error occurs.
324     */
325    <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
326            SingletonRelationDefinition<C, S> r) throws DefinitionDecodingException,
327            ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
328            LdapException;
329
330    /**
331     * Retrieves a set child managed object.
332     *
333     * @param <C>
334     *            The requested type of the child managed object configuration
335     *            client.
336     * @param <S>
337     *            The type of server managed object configuration that the
338     *            relation definition refers to.
339     * @param r
340     *            The set relation definition.
341     * @param name
342     *            The name of the child managed object.
343     * @return Returns the set child managed object.
344     * @throws IllegalArgumentException
345     *             If the relation definition is not associated with this
346     *             managed object's definition.
347     * @throws DefinitionDecodingException
348     *             If the managed object was found but its type could not be
349     *             determined.
350     * @throws ManagedObjectDecodingException
351     *             If the managed object was found but one or more of its
352     *             properties could not be decoded.
353     * @throws ManagedObjectNotFoundException
354     *             If the requested managed object could not be found on the
355     *             server.
356     * @throws ConcurrentModificationException
357     *             If this managed object has been removed from the server by
358     *             another client.
359     * @throws LdapException
360     *             If any other error occurs.
361     */
362    <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getChild(
363            SetRelationDefinition<C, S> r, String name) throws DefinitionDecodingException,
364            ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException,
365            LdapException;
366
367    /**
368     * Creates a client configuration view of this managed object. Modifications
369     * made to this managed object will be reflected in the client configuration
370     * view and vice versa.
371     *
372     * @return Returns a client configuration view of this managed object.
373     */
374    T getConfiguration();
375
376    /**
377     * Gets the definition associated with this managed object.
378     *
379     * @return Returns the definition associated with this managed object.
380     */
381    ManagedObjectDefinition<T, ? extends Configuration> getManagedObjectDefinition();
382
383    /**
384     * Gets the path of this managed object.
385     *
386     * @return Returns the path of this managed object.
387     */
388    ManagedObjectPath<T, ? extends Configuration> getManagedObjectPath();
389
390    /**
391     * Gets a mutable copy of the set of default values for the specified
392     * property.
393     *
394     * @param <P>
395     *            The type of the property to be retrieved.
396     * @param pd
397     *            The property to be retrieved.
398     * @return Returns the property's default values, or an empty set if there
399     *         are no default values defined.
400     * @throws IllegalArgumentException
401     *             If the property definition is not associated with this
402     *             managed object's definition.
403     */
404    <P> SortedSet<P> getPropertyDefaultValues(PropertyDefinition<P> pd);
405
406    /**
407     * Gets the effective value of the specified property.
408     * <p>
409     * See the class description for more information about how the effective
410     * property value is derived.
411     *
412     * @param <P>
413     *            The type of the property to be retrieved.
414     * @param pd
415     *            The property to be retrieved.
416     * @return Returns the property's effective value, or <code>null</code> if
417     *         there is no effective value defined.
418     * @throws IllegalArgumentException
419     *             If the property definition is not associated with this
420     *             managed object's definition.
421     */
422    <P> P getPropertyValue(PropertyDefinition<P> pd);
423
424    /**
425     * Gets a mutable copy of the set of effective values for the specified
426     * property.
427     * <p>
428     * See the class description for more information about how the effective
429     * property values are derived.
430     *
431     * @param <P>
432     *            The type of the property to be retrieved.
433     * @param pd
434     *            The property to be retrieved.
435     * @return Returns the property's effective values, or an empty set if there
436     *         are no effective values defined.
437     * @throws IllegalArgumentException
438     *             If the property definition is not associated with this
439     *             managed object's definition.
440     */
441    @Override
442    <P> SortedSet<P> getPropertyValues(PropertyDefinition<P> pd);
443
444    /**
445     * Determines whether the specified property is set. If the property
446     * is unset, then any default behavior associated with the property applies.
447     *
448     * @param pd
449     *            The property definition.
450     * @return Returns <code>true</code> if the property has been set, or
451     *         <code>false</code> if it is unset and any default behavior
452     *         associated with the property applies.
453     * @throws IllegalArgumentException
454     *             If the property definition is not associated with this
455     *             managed object's definition.
456     */
457    boolean isPropertyPresent(PropertyDefinition<?> pd);
458
459    /**
460     * Determines whether the optional managed object associated with the
461     * specified optional relations exists.
462     *
463     * @param <C>
464     *            The type of client managed object configuration that the
465     *            relation definition refers to.
466     * @param <S>
467     *            The type of server managed object configuration that the
468     *            relation definition refers to.
469     * @param r
470     *            The optional relation definition.
471     * @return Returns <code>true</code> if the optional managed object exists,
472     *         <code>false</code> otherwise.
473     * @throws ConcurrentModificationException
474     *             If this managed object has been removed from the server by
475     *             another client.
476     * @throws LdapException
477     *             If there is any other error.
478     */
479    <C extends ConfigurationClient, S extends Configuration> boolean hasChild(OptionalRelationDefinition<C, S> r)
480            throws ConcurrentModificationException, LdapException;
481
482    /**
483     * Lists the child managed objects associated with the specified
484     * instantiable relation.
485     *
486     * @param <C>
487     *            The type of client managed object configuration that the
488     *            relation definition refers to.
489     * @param <S>
490     *            The type of server managed object configuration that the
491     *            relation definition refers to.
492     * @param r
493     *            The instantiable relation definition.
494     * @return Returns the names of the child managed objects.
495     * @throws IllegalArgumentException
496     *             If the relation definition is not associated with this
497     *             managed object's definition.
498     * @throws ConcurrentModificationException
499     *             If this managed object has been removed from the server by
500     *             another client.
501     * @throws LdapException
502     *             If any other error occurs.
503     */
504    <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
505            InstantiableRelationDefinition<C, S> r) throws ConcurrentModificationException,
506            LdapException;
507
508    /**
509     * Lists the child managed objects associated with the specified
510     * instantiable relation which are a sub-type of the specified managed
511     * object definition.
512     *
513     * @param <C>
514     *            The type of client managed object configuration that the
515     *            relation definition refers to.
516     * @param <S>
517     *            The type of server managed object configuration that the
518     *            relation definition refers to.
519     * @param r
520     *            The instantiable relation definition.
521     * @param d
522     *            The managed object definition.
523     * @return Returns the names of the child managed objects which are a
524     *         sub-type of the specified managed object definition.
525     * @throws ConcurrentModificationException
526     *             If this managed object has been removed from the server by
527     *             another client.
528     * @throws LdapException
529     *             If any other error occurs.
530     */
531    <C extends ConfigurationClient, S extends Configuration> String[] listChildren(
532            InstantiableRelationDefinition<C, S> r, AbstractManagedObjectDefinition<? extends C, ? extends S> d)
533            throws ConcurrentModificationException, LdapException;
534
535    /**
536     * Lists the child managed objects associated with the specified set
537     * relation.
538     *
539     * @param <C>
540     *            The type of client managed object configuration that the
541     *            relation definition refers to.
542     * @param <S>
543     *            The type of server managed object configuration that the
544     *            relation definition refers to.
545     * @param r
546     *            The set relation definition.
547     * @return Returns the names of the child managed objects which for set
548     *         relations are the definition names of each managed object.
549     * @throws ConcurrentModificationException
550     *             If this managed object has been removed from the server by
551     *             another client.
552     * @throws LdapException
553     *             If any other error occurs.
554     */
555    <C extends ConfigurationClient, S extends Configuration> String[] listChildren(SetRelationDefinition<C, S> r)
556            throws ConcurrentModificationException, LdapException;
557
558    /**
559     * Lists the child managed objects associated with the specified set
560     * relation which are a sub-type of the specified managed object definition.
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 set relation definition.
570     * @param d
571     *            The managed object definition.
572     * @return Returns the names of the child managed objects which for set
573     *         relations are the definition names of each managed object.
574     * @throws IllegalArgumentException
575     *             If the relation definition is not associated with this
576     *             managed object's definition.
577     * @throws ConcurrentModificationException
578     *             If this managed object has been removed from the server by
579     *             another client.
580     * @throws LdapException
581     *             If any other error occurs.
582     */
583    <C extends ConfigurationClient, S extends Configuration> String[] listChildren(SetRelationDefinition<C, S> r,
584            AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws
585            ConcurrentModificationException, LdapException;
586
587    /**
588     * Removes the named instantiable child managed object.
589     *
590     * @param <C>
591     *            The type of client managed object configuration that the
592     *            relation definition refers to.
593     * @param <S>
594     *            The type of server managed object configuration that the
595     *            relation definition refers to.
596     * @param r
597     *            The instantiable relation definition.
598     * @param name
599     *            The name of the child managed object to be removed.
600     * @throws IllegalArgumentException
601     *             If the relation definition is not associated with this
602     *             managed object's definition.
603     * @throws ManagedObjectNotFoundException
604     *             If the managed object could not be removed because it could
605     *             not found on the server.
606     * @throws OperationRejectedException
607     *             If the managed object cannot be removed due to some
608     *             client-side or server-side constraint which cannot be
609     *             satisfied (for example, if it is referenced by another
610     *             managed object).
611     * @throws ConcurrentModificationException
612     *             If this managed object has been removed from the server by
613     *             another client.
614     * @throws LdapException
615     *             If any other error occurs.
616     */
617    <C extends ConfigurationClient, S extends Configuration> void removeChild(InstantiableRelationDefinition<C, S> r,
618            String name) throws ManagedObjectNotFoundException, OperationRejectedException,
619            ConcurrentModificationException, LdapException;
620
621    /**
622     * Removes an optional child managed object.
623     *
624     * @param <C>
625     *            The type of client managed object configuration that the
626     *            relation definition refers to.
627     * @param <S>
628     *            The type of server managed object configuration that the
629     *            relation definition refers to.
630     * @param r
631     *            The optional relation definition.
632     * @throws ManagedObjectNotFoundException
633     *             If the managed object could not be removed because it could
634     *             not found on the server.
635     * @throws OperationRejectedException
636     *             If the managed object cannot be removed due to some
637     *             client-side or server-side constraint which cannot be
638     *             satisfied (for example, if it is referenced by another
639     *             managed object).
640     * @throws ConcurrentModificationException
641     *             If this managed object has been removed from the server by
642     *             another client.
643     * @throws LdapException
644     *             If any other error occurs.
645     */
646    <C extends ConfigurationClient, S extends Configuration> void removeChild(OptionalRelationDefinition<C, S> r)
647            throws ManagedObjectNotFoundException, OperationRejectedException,
648            ConcurrentModificationException, LdapException;
649
650    /**
651     * Removes s set child managed object.
652     *
653     * @param <C>
654     *            The type of client managed object configuration that the
655     *            relation definition refers to.
656     * @param <S>
657     *            The type of server managed object configuration that the
658     *            relation definition refers to.
659     * @param r
660     *            The set relation definition.
661     * @param name
662     *            The name of the child managed object to be removed.
663     * @throws ManagedObjectNotFoundException
664     *             If the managed object could not be removed because it could
665     *             not found on the server.
666     * @throws OperationRejectedException
667     *             If the managed object cannot be removed due to some
668     *             client-side or server-side constraint which cannot be
669     *             satisfied (for example, if it is referenced by another
670     *             managed object).
671     * @throws ConcurrentModificationException
672     *             If this managed object has been removed from the server by
673     *             another client.
674     * @throws LdapException
675     *             If any other error occurs.
676     */
677    <C extends ConfigurationClient, S extends Configuration> void removeChild(SetRelationDefinition<C, S> r,
678        String name) throws ManagedObjectNotFoundException, OperationRejectedException,
679            ConcurrentModificationException, LdapException;
680
681    /**
682     * Sets a new pending value for the specified property.
683     * <p>
684     * See the class description for more information regarding pending values.
685     *
686     * @param <P>
687     *            The type of the property to be modified.
688     * @param pd
689     *            The property to be modified.
690     * @param value
691     *            The new pending value for the property, or <code>null</code>
692     *            if the property should be reset to its default behavior.
693     * @throws PropertyException
694     *             If this is not a new managed object and the property is
695     *             read-only or for monitoring purposes.
696     * @throws PropertyException
697     *             If an attempt was made to remove a mandatory property.
698     */
699    <P> void setPropertyValue(PropertyDefinition<P> pd, P value);
700
701    /**
702     * Sets a new pending values for the specified property.
703     * <p>
704     * See the class description for more information regarding pending values.
705     *
706     * @param <P>
707     *            The type of the property to be modified.
708     * @param pd
709     *            The property to be modified.
710     * @param values
711     *            A non-<code>null</code> set of new pending values for the
712     *            property (an empty set indicates that the property should be
713     *            reset to its default behavior). The set will not be referenced
714     *            by this managed object.
715     * @throws PropertyException
716     *             If an attempt was made to add multiple pending values to a
717     *             single-valued property.
718     * @throws PropertyException
719     *             If this is not a new managed object and the property is
720     *             read-only or for monitoring purposes.
721     * @throws PropertyException
722     *             If an attempt was made to remove a mandatory property.
723     */
724    <P> void setPropertyValues(PropertyDefinition<P> pd, Collection<P> values);
725
726}