From 12f788c17b8c281179f0819352f02b612b0219e2 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Mon, 02 Feb 2009 23:37:54 +0000
Subject: [PATCH] Fix issue 3734 - Make network group policies extensible.
---
opendj-sdk/opends/src/server/org/opends/server/admin/client/ManagedObject.java | 205 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 204 insertions(+), 1 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/admin/client/ManagedObject.java b/opendj-sdk/opends/src/server/org/opends/server/admin/client/ManagedObject.java
index 16af3a9..3b16697 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/admin/client/ManagedObject.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/admin/client/ManagedObject.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2007-2008 Sun Microsystems, Inc.
+ * Copyright 2007-2009 Sun Microsystems, Inc.
*/
package org.opends.server.admin.client;
@@ -49,6 +49,7 @@
import org.opends.server.admin.PropertyIsReadOnlyException;
import org.opends.server.admin.PropertyIsSingleValuedException;
import org.opends.server.admin.PropertyProvider;
+import org.opends.server.admin.SetRelationDefinition;
import org.opends.server.admin.SingletonRelationDefinition;
@@ -227,6 +228,45 @@
/**
+ * Creates a new child managed object bound to the specified
+ * set relation. The new managed object will initially not
+ * contain any property values (including mandatory properties).
+ * Once the managed object has been configured it can be added to
+ * the server using the {@link #commit()} method.
+ *
+ * @param <C>
+ * The expected type of the child managed object
+ * configuration client.
+ * @param <S>
+ * The expected type of the child managed object
+ * server configuration.
+ * @param <CC>
+ * The actual type of the added managed object
+ * configuration client.
+ * @param r
+ * The set relation definition.
+ * @param d
+ * The definition of the managed object to be created.
+ * @param exceptions
+ * A collection in which to place any
+ * {@link DefaultBehaviorException}s that occurred whilst
+ * attempting to determine the managed object's default
+ * values.
+ * @return Returns a new child managed object bound to the specified
+ * set relation.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ */
+ <C extends ConfigurationClient, S extends Configuration, CC extends C>
+ ManagedObject<CC> createChild(SetRelationDefinition<C, S> r,
+ ManagedObjectDefinition<CC, ? extends S> d,
+ Collection<DefaultBehaviorException> exceptions)
+ throws IllegalArgumentException;
+
+
+
+ /**
* Retrieves an instantiable child managed object.
*
* @param <C>
@@ -361,6 +401,52 @@
/**
+ * Retrieves a set child managed object.
+ *
+ * @param <C>
+ * The requested type of the child managed object
+ * configuration client.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The set relation definition.
+ * @param name
+ * The name of the child managed object.
+ * @return Returns the set child managed object.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws DefinitionDecodingException
+ * If the managed object was found but its type could not
+ * be determined.
+ * @throws ManagedObjectDecodingException
+ * If the managed object was found but one or more of its
+ * properties could not be decoded.
+ * @throws ManagedObjectNotFoundException
+ * If the requested managed object could not be found on
+ * the server.
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server
+ * by another client.
+ * @throws AuthorizationException
+ * If the server refuses to retrieve the managed object
+ * because the client does not have the correct
+ * privileges.
+ * @throws CommunicationException
+ * If the client cannot contact the server due to an
+ * underlying communication problem.
+ */
+ <C extends ConfigurationClient, S extends Configuration>
+ ManagedObject<? extends C> getChild(SetRelationDefinition<C, S> r,
+ String name) throws IllegalArgumentException, DefinitionDecodingException,
+ ManagedObjectDecodingException, ManagedObjectNotFoundException,
+ ConcurrentModificationException, AuthorizationException,
+ CommunicationException;
+
+
+
+ /**
* Creates a client configuration view of this managed object.
* Modifications made to this managed object will be reflected in
* the client configuration view and vice versa.
@@ -582,6 +668,80 @@
/**
+ * Lists the child managed objects associated with the specified set
+ * relation.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The set relation definition.
+ * @return Returns the names of the child managed objects which for
+ * set relations are the definition names of each managed
+ * object.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server
+ * by another client.
+ * @throws AuthorizationException
+ * If the server refuses to list the managed objects because
+ * the client does not have the correct privileges.
+ * @throws CommunicationException
+ * If the client cannot contact the server due to an
+ * underlying communication problem.
+ */
+ <C extends ConfigurationClient, S extends Configuration>
+ String[] listChildren(SetRelationDefinition<C, S> r)
+ throws IllegalArgumentException, ConcurrentModificationException,
+ AuthorizationException, CommunicationException;
+
+
+
+ /**
+ * Lists the child managed objects associated with the specified set
+ * relation which are a sub-type of the specified managed object
+ * definition.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The set relation definition.
+ * @param d
+ * The managed object definition.
+ * @return Returns the names of the child managed objects which for
+ * set relations are the definition names of each managed
+ * object.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server
+ * by another client.
+ * @throws AuthorizationException
+ * If the server refuses to list the managed objects because
+ * the client does not have the correct privileges.
+ * @throws CommunicationException
+ * If the client cannot contact the server due to an
+ * underlying communication problem.
+ */
+ <C extends ConfigurationClient, S extends Configuration>
+ String[] listChildren(SetRelationDefinition<C, S> r,
+ AbstractManagedObjectDefinition<? extends C, ? extends S> d)
+ throws IllegalArgumentException, ConcurrentModificationException,
+ AuthorizationException, CommunicationException;
+
+
+
+ /**
* Removes the named instantiable child managed object.
*
* @param <C>
@@ -666,6 +826,49 @@
/**
+ * Removes s set child managed object.
+ *
+ * @param <C>
+ * The type of client managed object configuration that the
+ * relation definition refers to.
+ * @param <S>
+ * The type of server managed object configuration that the
+ * relation definition refers to.
+ * @param r
+ * The set relation definition.
+ * @param name
+ * The name of the child managed object to be removed.
+ * @throws IllegalArgumentException
+ * If the relation definition is not associated with this
+ * managed object's definition.
+ * @throws ManagedObjectNotFoundException
+ * If the managed object could not be removed because it
+ * could not found on the server.
+ * @throws OperationRejectedException
+ * If the managed object cannot be removed due to some
+ * client-side or server-side constraint which cannot be
+ * satisfied (for example, if it is referenced by another
+ * managed object).
+ * @throws ConcurrentModificationException
+ * If this managed object has been removed from the server
+ * by another client.
+ * @throws AuthorizationException
+ * If the server refuses to remove the managed objects
+ * because the client does not have the correct
+ * privileges.
+ * @throws CommunicationException
+ * If the client cannot contact the server due to an
+ * underlying communication problem.
+ */
+ <C extends ConfigurationClient, S extends Configuration>
+ void removeChild(SetRelationDefinition<C, S> r, String name)
+ throws IllegalArgumentException, ManagedObjectNotFoundException,
+ OperationRejectedException, ConcurrentModificationException,
+ AuthorizationException, CommunicationException;
+
+
+
+ /**
* Sets a new pending value for the specified property.
* <p>
* See the class description for more information regarding pending
--
Gitblit v1.10.0