From ad63cf4d78352153373252616c1cb5048b2ee41a Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Mon, 14 Jan 2008 18:53:41 +0000
Subject: [PATCH] Add support to admin framework for retrieving an i18n description of the constraints applicable to an aggregation property. This is required for issue 2004 (HTML configuration guide generation).
---
opends/src/admin/defn/org/opends/server/admin/std/DigestMD5SASLMechanismHandlerConfiguration.xml | 21 +
opends/src/admin/defn/org/opends/server/admin/std/LDAPConnectionHandlerConfiguration.xml | 64 ++++--
opends/src/admin/defn/org/opends/server/admin/std/NetworkGroupConfiguration.xml | 13 +
opends/src/admin/defn/org/opends/server/admin/std/JMXConnectionHandlerConfiguration.xml | 26 +-
opends/resource/admin/admin.xsd | 79 ++++++--
opends/src/admin/defn/org/opends/server/admin/std/PasswordModifyExtendedOperationHandlerConfiguration.xml | 21 +
opends/src/server/org/opends/server/admin/AggregationPropertyDefinition.java | 52 +++++
opends/src/admin/defn/org/opends/server/admin/std/LocalBackendWorkflowElementConfiguration.xml | 13 +
opends/resource/admin/messagesMO.xsl | 12 +
opends/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml | 13 +
opends/src/admin/defn/org/opends/server/admin/std/WorkflowConfiguration.xml | 13 +
opends/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java | 13 +
opends/src/admin/defn/org/opends/server/admin/std/PlainSASLMechanismHandlerConfiguration.xml | 21 +
opends/src/admin/defn/org/opends/server/admin/std/ExternalSASLMechanismHandlerConfiguration.xml | 21 +
opends/src/admin/defn/org/opends/server/admin/std/GSSAPISASLMechanismHandlerConfiguration.xml | 21 +
opends/src/admin/defn/org/opends/server/admin/std/PasswordPolicyConfiguration.xml | 58 ++++-
opends/src/admin/defn/org/opends/server/admin/std/CramMD5SASLMechanismHandlerConfiguration.xml | 21 +
opends/src/admin/defn/org/opends/server/admin/std/PasswordPolicyImportPluginConfiguration.xml | 42 +++-
18 files changed, 377 insertions(+), 147 deletions(-)
diff --git a/opends/resource/admin/admin.xsd b/opends/resource/admin/admin.xsd
index 61e07b3..121c9fd 100644
--- a/opends/resource/admin/admin.xsd
+++ b/opends/resource/admin/admin.xsd
@@ -1218,36 +1218,67 @@
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="target-needs-enabling-condition"
- minOccurs="0">
+ <xsd:element name="constraint" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
- A condition which indicates whether or not referenced
- managed objects must be enabled. The default behavior
- is that all referenced managed objects must be
- enabled.
+ An optional constraint on the relationship between
+ this managed object and referenced managed objects.
+ The constraint specifies when and how referenced
+ managed objects must be enabled.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
- <xsd:group ref="tns:condition-group" />
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="target-is-enabled-condition"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- A condition which indicates whether or not referenced
- managed objects are enabled. Managed objects are
- assumed to be enabled by default.
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:sequence>
- <xsd:group ref="tns:condition-group" />
- </xsd:sequence>
+ <xsd:element name="synopsis"
+ type="tns:rich-description-type">
+ <xsd:annotation>
+ <xsd:documentation>
+ A brief description of the constraints
+ applicable to referenced managed objects. The
+ description should describe, preferably in one
+ sentence, when referenced should be enabled and
+ how they should be enabled. The synopsis should
+ be suitable for use in applications such as
+ tool-tips, CLI help, and the summary description
+ in Javadoc. It is possible to embed rich content
+ including XHTML markup (this will only be used
+ where supported).
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="target-needs-enabling-condition"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ A condition which indicates whether or not
+ referenced managed objects must be enabled. The
+ default behavior is that all referenced managed
+ objects must be enabled.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="tns:condition-group" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="target-is-enabled-condition"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ A condition which indicates whether or not
+ referenced managed objects are enabled. Managed
+ objects are assumed to be enabled by default.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:sequence>
+ <xsd:group ref="tns:condition-group" />
+ </xsd:sequence>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
diff --git a/opends/resource/admin/messagesMO.xsl b/opends/resource/admin/messagesMO.xsl
index 44efad7..fc34635 100644
--- a/opends/resource/admin/messagesMO.xsl
+++ b/opends/resource/admin/messagesMO.xsl
@@ -22,7 +22,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -128,6 +128,16 @@
Process syntax related descriptions.
-->
<xsl:choose>
+ <xsl:when test="adm:syntax/adm:aggregation">
+ <!--
+ Process aggregation constraint synopsis (optional).
+ -->
+ <xsl:if
+ test="adm:syntax/adm:aggregation/adm:constraint/adm:synopsis">
+ <xsl:value-of
+ select="concat('property.', normalize-space(@name), '.syntax.aggregation.constraint-synopsis=', normalize-space(adm:syntax/adm:aggregation/adm:constraint/adm:synopsis), '
')" />
+ </xsl:if>
+ </xsl:when>
<xsl:when test="adm:syntax/adm:integer">
<!--
Process integer syntax unit synopsis (optional).
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/CramMD5SASLMechanismHandlerConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/CramMD5SASLMechanismHandlerConfiguration.xml
index 6e39247..9392b4f 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/CramMD5SASLMechanismHandlerConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/CramMD5SASLMechanismHandlerConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="cram-md5-sasl-mechanism-handler"
plural-name="cram-md5-sasl-mechanism-handlers"
@@ -59,12 +59,19 @@
<adm:syntax>
<adm:aggregation relation-name="identity-mapper"
parent-path="/">
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced identity mapper must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/DigestMD5SASLMechanismHandlerConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/DigestMD5SASLMechanismHandlerConfiguration.xml
index 25a92e7..538b10b 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/DigestMD5SASLMechanismHandlerConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/DigestMD5SASLMechanismHandlerConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="digest-md5-sasl-mechanism-handler"
plural-name="digest-md5-sasl-mechanism-handlers"
@@ -85,12 +85,19 @@
<adm:syntax>
<adm:aggregation relation-name="identity-mapper"
parent-path="/">
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced identity mapper must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/ExternalSASLMechanismHandlerConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/ExternalSASLMechanismHandlerConfiguration.xml
index 85d8168..f3a13bd 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/ExternalSASLMechanismHandlerConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/ExternalSASLMechanismHandlerConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="external-sasl-mechanism-handler"
plural-name="external-sasl-mechanism-handlers"
@@ -115,12 +115,19 @@
<adm:syntax>
<adm:aggregation relation-name="certificate-mapper"
parent-path="/">
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced certificate mapper must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/GSSAPISASLMechanismHandlerConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/GSSAPISASLMechanismHandlerConfiguration.xml
index af16386..54119ed 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/GSSAPISASLMechanismHandlerConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/GSSAPISASLMechanismHandlerConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="gssapi-sasl-mechanism-handler"
plural-name="gssapi-sasl-mechanism-handlers"
@@ -152,12 +152,19 @@
<adm:syntax>
<adm:aggregation relation-name="identity-mapper"
parent-path="/">
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced identity mapper must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml
index d17a1a3..a082507 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/GlobalConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="global" plural-name="globals"
package="org.opends.server.admin.std"
@@ -326,9 +326,14 @@
<adm:syntax>
<adm:aggregation relation-name="identity-mapper"
parent-path="/">
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced identity mapper must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/JMXConnectionHandlerConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/JMXConnectionHandlerConfiguration.xml
index 574784d..39e4023 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/JMXConnectionHandlerConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/JMXConnectionHandlerConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="jmx-connection-handler"
plural-name="jmx-connection-handlers"
@@ -92,15 +92,23 @@
<adm:syntax>
<adm:aggregation relation-name="key-manager-provider"
parent-path="/">
- <adm:target-needs-enabling-condition>
- <adm:and>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced key manager provider must be enabled when
+ the
+ <adm:user-friendly-name />
+ is enabled and configured to use SSL.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:and>
+ <adm:contains property="enabled" value="true" />
+ <adm:contains property="use-ssl" value="true" />
+ </adm:and>
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
<adm:contains property="enabled" value="true" />
- <adm:contains property="use-ssl" value="true" />
- </adm:and>
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/LDAPConnectionHandlerConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/LDAPConnectionHandlerConfiguration.xml
index 4f74a42..037118c 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/LDAPConnectionHandlerConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/LDAPConnectionHandlerConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="ldap-connection-handler"
plural-name="ldap-connection-handlers"
@@ -138,18 +138,26 @@
<adm:syntax>
<adm:aggregation relation-name="key-manager-provider"
parent-path="/">
- <adm:target-needs-enabling-condition>
- <adm:and>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced key manager provider must be enabled when
+ the
+ <adm:user-friendly-name />
+ is enabled and configured to use SSL or StartTLS.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:and>
+ <adm:contains property="enabled" value="true" />
+ <adm:or>
+ <adm:contains property="use-ssl" value="true" />
+ <adm:contains property="allow-start-tls" value="true" />
+ </adm:or>
+ </adm:and>
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
<adm:contains property="enabled" value="true" />
- <adm:or>
- <adm:contains property="use-ssl" value="true" />
- <adm:contains property="allow-start-tls" value="true" />
- </adm:or>
- </adm:and>
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
@@ -161,7 +169,7 @@
<adm:property name="trust-manager-provider">
<adm:synopsis>
Specifies the name of the trust manager that should be used with
- this
+ the
<adm:user-friendly-name />
.
</adm:synopsis>
@@ -180,18 +188,26 @@
<adm:syntax>
<adm:aggregation relation-name="trust-manager-provider"
parent-path="/">
- <adm:target-needs-enabling-condition>
- <adm:and>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced trust manager provider must be enabled when
+ the
+ <adm:user-friendly-name />
+ is enabled and configured to use SSL or StartTLS.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:and>
+ <adm:contains property="enabled" value="true" />
+ <adm:or>
+ <adm:contains property="use-ssl" value="true" />
+ <adm:contains property="allow-start-tls" value="true" />
+ </adm:or>
+ </adm:and>
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
<adm:contains property="enabled" value="true" />
- <adm:or>
- <adm:contains property="use-ssl" value="true" />
- <adm:contains property="allow-start-tls" value="true" />
- </adm:or>
- </adm:and>
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/LocalBackendWorkflowElementConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/LocalBackendWorkflowElementConfiguration.xml
index 93b7351..3b41d40 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/LocalBackendWorkflowElementConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/LocalBackendWorkflowElementConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="local-backend-workflow-element"
plural-name="local-backend-workflow-elements"
@@ -48,9 +48,14 @@
</adm:synopsis>
<adm:syntax>
<adm:aggregation relation-name="backend" parent-path="/">
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced backend must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/NetworkGroupConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/NetworkGroupConfiguration.xml
index 373f13b..ec1c9d4 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/NetworkGroupConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/NetworkGroupConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="network-group" plural-name="network-groups"
package="org.opends.server.admin.std"
@@ -89,9 +89,14 @@
</adm:synopsis>
<adm:syntax>
<adm:aggregation relation-name="workflow" parent-path="/">
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced workflows must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/PasswordModifyExtendedOperationHandlerConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/PasswordModifyExtendedOperationHandlerConfiguration.xml
index 2f9d0ef..5a8ee9c 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/PasswordModifyExtendedOperationHandlerConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/PasswordModifyExtendedOperationHandlerConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="password-modify-extended-operation-handler"
plural-name="password-modify-extended-operation-handlers"
@@ -74,12 +74,19 @@
<adm:syntax>
<adm:aggregation relation-name="identity-mapper"
parent-path="/">
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced identity mapper must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/PasswordPolicyConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/PasswordPolicyConfiguration.xml
index b618eb6..4919851 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/PasswordPolicyConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/PasswordPolicyConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="password-policy"
plural-name="password-policies" package="org.opends.server.admin.std"
@@ -66,9 +66,14 @@
<adm:syntax>
<adm:aggregation relation-name="password-storage-scheme"
parent-path="/">
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password storage schemes must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
@@ -95,9 +100,14 @@
<adm:syntax>
<adm:aggregation relation-name="password-storage-scheme"
parent-path="/">
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password storage schemes must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
@@ -117,9 +127,14 @@
<adm:syntax>
<adm:aggregation relation-name="password-validator"
parent-path="/">
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password validators must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
@@ -141,9 +156,15 @@
<adm:aggregation
relation-name="account-status-notification-handler"
parent-path="/">
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced account status notification handlers must be
+ enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
@@ -279,9 +300,14 @@
<adm:syntax>
<adm:aggregation relation-name="password-generator"
parent-path="/">
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password generator must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/PasswordPolicyImportPluginConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/PasswordPolicyImportPluginConfiguration.xml
index ea6226b..30a9461 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/PasswordPolicyImportPluginConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/PasswordPolicyImportPluginConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="password-policy-import-plugin"
plural-name="password-policy-import-plugins"
@@ -88,12 +88,20 @@
<adm:syntax>
<adm:aggregation relation-name="password-storage-scheme"
parent-path="/">
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password storage schemes must be enabled when
+ the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
@@ -126,12 +134,20 @@
<adm:syntax>
<adm:aggregation relation-name="password-storage-scheme"
parent-path="/">
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced password storage schemes must be enabled when
+ the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/PlainSASLMechanismHandlerConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/PlainSASLMechanismHandlerConfiguration.xml
index 6fd3910..e250c57 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/PlainSASLMechanismHandlerConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/PlainSASLMechanismHandlerConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="plain-sasl-mechanism-handler"
plural-name="plain-sasl-mechanism-handlers"
@@ -59,12 +59,19 @@
<adm:syntax>
<adm:aggregation relation-name="identity-mapper"
parent-path="/">
- <adm:target-needs-enabling-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-needs-enabling-condition>
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced identity mapper must be enabled when the
+ <adm:user-friendly-name />
+ is enabled.
+ </adm:synopsis>
+ <adm:target-needs-enabling-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-needs-enabling-condition>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/admin/defn/org/opends/server/admin/std/WorkflowConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/WorkflowConfiguration.xml
index 0998a54..bbe1a59 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/WorkflowConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/WorkflowConfiguration.xml
@@ -23,7 +23,7 @@
! CDDL HEADER END
!
!
- ! Portions Copyright 2007 Sun Microsystems, Inc.
+ ! Portions Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<adm:managed-object name="workflow" plural-name="workflows"
package="org.opends.server.admin.std"
@@ -92,9 +92,14 @@
<adm:syntax>
<adm:aggregation relation-name="workflow-element"
parent-path="/">
- <adm:target-is-enabled-condition>
- <adm:contains property="enabled" value="true" />
- </adm:target-is-enabled-condition>
+ <adm:constraint>
+ <adm:synopsis>
+ The referenced workflow element must be enabled.
+ </adm:synopsis>
+ <adm:target-is-enabled-condition>
+ <adm:contains property="enabled" value="true" />
+ </adm:target-is-enabled-condition>
+ </adm:constraint>
</adm:aggregation>
</adm:syntax>
<adm:profile name="ldap">
diff --git a/opends/src/server/org/opends/server/admin/AggregationPropertyDefinition.java b/opends/src/server/org/opends/server/admin/AggregationPropertyDefinition.java
index 2661aa0..cca6a9d 100644
--- a/opends/src/server/org/opends/server/admin/AggregationPropertyDefinition.java
+++ b/opends/src/server/org/opends/server/admin/AggregationPropertyDefinition.java
@@ -39,7 +39,9 @@
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
+import java.util.MissingResourceException;
import java.util.SortedSet;
import org.opends.messages.Message;
@@ -1021,13 +1023,61 @@
* @return Returns the constraint which should be enforced on the
* aggregating managed object.
*/
- public Constraint getSourceConstraint() {
+ public final Constraint getSourceConstraint() {
return sourceConstraint;
}
/**
+ * Gets the optional constraint synopsis of this aggregation
+ * property definition in the default locale. The constraint
+ * synopsis describes when and how referenced managed objects must
+ * be enabled. When there are no constraints between the source
+ * managed object and the objects it references through this
+ * aggregation, <code>null</code> is returned.
+ *
+ * @return Returns the optional constraint synopsis of this
+ * aggregation property definition in the default locale, or
+ * <code>null</code> if there is no constraint synopsis.
+ */
+ public final Message getSourceConstraintSynopsis() {
+ return getSourceConstraintSynopsis(Locale.getDefault());
+ }
+
+
+
+ /**
+ * Gets the optional constraint synopsis of this aggregation
+ * property definition in the specified locale.The constraint
+ * synopsis describes when and how referenced managed objects must
+ * be enabled. When there are no constraints between the source
+ * managed object and the objects it references through this
+ * aggregation, <code>null</code> is returned.
+ *
+ * @param locale
+ * The locale.
+ * @return Returns the optional constraint synopsis of this
+ * aggregation property definition in the specified locale,
+ * or <code>null</code> if there is no constraint
+ * synopsis.
+ */
+ public final Message getSourceConstraintSynopsis(Locale locale) {
+ ManagedObjectDefinitionI18NResource resource =
+ ManagedObjectDefinitionI18NResource.getInstance();
+ String property = "property." + getName()
+ + ".syntax.aggregation.constraint-synopsis";
+ try {
+ return resource
+ .getMessage(getManagedObjectDefinition(), property, locale);
+ } catch (MissingResourceException e) {
+ return null;
+ }
+ }
+
+
+
+ /**
* Gets the condition which is used to determine if a referenced
* managed object is enabled.
*
diff --git a/opends/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java b/opends/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java
index 2333668..18af66e 100644
--- a/opends/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java
+++ b/opends/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2007 Sun Microsystems, Inc.
+ * Portions Copyright 2007-2008 Sun Microsystems, Inc.
*/
package org.opends.server.tools.dsconfig;
@@ -48,6 +48,7 @@
import org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider;
import org.opends.server.admin.AbstractManagedObjectDefinition;
import org.opends.server.admin.AdministratorAction;
+import org.opends.server.admin.AggregationPropertyDefinition;
import org.opends.server.admin.AliasDefaultBehaviorProvider;
import org.opends.server.admin.DefaultBehaviorProviderVisitor;
import org.opends.server.admin.DefinedDefaultBehaviorProvider;
@@ -507,11 +508,21 @@
// Display the property synopsis and description.
app.println();
app.println(pd.getSynopsis(), 4);
+
if (pd.getDescription() != null) {
app.println();
app.println(pd.getDescription(), 4);
}
+ if (pd instanceof AggregationPropertyDefinition) {
+ AggregationPropertyDefinition<?, ?> apd =
+ (AggregationPropertyDefinition<?, ?>) pd;
+ if (apd.getSourceConstraintSynopsis() != null) {
+ app.println();
+ app.println(apd.getSourceConstraintSynopsis(), 4);
+ }
+ }
+
// Display the syntax.
app.println();
SyntaxPrinter syntaxPrinter = new SyntaxPrinter();
--
Gitblit v1.10.0