From 95df5cfdba474acb03076953e992b898fbb277a8 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.
---
opends/resource/admin/clientMO.xsl | 90 ++++++++++++++++++++++++++++++---------------
1 files changed, 60 insertions(+), 30 deletions(-)
diff --git a/opends/resource/admin/clientMO.xsl b/opends/resource/admin/clientMO.xsl
index e9bdee3..bc2b893 100644
--- a/opends/resource/admin/clientMO.xsl
+++ b/opends/resource/admin/clientMO.xsl
@@ -22,7 +22,7 @@
! CDDL HEADER END
!
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
xmlns:admpp="http://www.opends.org/admin-preprocessor"
@@ -285,34 +285,64 @@
<xsl:text>
</xsl:text>
<xsl:text>
</xsl:text>
<xsl:text>
</xsl:text>
- <xsl:call-template name="add-java-comment2">
- <xsl:with-param name="indent" select="2" />
- <xsl:with-param name="content"
- select="concat(
- 'Creates a new ', $ufn,'. The new ', $ufn,' will initially ',
- 'not contain any property values (including mandatory ',
- 'properties). Once the ', $ufn,' has been configured it ',
- 'can be added to the server using the {@link #commit()} ',
- 'method.
',
- '
',
- '@param <C>
',
- ' The type of the ', $ufn,' being created.
',
- '@param d
',
- ' The definition of the ', $ufn,' to be created.
',
- '@param name
',
- ' The name of the new ', $ufn,'.
',
- '@param exceptions
',
- ' An optional collection in which to place any ',
- '{@link DefaultBehaviorException}s that occurred whilst ',
- 'attempting to determine the default values of the ', $ufn,
- '. This argument can be <code>null<code>.
',
- '@return Returns a new ', $ufn,' configuration instance.
',
- '@throws IllegalManagedObjectNameException
',
- ' If the name of the new ', $ufn,' is invalid.
')" />
- </xsl:call-template>
- <xsl:value-of
- select="concat(' <C extends ', $java-class-name,'CfgClient> C create', $java-relation-name, '(
',
- ' ManagedObjectDefinition<C, ? extends ', $java-class-name,'Cfg> d, String name, Collection<DefaultBehaviorException> exceptions) throws IllegalManagedObjectNameException;
')" />
+ <xsl:choose>
+ <xsl:when test="string(adm:one-to-many/@unique) != 'true'">
+ <xsl:call-template name="add-java-comment2">
+ <xsl:with-param name="indent" select="2" />
+ <xsl:with-param name="content"
+ select="concat(
+ 'Creates a new ', $ufn,'. The new ', $ufn,' will initially ',
+ 'not contain any property values (including mandatory ',
+ 'properties). Once the ', $ufn,' has been configured it ',
+ 'can be added to the server using the {@link #commit()} ',
+ 'method.
',
+ '
',
+ '@param <C>
',
+ ' The type of the ', $ufn,' being created.
',
+ '@param d
',
+ ' The definition of the ', $ufn,' to be created.
',
+ '@param name
',
+ ' The name of the new ', $ufn,'.
',
+ '@param exceptions
',
+ ' An optional collection in which to place any ',
+ '{@link DefaultBehaviorException}s that occurred whilst ',
+ 'attempting to determine the default values of the ', $ufn,
+ '. This argument can be <code>null<code>.
',
+ '@return Returns a new ', $ufn,' configuration instance.
',
+ '@throws IllegalManagedObjectNameException
',
+ ' If the name of the new ', $ufn,' is invalid.
')" />
+ </xsl:call-template>
+ <xsl:value-of
+ select="concat(' <C extends ', $java-class-name,'CfgClient> C create', $java-relation-name, '(
',
+ ' ManagedObjectDefinition<C, ? extends ', $java-class-name,'Cfg> d, String name, Collection<DefaultBehaviorException> exceptions) throws IllegalManagedObjectNameException;
')" />
+ </xsl:when>
+ <xsl:when test="string(adm:one-to-many/@unique) = 'true'">
+ <xsl:call-template name="add-java-comment2">
+ <xsl:with-param name="indent" select="2" />
+ <xsl:with-param name="content"
+ select="concat(
+ 'Creates a new ', $ufn,'. The new ', $ufn,' will initially ',
+ 'not contain any property values (including mandatory ',
+ 'properties). Once the ', $ufn,' has been configured it ',
+ 'can be added to the server using the {@link #commit()} ',
+ 'method.
',
+ '
',
+ '@param <C>
',
+ ' The type of the ', $ufn,' being created.
',
+ '@param d
',
+ ' The definition of the ', $ufn,' to be created.
',
+ '@param exceptions
',
+ ' An optional collection in which to place any ',
+ '{@link DefaultBehaviorException}s that occurred whilst ',
+ 'attempting to determine the default values of the ', $ufn,
+ '. This argument can be <code>null<code>.
',
+ '@return Returns a new ', $ufn,' configuration instance.
')" />
+ </xsl:call-template>
+ <xsl:value-of
+ select="concat(' <C extends ', $java-class-name,'CfgClient> C create', $java-relation-name, '(
',
+ ' ManagedObjectDefinition<C, ? extends ', $java-class-name,'Cfg> d, Collection<DefaultBehaviorException> exceptions);
')" />
+ </xsl:when>
+ </xsl:choose>
<xsl:text>
</xsl:text>
<xsl:text>
</xsl:text>
<xsl:text>
</xsl:text>
@@ -424,7 +454,7 @@
org.opends.server.admin.client.OperationRejectedException
</import>
</xsl:if>
- <xsl:if test="$this-local-relations/adm:one-to-many">
+ <xsl:if test="$this-local-relations/adm:one-to-many[not(@unique = 'true')]">
<import>
org.opends.server.admin.client.IllegalManagedObjectNameException
</import>
--
Gitblit v1.10.0