metaMO.xsl revision 1426
0N/A<!--
3137N/A ! CDDL HEADER START
0N/A !
0N/A ! The contents of this file are subject to the terms of the
0N/A ! Common Development and Distribution License, Version 1.0 only
0N/A ! (the "License"). You may not use this file except in compliance
0N/A ! with the License.
0N/A !
0N/A ! You can obtain a copy of the license at
0N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
0N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
0N/A ! See the License for the specific language governing permissions
0N/A ! and limitations under the License.
0N/A !
0N/A ! When distributing Covered Code, include this CDDL HEADER in each
0N/A ! file and include the License file at
0N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
0N/A ! add the following below this CDDL HEADER, with the fields enclosed
1472N/A ! by brackets "[]" replaced with your own identifying information:
1472N/A ! Portions Copyright [yyyy] [name of copyright owner]
1472N/A !
0N/A ! CDDL HEADER END
0N/A !
0N/A !
1879N/A ! Portions Copyright 2007 Sun Microsystems, Inc.
1879N/A ! -->
1879N/A<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
1879N/A xmlns:admpp="http://www.opends.org/admin-preprocessor"
1879N/A xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1879N/A xmlns:exsl="http://exslt.org/common">
1879N/A <xsl:import href="java-utilities.xsl" />
1879N/A <xsl:import href="preprocessor.xsl" />
1879N/A <xsl:import href="property-types.xsl" />
1879N/A <xsl:output method="text" encoding="us-ascii" />
1879N/A <!--
1879N/A Template for generating the class declaration.
1879N/A -->
1879N/A <xsl:template name="generate-meta-class-declaration">
1879N/A <xsl:value-of select="'/**&#xa;'" />
1879N/A <xsl:call-template name="add-java-comment">
1879N/A <xsl:with-param name="indent-text" select="' *'" />
2796N/A <xsl:with-param name="content"
2796N/A select="concat('An interface for querying the ', $this-ufn,
2796N/A ' managed object definition meta information.')" />
1879N/A </xsl:call-template>
0N/A <xsl:value-of select="' * &lt;p&gt;&#xa;'" />
0N/A <xsl:call-template name="add-java-comment">
0N/A <xsl:with-param name="indent-text" select="' *'" />
0N/A <xsl:with-param name="content" select="$this/adm:synopsis" />
0N/A </xsl:call-template>
0N/A <xsl:value-of select="' */&#xa;'" />
0N/A <xsl:value-of
0N/A select="concat('public final class ',
0N/A $this-java-class,
0N/A 'CfgDefn extends ')" />
0N/A <xsl:choose>
141N/A <xsl:when test="$this-is-abstract">
0N/A <xsl:value-of
0N/A select="concat('AbstractManagedObjectDefinition&lt;',
0N/A $this-java-class, 'CfgClient, ',
0N/A $this-java-class, 'Cfg&gt; {&#xa;')" />
0N/A </xsl:when>
0N/A <xsl:otherwise>
0N/A <xsl:value-of
0N/A select="concat('ManagedObjectDefinition&lt;',
0N/A $this-java-class, 'CfgClient, ',
0N/A $this-java-class, 'Cfg&gt; {&#xa;')" />
0N/A </xsl:otherwise>
0N/A </xsl:choose>
0N/A </xsl:template>
0N/A <!--
0N/A Template for generating the meta class body.
0N/A -->
0N/A <xsl:template name="generate-meta-class-body">
0N/A <!--
3137N/A Singleton configuration definition instance.
0N/A -->
3137N/A <xsl:value-of
0N/A select="concat(' // The singleton configuration definition instance.&#xa;',
0N/A ' private static final ',
0N/A $this-java-class ,
0N/A 'CfgDefn INSTANCE = new ', $this-java-class, 'CfgDefn();&#xa;')" />
0N/A <!--
0N/A Generate enumerations defined by this managed object..
1123N/A -->
0N/A <xsl:for-each
0N/A select="$this-local-properties[adm:syntax/adm:enumeration]">
1123N/A <xsl:sort select="@name" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:call-template name="generate-enumeration" />
1123N/A </xsl:for-each>
0N/A <!--
0N/A Generate declarations for properties defined or
1123N/A overridden by this managed object.
0N/A -->
0N/A <xsl:for-each select="$this-local-properties">
0N/A <xsl:sort select="@name" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
1601N/A <xsl:call-template name="generate-property-declaration" />
1601N/A </xsl:for-each>
3029N/A <!--
3029N/A Generate declarations for relations.
3029N/A -->
1601N/A <xsl:for-each select="$this-local-relations">
0N/A <xsl:sort select="@name" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:call-template name="generate-relation-declaration" />
0N/A </xsl:for-each>
0N/A <!--
0N/A Generate constructors for properties defined or
0N/A overridden by this managed object.
0N/A -->
0N/A <xsl:for-each select="$this-local-properties">
0N/A <xsl:sort select="@name" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:call-template name="generate-property-constructor" />
0N/A </xsl:for-each>
0N/A <!--
0N/A Generate constructors for relations.
0N/A -->
0N/A <xsl:for-each select="$this-local-relations">
0N/A <xsl:sort select="@name" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:call-template name="generate-relation-constructor" />
0N/A </xsl:for-each>
342N/A <!--
342N/A Configuration definition singleton getter.
342N/A -->
342N/A <xsl:text>&#xa;</xsl:text>
342N/A <xsl:text>&#xa;</xsl:text>
342N/A <xsl:text>&#xa;</xsl:text>
342N/A <xsl:value-of select="' /**&#xa;'" />
342N/A <xsl:call-template name="add-java-comment">
342N/A <xsl:with-param name="indent-text" select="' *'" />
342N/A <xsl:with-param name="content"
342N/A select="concat('Get the ', $this-ufn,' configuration definition singleton.')" />
342N/A </xsl:call-template>
0N/A <xsl:value-of select="' *&#xa;'" />
0N/A <xsl:call-template name="add-java-comment">
0N/A <xsl:with-param name="indent-text" select="' *'" />
548N/A <xsl:with-param name="indent-text2" select="' * '" />
548N/A <xsl:with-param name="content"
0N/A select="concat('@return Returns the ', $this-ufn,
0N/A ' configuration definition singleton.')" />
0N/A </xsl:call-template>
0N/A <xsl:value-of select="' */&#xa;'" />
0N/A <xsl:value-of
0N/A select="concat(' public static ',
0N/A $this-java-class ,
0N/A 'CfgDefn getInstance() {&#xa;',
0N/A ' return INSTANCE;&#xa;',
0N/A ' }&#xa;')" />
0N/A <!--
0N/A Private constructor.
0N/A -->
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:value-of
0N/A select="concat(' /**&#xa;',
0N/A ' * Private constructor.&#xa;',
1123N/A ' */&#xa;',
0N/A ' private ',
0N/A $this-java-class ,
0N/A 'CfgDefn() {&#xa;')" />
0N/A <xsl:choose>
0N/A <xsl:when test="boolean($this/@extends)">
0N/A <xsl:value-of
0N/A select="concat(' super(&quot;',
0N/A $this/@name,
0N/A '&quot;, ',
0N/A $parent-java-class,
0N/A 'CfgDefn.getInstance());&#xa;')" />
0N/A </xsl:when>
0N/A <xsl:otherwise>
0N/A <xsl:value-of
0N/A select="concat(' super(&quot;',
0N/A $this/@name,
0N/A '&quot;, null);&#xa;')" />
2842N/A </xsl:otherwise>
2842N/A </xsl:choose>
2842N/A <xsl:value-of select="concat(' }&#xa;')" />
0N/A <!--
0N/A Create configuration view factory methods for non-abstract definitions
0N/A -->
0N/A <xsl:if test="not($this-is-abstract)">
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <!--
0N/A Generate configuration client factory method.
0N/A -->
0N/A <xsl:value-of
0N/A select="concat(' /**&#xa;',
0N/A ' * {@inheritDoc}&#xa;',
0N/A ' */&#xa;',
0N/A ' public ',
0N/A $this-java-class,
0N/A 'CfgClient createClientConfiguration(&#xa;',
0N/A ' ManagedObject&lt;? extends ',
0N/A $this-java-class,
0N/A 'CfgClient&gt; impl) {&#xa;',
0N/A ' return new ',
0N/A $this-java-class ,
0N/A 'CfgClientImpl(impl);&#xa;',
0N/A ' }&#xa;')" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
2684N/A <!--
0N/A Generate configuration server factory method.
0N/A -->
0N/A <xsl:value-of
0N/A select="concat(' /**&#xa;',
2684N/A ' * {@inheritDoc}&#xa;',
2684N/A ' */&#xa;',
0N/A ' public ',
0N/A $this-java-class,
0N/A 'Cfg createServerConfiguration(&#xa;',
0N/A ' ServerManagedObject&lt;? extends ',$this-java-class,'Cfg&gt; impl) {&#xa;',
0N/A ' return new ',
0N/A $this-java-class ,
0N/A 'CfgServerImpl(impl);&#xa;',
0N/A ' }&#xa;')" />
0N/A <xsl:text>&#xa;</xsl:text>
4373N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <!--
0N/A Generate configuration server class getter..
656N/A -->
656N/A <xsl:value-of
656N/A select="concat(' /**&#xa;',
656N/A ' * {@inheritDoc}&#xa;',
0N/A ' */&#xa;',
0N/A ' public Class&lt;',
237N/A $this-java-class,
237N/A 'Cfg&gt; getServerConfigurationClass() {&#xa;',
237N/A ' return ',
477N/A $this-java-class ,
237N/A 'Cfg.class;&#xa;',
0N/A ' }&#xa;')" />
0N/A </xsl:if>
1320N/A <!--
1320N/A Generate property definition getters for all properties.
1320N/A -->
0N/A <xsl:for-each select="$this-all-properties">
0N/A <xsl:sort select="@name" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:call-template name="generate-property-definition-getter" />
0N/A </xsl:for-each>
3014N/A <!--
0N/A Generate relation definition getters for all relations.
0N/A -->
0N/A <xsl:for-each select="$this-all-relations">
141N/A <xsl:sort select="@name" />
141N/A <xsl:text>&#xa;</xsl:text>
141N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:call-template name="generate-relation-definition-getter" />
0N/A </xsl:for-each>
0N/A <!--
0N/A Managed object class implementations.
0N/A -->
0N/A <xsl:if test="not($this-is-abstract)">
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:call-template name="generate-client-impl-class" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:call-template name="generate-server-impl-class" />
0N/A </xsl:if>
656N/A </xsl:template>
656N/A <!--
0N/A Generate managed object client class implementation.
2415N/A -->
0N/A <xsl:template name="generate-client-impl-class">
0N/A <!--
79N/A Declaration.
0N/A -->
0N/A <xsl:value-of
0N/A select="concat(' /**&#xa;',
0N/A ' * Managed object client implementation.&#xa;',
0N/A ' */&#xa;',
0N/A ' private static class ',
0N/A $this-java-class ,
0N/A 'CfgClientImpl implements&#xa; ',
0N/A $this-java-class ,
0N/A 'CfgClient {&#xa;')" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <!--
0N/A Private instance.
0N/A -->
0N/A <xsl:value-of
0N/A select="concat(' // Private implementation.&#xa;',
0N/A ' private ManagedObject&lt;? extends ',
0N/A $this-java-class,
0N/A 'CfgClient&gt; impl;&#xa;')" />
0N/A <!--
0N/A Private constructor.
0N/A -->
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:value-of
0N/A select="concat(' // Private constructor.&#xa;',
0N/A ' private ',
0N/A $this-java-class,
0N/A 'CfgClientImpl(&#xa;',
0N/A ' ManagedObject&lt;? extends ',
0N/A $this-java-class,
0N/A 'CfgClient&gt; impl) {&#xa;',
0N/A ' this.impl = impl;&#xa;',
0N/A ' }&#xa;')" />
0N/A <!--
0N/A Getters/Setters for all properties.
0N/A -->
0N/A <xsl:for-each select="$this-all-properties">
0N/A <xsl:sort select="@name" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
1078N/A <xsl:call-template name="generate-property-getter">
1078N/A <xsl:with-param name="interface" select="'client'" />
1078N/A </xsl:call-template>
1078N/A <xsl:text>&#xa;</xsl:text>
1078N/A <xsl:text>&#xa;</xsl:text>
1078N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:call-template name="generate-property-setter" />
1078N/A </xsl:for-each>
1078N/A <!--
0N/A Relation methods.
0N/A -->
0N/A <xsl:for-each select="$this-all-relations">
0N/A <xsl:sort select="@name" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:call-template name="generate-client-relation-methods" />
0N/A </xsl:for-each>
0N/A <!--
0N/A Managed object definition getter.
0N/A -->
1601N/A <xsl:text>&#xa;</xsl:text>
1601N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:value-of
0N/A select="concat(' /**&#xa;',
0N/A ' * {@inheritDoc}&#xa;',
0N/A ' */&#xa;',
0N/A ' public ManagedObjectDefinition&lt;? extends ', $this-java-class,'CfgClient, ? extends ', $this-java-class,'Cfg&gt; definition() {&#xa;',
0N/A ' return INSTANCE;&#xa;',
0N/A ' }&#xa;')" />
0N/A <!--
0N/A Property provider view.
0N/A -->
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:value-of
0N/A select="concat(' /**&#xa;',
0N/A ' * {@inheritDoc}&#xa;',
0N/A ' */&#xa;',
0N/A ' public PropertyProvider properties() {&#xa;',
0N/A ' return impl;&#xa;',
0N/A ' }&#xa;')" />
0N/A <!--
0N/A Commit method.
0N/A -->
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:value-of
0N/A select="concat(' /**&#xa;',
0N/A ' * {@inheritDoc}&#xa;',
0N/A ' */&#xa;',
0N/A ' public void commit() throws ManagedObjectAlreadyExistsException,&#xa;',
0N/A ' MissingMandatoryPropertiesException, ConcurrentModificationException,&#xa;',
0N/A ' OperationRejectedException, AuthorizationException,&#xa;',
0N/A ' CommunicationException {&#xa;',
0N/A ' impl.commit();&#xa;',
0N/A ' }&#xa;')" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:value-of select="' }&#xa;'" />
0N/A </xsl:template>
0N/A <!--
0N/A Generate managed object server class implementation.
0N/A -->
0N/A <xsl:template name="generate-server-impl-class">
0N/A <!--
0N/A Declaration.
0N/A -->
0N/A <xsl:value-of
0N/A select="concat(' /**&#xa;',
0N/A ' * Managed object server implementation.&#xa;',
0N/A ' */&#xa;',
0N/A ' private static class ',
0N/A $this-java-class ,
0N/A 'CfgServerImpl implements&#xa; ',
0N/A $this-java-class ,
0N/A 'Cfg {&#xa;')" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <!--
0N/A Private instance.
0N/A -->
0N/A <xsl:value-of
0N/A select="concat(' // Private implementation.&#xa;',
0N/A ' private ServerManagedObject&lt;? extends ', $this-java-class, 'Cfg&gt; impl;&#xa;')" />
0N/A <!--
0N/A Private constructor.
0N/A -->
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:value-of
0N/A select="concat(' // Private constructor.&#xa;',
1887N/A ' private ',
1887N/A $this-java-class,
1887N/A 'CfgServerImpl(ServerManagedObject&lt;? extends ', $this-java-class, 'Cfg&gt; impl) {&#xa;',
1887N/A ' this.impl = impl;&#xa;',
1887N/A ' }&#xa;')" />
1887N/A <!--
1887N/A Generate all the change listener methods - one for each managed
1887N/A object in the hierarchy.
1887N/A -->
1887N/A <xsl:if test="not($this-is-root)">
1887N/A <xsl:text>&#xa;</xsl:text>
1887N/A <xsl:text>&#xa;</xsl:text>
1887N/A <xsl:text>&#xa;</xsl:text>
1887N/A <xsl:call-template name="generate-change-listener" />
1887N/A </xsl:if>
1887N/A <!--
0N/A Getters/Setters for all properties.
0N/A -->
0N/A <xsl:for-each select="$this-all-properties">
0N/A <xsl:sort select="@name" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:call-template name="generate-property-getter">
0N/A <xsl:with-param name="interface" select="'server'" />
0N/A </xsl:call-template>
0N/A </xsl:for-each>
0N/A <!--
242N/A Relation methods.
242N/A -->
242N/A <xsl:for-each select="$this-all-relations">
242N/A <xsl:sort select="@name" />
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:call-template name="generate-server-relation-methods" />
0N/A </xsl:for-each>
0N/A <!--
0N/A Configuration definition getter.
0N/A -->
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:value-of
0N/A select="concat(' /**&#xa;',
0N/A ' * {@inheritDoc}&#xa;',
0N/A ' */&#xa;',
0N/A ' public ManagedObjectDefinition&lt;? extends ', $this-java-class,'CfgClient, ? extends ', $this-java-class,'Cfg&gt; definition() {&#xa;',
0N/A ' return INSTANCE;&#xa;',
0N/A ' }&#xa;')" />
0N/A <!--
0N/A Property provider view.
0N/A -->
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
242N/A <xsl:text>&#xa;</xsl:text>
242N/A <xsl:value-of
242N/A select="concat(' /**&#xa;',
1887N/A ' * {@inheritDoc}&#xa;',
1887N/A ' */&#xa;',
1887N/A ' public PropertyProvider properties() {&#xa;',
0N/A ' return impl;&#xa;',
0N/A ' }&#xa;')" />
0N/A <!--
3380N/A Configuration entry DN getter.
0N/A -->
2625N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:text>&#xa;</xsl:text>
0N/A <xsl:value-of
0N/A select="concat(' /**&#xa;',
1827N/A ' * {@inheritDoc}&#xa;',
0N/A ' */&#xa;',
0N/A ' public DN dn() {&#xa;',
0N/A ' return impl.getDN();&#xa;',
0N/A ' }&#xa;')" />
1827N/A <xsl:text>&#xa;</xsl:text>
1887N/A <xsl:value-of select="' }&#xa;'" />
3030N/A </xsl:template>
1601N/A <!--
2149N/A Generate a property definition constructor.
2149N/A -->
2149N/A <xsl:template name="generate-property-declaration">
2149N/A <xsl:variable name="java-prop-name">
2149N/A <xsl:call-template name="name-to-java-constant">
2149N/A <xsl:with-param name="value" select="@name" />
0N/A </xsl:call-template>
0N/A </xsl:variable>
0N/A <xsl:variable name="type">
0N/A <xsl:call-template name="get-property-definition-type" />
0N/A </xsl:variable>
0N/A <xsl:variable name="generic-type">
0N/A <xsl:call-template name="get-property-definition-generic-type" />
0N/A </xsl:variable>
0N/A <xsl:variable name="pdtype">
0N/A <xsl:choose>
0N/A <xsl:when test="string-length($generic-type) != 0">
0N/A <xsl:value-of
0N/A select="concat($type, '&lt;', $generic-type, '&gt;')" />
0N/A </xsl:when>
0N/A <xsl:otherwise>
0N/A <xsl:value-of select="$type" />
0N/A </xsl:otherwise>
0N/A </xsl:choose>
0N/A </xsl:variable>
0N/A <xsl:value-of
0N/A select="concat(' // The &quot;',
0N/A @name,
0N/A '&quot; property definition.&#xa;',
0N/A ' private static final ', $pdtype, ' PD_', $java-prop-name, ';&#xa;')" />
0N/A </xsl:template>
0N/A <!--
1887N/A Generate a property definition constructor.
0N/A -->
0N/A <xsl:template name="generate-property-constructor">
1601N/A <xsl:variable name="java-prop-name">
1601N/A <xsl:call-template name="name-to-java-constant">
1601N/A <xsl:with-param name="value" select="@name" />
0N/A </xsl:call-template>
0N/A </xsl:variable>
0N/A <xsl:variable name="type">
0N/A <xsl:call-template name="get-property-definition-type" />
0N/A </xsl:variable>
0N/A <xsl:variable name="generic-type">
0N/A <xsl:call-template name="get-property-definition-generic-type" />
0N/A </xsl:variable>
0N/A <xsl:variable name="value-type">
0N/A <xsl:call-template name="get-property-java-type" />
0N/A </xsl:variable>
0N/A <xsl:value-of
0N/A select="concat(' // Build the &quot;', @name, '&quot; property definition.&#xa;',
0N/A ' static {&#xa;')" />
0N/A <xsl:choose>
0N/A <xsl:when test="string-length($generic-type) != 0">
0N/A <xsl:value-of
0N/A select="concat(' ', $type, '.Builder&lt;', $generic-type, '&gt; builder = ', $type, '.createBuilder(INSTANCE, &quot;',@name, '&quot;);&#xa;')" />
0N/A </xsl:when>
0N/A <xsl:otherwise>
0N/A <xsl:value-of
0N/A select="concat(' ', $type, '.Builder builder = ', $type, '.createBuilder(INSTANCE, &quot;',@name, '&quot;);&#xa;')" />
0N/A </xsl:otherwise>
0N/A </xsl:choose>
0N/A <xsl:if test="@multi-valued='true'">
0N/A <xsl:value-of
0N/A select="' builder.setOption(PropertyOption.MULTI_VALUED);&#xa;'" />
0N/A </xsl:if>
0N/A <xsl:if test="@read-only='true'">
0N/A <xsl:value-of
0N/A select="' builder.setOption(PropertyOption.READ_ONLY);&#xa;'" />
0N/A </xsl:if>
0N/A <xsl:if test="@monitoring='true'">
0N/A <xsl:value-of
0N/A select="' builder.setOption(PropertyOption.MONITORING);&#xa;'" />
2122N/A </xsl:if>
2122N/A <xsl:if
2122N/A test="adm:requires-admin-action/adm:server-restart|adm:requires-admin-action/adm:component-restart|adm:requires-admin-action/adm:other">
2122N/A <xsl:value-of
0N/A select="' builder.setOption(PropertyOption.REQUIRES_ADMIN_ACTION);&#xa;'" />
0N/A </xsl:if>
1887N/A <xsl:if test="@mandatory='true'">
1887N/A <xsl:value-of
1887N/A select="' builder.setOption(PropertyOption.MANDATORY);&#xa;'" />
1887N/A </xsl:if>
2993N/A <xsl:if test="@hidden='true'">
2993N/A <xsl:value-of
2993N/A select="' builder.setOption(PropertyOption.HIDDEN);&#xa;'" />
1887N/A </xsl:if>
1887N/A <xsl:if
2993N/A test="not(@mandatory='true') and not(adm:default-behavior)">
2993N/A <xsl:message terminate="yes">
2993N/A <xsl:value-of
2993N/A select="concat('No default behavior defined for non-mandatory property &quot;', @name,
2993N/A '&quot;.')" />
2993N/A </xsl:message>
2993N/A </xsl:if>
2993N/A <xsl:choose>
2993N/A <xsl:when test="not(adm:default-behavior) or adm:default-behavior/adm:undefined">
1887N/A <xsl:value-of
1887N/A select="concat(' builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider&lt;', $value-type,'&gt;());&#xa;')" />
2993N/A </xsl:when>
1887N/A <xsl:when test="adm:default-behavior/adm:alias">
2993N/A <xsl:value-of
1887N/A select="concat(' builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider&lt;', $value-type,'&gt;(INSTANCE, &quot;', @name, '&quot;));&#xa;')" />
1887N/A </xsl:when>
2993N/A <xsl:when test="adm:default-behavior/adm:defined">
1887N/A <xsl:value-of
0N/A select="concat(' DefaultBehaviorProvider&lt;', $value-type,'&gt; provider = ',
0N/A 'new DefinedDefaultBehaviorProvider&lt;', $value-type,'&gt;(')" />
0N/A <xsl:for-each
0N/A select="adm:default-behavior/adm:defined/adm:value">
0N/A <xsl:value-of
0N/A select="concat('&quot;', normalize-space(), '&quot;')" />
0N/A <xsl:if test="position() != last()">
0N/A <xsl:value-of select="', '" />
0N/A </xsl:if>
0N/A </xsl:for-each>
0N/A <xsl:value-of select="');&#xa;'" />
0N/A <xsl:value-of
0N/A select="' builder.setDefaultBehaviorProvider(provider);&#xa;'" />
0N/A </xsl:when>
0N/A <xsl:when
0N/A test="adm:default-behavior/adm:inherited/adm:relative">
0N/A <xsl:value-of
0N/A select="concat(' DefaultBehaviorProvider&lt;', $value-type,'&gt; provider = ',
0N/A 'new RelativeInheritedDefaultBehaviorProvider&lt;', $value-type,'&gt;(')" />
0N/A <xsl:variable name="managed-object-name">
0N/A <xsl:call-template name="name-to-java">
0N/A <xsl:with-param name="value"
0N/A select="adm:default-behavior/adm:inherited/adm:relative/@managed-object-name" />
2085N/A </xsl:call-template>
2085N/A </xsl:variable>
2085N/A <xsl:variable name="property-name"
0N/A select="adm:default-behavior/adm:inherited/adm:relative/@property-name" />
0N/A <xsl:variable name="offset"
0N/A select="adm:default-behavior/adm:inherited/adm:relative/@offset" />
0N/A <xsl:value-of
0N/A select="concat($managed-object-name, 'CfgDefn.getInstance(), &quot;', $property-name, '&quot;, ', $offset, ');&#xa;')" />
0N/A <xsl:value-of
0N/A select="' builder.setDefaultBehaviorProvider(provider);&#xa;'" />
0N/A </xsl:when>
0N/A <xsl:when
0N/A test="adm:default-behavior/adm:inherited/adm:absolute">
0N/A <xsl:value-of
0N/A select="concat(' DefaultBehaviorProvider&lt;', $value-type,'&gt; provider = ',
0N/A 'new AbsoluteInheritedDefaultBehaviorProvider&lt;', $value-type,'&gt;(')" />
0N/A <xsl:variable name="property-name"
0N/A select="adm:default-behavior/adm:inherited/adm:absolute/@property-name" />
0N/A <xsl:variable name="path"
0N/A select="adm:default-behavior/adm:inherited/adm:absolute/@path" />
0N/A <xsl:value-of
0N/A select="concat('ManagedObjectPath.valueOf(&quot;', $path, '&quot;), &quot;', $property-name, '&quot;);&#xa;')" />
0N/A <xsl:value-of
0N/A select="' builder.setDefaultBehaviorProvider(provider);&#xa;'" />
0N/A </xsl:when>
0N/A <xsl:otherwise>
0N/A <xsl:message terminate="yes">
0N/A <xsl:value-of
0N/A select="concat('Unrecognized default behavior type for property &quot;', @name,
0N/A '&quot;.')" />
0N/A </xsl:message>
0N/A </xsl:otherwise>
0N/A </xsl:choose>
0N/A <xsl:call-template name="get-property-definition-ctor" />
0N/A <xsl:value-of
0N/A select="concat(' PD_', $java-prop-name, ' = builder.getInstance();&#xa;')" />
0N/A <xsl:value-of
2316N/A select="concat(' INSTANCE.registerPropertyDefinition(PD_', $java-prop-name, ');&#xa;')" />
2316N/A <xsl:value-of select="' }&#xa;'" />
2316N/A </xsl:template>
2316N/A <!--
3029N/A Generate a relation definition declaration.
3029N/A -->
3029N/A <xsl:template name="generate-relation-declaration">
3029N/A <xsl:variable name="relation-name">
3029N/A <xsl:choose>
0N/A <xsl:when test="adm:one-to-many">
1879N/A <xsl:value-of select="adm:one-to-many/@plural-name" />
1879N/A </xsl:when>
3380N/A <xsl:otherwise>
1879N/A <xsl:value-of select="@name" />
1879N/A </xsl:otherwise>
1879N/A </xsl:choose>
3380N/A </xsl:variable>
1879N/A <xsl:variable name="java-relation-name">
1879N/A <xsl:call-template name="name-to-java-constant">
1879N/A <xsl:with-param name="value" select="$relation-name" />
1879N/A </xsl:call-template>
2796N/A </xsl:variable>
3380N/A <xsl:variable name="java-managed-object-name">
2796N/A <xsl:call-template name="name-to-java">
2796N/A <xsl:with-param name="value" select="@managed-object-name" />
1879N/A </xsl:call-template>
1879N/A </xsl:variable>
1879N/A <xsl:value-of
1879N/A select="concat(' // The &quot;',
1879N/A $relation-name,
1879N/A '&quot; relation definition.&#xa;',
1879N/A ' private static final ')" />
1879N/A <xsl:choose>
1879N/A <xsl:when test="adm:one-to-one">
1879N/A <xsl:text>SingletonRelationDefinition&lt;</xsl:text>
1879N/A </xsl:when>
1879N/A <xsl:when test="adm:one-to-zero-or-one">
1879N/A <xsl:text>OptionalRelationDefinition&lt;</xsl:text>
1879N/A </xsl:when>
1879N/A <xsl:when test="adm:one-to-many">
1879N/A <xsl:text>InstantiableRelationDefinition&lt;</xsl:text>
1879N/A </xsl:when>
1879N/A <xsl:otherwise>
2073N/A <xsl:message terminate="yes">
2073N/A <xsl:value-of
2073N/A select="concat('Unknown relation type &quot;', local-name(*), '&quot; in relation &quot;', @name, '&quot;.')" />
2073N/A </xsl:message>
2073N/A </xsl:otherwise>
2073N/A </xsl:choose>
2796N/A <xsl:value-of
2796N/A select="concat($java-managed-object-name, 'CfgClient, ', $java-managed-object-name, 'Cfg&gt; RD_', $java-relation-name, ';&#xa;')" />
2796N/A </xsl:template>
2796N/A <!--
2796N/A Generate a relation definition constructor.
2796N/A -->
1879N/A <xsl:template name="generate-relation-constructor">
3029N/A <xsl:variable name="relation-name">
1601N/A <xsl:choose>
1601N/A <xsl:when test="adm:one-to-many">
0N/A <xsl:value-of select="adm:one-to-many/@plural-name" />
0N/A </xsl:when>
0N/A <xsl:otherwise>
0N/A <xsl:value-of select="@name" />
0N/A </xsl:otherwise>
0N/A </xsl:choose>
0N/A </xsl:variable>
3137N/A <xsl:variable name="java-relation-name">
0N/A <xsl:call-template name="name-to-java-constant">
0N/A <xsl:with-param name="value" select="$relation-name" />
0N/A </xsl:call-template>
0N/A </xsl:variable>
0N/A <xsl:variable name="java-managed-object-name">
0N/A <xsl:call-template name="name-to-java">
0N/A <xsl:with-param name="value" select="@managed-object-name" />
0N/A </xsl:call-template>
0N/A </xsl:variable>
0N/A <xsl:value-of
0N/A select="concat(' // Build the &quot;', $relation-name, '&quot; relation definition.&#xa;',
0N/A ' static {&#xa;',
0N/A ' RD_', $java-relation-name, ' = new ')" />
0N/A <xsl:choose>
0N/A <xsl:when test="adm:one-to-one">
0N/A <xsl:text>SingletonRelationDefinition&lt;</xsl:text>
0N/A </xsl:when>
0N/A <xsl:when test="adm:one-to-zero-or-one">
0N/A <xsl:text>OptionalRelationDefinition&lt;</xsl:text>
0N/A </xsl:when>
691N/A <xsl:when test="adm:one-to-many">
0N/A <xsl:text>InstantiableRelationDefinition&lt;</xsl:text>
0N/A </xsl:when>
0N/A <xsl:otherwise>
0N/A <xsl:message terminate="yes">
0N/A <xsl:value-of
0N/A select="concat('Unknown relation type &quot;', local-name(*), '&quot; in relation &quot;', @name, '&quot;.')" />
0N/A </xsl:message>
0N/A </xsl:otherwise>
0N/A </xsl:choose>
0N/A <xsl:value-of
1879N/A select="concat($java-managed-object-name, 'CfgClient, ', $java-managed-object-name, 'Cfg&gt;(&#xa;',
1879N/A ' INSTANCE, &quot;', @name, '&quot;, ')" />
<xsl:if test="adm:one-to-many">
<xsl:value-of
select="concat('&quot;', adm:one-to-many/@plural-name, '&quot;, ')" />
</xsl:if>
<xsl:value-of
select="concat($java-managed-object-name, 'CfgDefn.getInstance());&#xa;')" />
<xsl:value-of
select="concat(' INSTANCE.registerRelationDefinition(RD_', $java-relation-name,');&#xa;')" />
<xsl:value-of select="' }&#xa;'" />
</xsl:template>
<!--
Generate a property definition getter for a locally defined
or overriden property.
-->
<xsl:template name="generate-property-definition-getter">
<xsl:variable name="java-prop-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="@name" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="java-prop-name-constant">
<xsl:call-template name="name-to-java-constant">
<xsl:with-param name="value" select="@name" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="type">
<xsl:call-template name="get-property-definition-type" />
</xsl:variable>
<xsl:variable name="generic-type">
<xsl:call-template name="get-property-definition-generic-type" />
</xsl:variable>
<xsl:variable name="pdtype">
<xsl:choose>
<xsl:when test="string-length($generic-type) != 0">
<xsl:value-of
select="concat($type, '&lt;', $generic-type, '&gt;')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$type" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of
select="concat(' /**&#xa;',
' * Get the &quot;',
@name,
'&quot; property definition.&#xa;')" />
<xsl:if test="adm:synopsis">
<xsl:value-of select="' * &lt;p&gt;&#xa;'" />
<xsl:call-template name="add-java-comment">
<xsl:with-param name="indent-text" select="' *'" />
<xsl:with-param name="content" select="adm:synopsis" />
</xsl:call-template>
</xsl:if>
<xsl:if test="adm:description">
<xsl:value-of select="' * &lt;p&gt;&#xa;'" />
<xsl:call-template name="add-java-comment">
<xsl:with-param name="indent-text" select="' *'" />
<xsl:with-param name="content" select="adm:description" />
</xsl:call-template>
</xsl:if>
<xsl:choose>
<xsl:when
test="adm:profile[@name='preprocessor']/admpp:managed-object[@name=$this-name and @package=$this-package]">
<xsl:value-of
select="concat(' *&#xa;',
' * @return Returns the &quot;',
@name,
'&quot; property definition.&#xa;',
' */&#xa;',
' public ',
$pdtype,
' get',
$java-prop-name,
'PropertyDefinition() {&#xa;' ,
' return PD_',
$java-prop-name-constant ,
';&#xa;' ,
' }&#xa;')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="concat(' *&#xa;',
' * @return Returns the &quot;',
@name,
'&quot; property definition.&#xa;',
' */&#xa;',
' public ',
$pdtype,
' get',
$java-prop-name,
'PropertyDefinition() {&#xa;' ,
' return ',
$parent-java-class, 'CfgDefn.getInstance().get',
$java-prop-name,
'PropertyDefinition();&#xa;',
' }&#xa;')" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
Generate a relation definition getter.
-->
<xsl:template name="generate-relation-definition-getter">
<xsl:variable name="relation-name">
<xsl:choose>
<xsl:when test="adm:one-to-many">
<xsl:value-of select="adm:one-to-many/@plural-name" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@name" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="java-relation-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="$relation-name" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="java-relation-name-constant">
<xsl:call-template name="name-to-java-constant">
<xsl:with-param name="value" select="$relation-name" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of
select="concat(' /**&#xa;',
' * Get the &quot;',
$relation-name,
'&quot; relation definition.&#xa;',
' *&#xa;',
' * @return Returns the &quot;',
$relation-name,
'&quot; relation definition.&#xa;',
' */&#xa;',
' public ')" />
<xsl:choose>
<xsl:when test="adm:one-to-one">
<xsl:text>SingletonRelationDefinition&lt;</xsl:text>
</xsl:when>
<xsl:when test="adm:one-to-zero-or-one">
<xsl:text>OptionalRelationDefinition&lt;</xsl:text>
</xsl:when>
<xsl:when test="adm:one-to-many">
<xsl:text>InstantiableRelationDefinition&lt;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:value-of
select="concat('Unknown relation type &quot;', local-name(*), '&quot; in relation &quot;', @name, '&quot;.')" />
</xsl:message>
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="java-managed-object-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="@managed-object-name" />
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when
test="adm:profile[@name='preprocessor']/admpp:managed-object[@name=$this-name and @package=$this-package]">
<xsl:value-of
select="concat($java-managed-object-name, 'CfgClient,',
$java-managed-object-name, 'Cfg&gt; get',
$java-relation-name,
'RelationDefinition() {&#xa;' ,
' return RD_',
$java-relation-name-constant,
';&#xa;' ,
' }&#xa;')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="concat($java-managed-object-name, 'CfgClient,',
$java-managed-object-name, 'Cfg&gt; get',
$java-relation-name,
'RelationDefinition() {&#xa;' ,
' return ',
$parent-java-class, 'CfgDefn.getInstance().get',
$java-relation-name,
'RelationDefinition();&#xa;',
' }&#xa;')" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
Generate a property value getter.
-->
<xsl:template name="generate-property-getter">
<xsl:param name="interface" select="/.." />
<xsl:variable name="java-prop-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="@name" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public ')" />
<xsl:choose>
<xsl:when test="string(@multi-valued) != 'true'">
<xsl:choose>
<xsl:when test="adm:default-behavior/adm:defined">
<!--
The method is guaranteed to return a value since there is a
well-defined default value.
-->
<xsl:call-template name="get-property-java-primitive-type" />
</xsl:when>
<xsl:when
test="$interface = 'server' and @mandatory = 'true'">
<!--
The method is guaranteed to return a value in the server interface, but
not necessarily in the client, since the mandatory property might not
have been created yet.
-->
<xsl:call-template name="get-property-java-primitive-type" />
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="get-property-java-type" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'SortedSet&lt;'" />
<xsl:call-template name="get-property-java-type" />
<xsl:value-of select="'&gt;'" />
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="adm:syntax/adm:boolean">
<xsl:value-of select="' is'" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="' get'" />
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="string(@multi-valued) != 'true'">
<xsl:value-of
select="concat($java-prop-name, '() {&#xa;',
' return impl.getPropertyValue',
'(INSTANCE.get', $java-prop-name ,
'PropertyDefinition());&#xa;' ,
' }&#xa;')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="concat($java-prop-name, '() {&#xa;',
' return impl.getPropertyValues',
'(INSTANCE.get', $java-prop-name ,
'PropertyDefinition());&#xa;' ,
' }&#xa;')" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
Generate a property value setter.
-->
<xsl:template name="generate-property-setter">
<xsl:if test="not(@monitoring='true')">
<xsl:variable name="java-prop-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="@name" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public void set',
$java-prop-name ,
'(')" />
<xsl:choose>
<xsl:when test="not(@multi-valued='true')">
<xsl:choose>
<xsl:when test="@mandatory='true'">
<xsl:call-template
name="get-property-java-primitive-type" />
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="get-property-java-type" />
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="' value)'" />
<xsl:if test="@read-only='true'">
<xsl:value-of
select="' throws PropertyIsReadOnlyException'" />
</xsl:if>
<xsl:value-of
select="concat(' {&#xa;' ,
' impl.setPropertyValue(INSTANCE.get',
$java-prop-name ,
'PropertyDefinition(), value);&#xa;',
' }&#xa;')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'Collection&lt;'" />
<xsl:call-template name="get-property-java-type" />
<xsl:value-of
select="concat('&gt; values) {&#xa;' ,
' impl.setPropertyValues(INSTANCE.get',
$java-prop-name ,
'PropertyDefinition(), values);&#xa;',
' }&#xa;')" />
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<!--
Generate client relation methods.
-->
<xsl:template name="generate-client-relation-methods">
<xsl:variable name="name" select="@name" />
<xsl:variable name="java-relation-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="$name" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="java-class-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="@managed-object-name" />
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="adm:one-to-one">
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public ', $java-class-name, 'CfgClient get', $java-relation-name, '()&#xa;',
' throws DefinitionDecodingException, ManagedObjectDecodingException,&#xa;',
' ManagedObjectNotFoundException, ConcurrentModificationException,&#xa;',
' AuthorizationException, CommunicationException {&#xa;',
' return impl.getChild(INSTANCE.get', $java-relation-name,'RelationDefinition()).getConfiguration();&#xa;',
' }&#xa;')" />
</xsl:when>
<xsl:when test="adm:one-to-zero-or-one">
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public boolean has', $java-relation-name, '() throws ConcurrentModificationException,&#xa;',
' AuthorizationException, CommunicationException {&#xa;',
' return impl.hasChild(INSTANCE.get', $java-relation-name,'RelationDefinition());&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public ', $java-class-name, 'CfgClient get', $java-relation-name, '()&#xa;',
' throws DefinitionDecodingException, ManagedObjectDecodingException,&#xa;',
' ManagedObjectNotFoundException, ConcurrentModificationException,&#xa;',
' AuthorizationException, CommunicationException {&#xa;',
' return impl.getChild(INSTANCE.get', $java-relation-name,'RelationDefinition()).getConfiguration();&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public &lt;M extends ', $java-class-name, 'CfgClient&gt; M create', $java-relation-name, '(&#xa;',
' ManagedObjectDefinition&lt;M, ?&gt; d, Collection&lt;DefaultBehaviorException&gt; exceptions) {&#xa;',
' return impl.createChild(INSTANCE.get', $java-relation-name,'RelationDefinition(), d, exceptions).getConfiguration();&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public void remove', $java-relation-name, '()&#xa;',
' throws ManagedObjectNotFoundException, ConcurrentModificationException,&#xa;',
' OperationRejectedException, AuthorizationException, CommunicationException {&#xa;',
' impl.removeChild(INSTANCE.get', $java-relation-name,'RelationDefinition());&#xa;',
' }&#xa;')" />
</xsl:when>
<xsl:when test="adm:one-to-many">
<xsl:variable name="plural-name"
select="adm:one-to-many/@plural-name" />
<xsl:variable name="java-relation-plural-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="$plural-name" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public String[] list', $java-relation-plural-name, '() throws ConcurrentModificationException,&#xa;',
' AuthorizationException, CommunicationException {&#xa;',
' return impl.listChildren(INSTANCE.get', $java-relation-plural-name,'RelationDefinition());&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public ', $java-class-name, 'CfgClient get', $java-relation-name, '(String name)&#xa;',
' throws DefinitionDecodingException, ManagedObjectDecodingException,&#xa;',
' ManagedObjectNotFoundException, ConcurrentModificationException,&#xa;',
' AuthorizationException, CommunicationException {&#xa;',
' return impl.getChild(INSTANCE.get', $java-relation-plural-name,'RelationDefinition(), name).getConfiguration();&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public &lt;M extends ', $java-class-name, 'CfgClient&gt; M create', $java-relation-name, '(&#xa;',
' ManagedObjectDefinition&lt;M, ?&gt; d, String name, Collection&lt;DefaultBehaviorException&gt; exceptions) {&#xa;',
' return impl.createChild(INSTANCE.get', $java-relation-plural-name,'RelationDefinition(), d, name, exceptions).getConfiguration();&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public void remove', $java-relation-name, '(String name)&#xa;',
' throws ManagedObjectNotFoundException, ConcurrentModificationException,&#xa;',
' OperationRejectedException, AuthorizationException, CommunicationException {&#xa;',
' impl.removeChild(INSTANCE.get', $java-relation-plural-name,'RelationDefinition(), name);&#xa;',
' }&#xa;')" />
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:value-of
select="concat('Unknown relation type &quot;', local-name(*), '&quot; in relation &quot;', $name, '&quot;.')" />
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
Generate server relation methods.
-->
<xsl:template name="generate-server-relation-methods">
<xsl:variable name="name" select="@name" />
<xsl:variable name="java-relation-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="$name" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="java-class-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="@managed-object-name" />
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="adm:one-to-one">
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public ', $java-class-name, 'Cfg get',
$java-relation-name, '() throws ConfigException {&#xa;',
' return impl.getChild(INSTANCE.get', $java-relation-name, 'RelationDefinition()).getConfiguration();&#xa;',
' }&#xa;')" />
</xsl:when>
<xsl:when test="adm:one-to-zero-or-one">
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public boolean has',
$java-relation-name, '() {&#xa;',
' return impl.hasChild(INSTANCE.get', $java-relation-name, 'RelationDefinition());&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public ', $java-class-name, 'Cfg get',
$java-relation-name, '() throws ConfigException {&#xa;',
' return impl.getChild(INSTANCE.get', $java-relation-name, 'RelationDefinition()).getConfiguration();&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public void add', $java-relation-name, 'AddListener(&#xa;',
' ConfigurationAddListener&lt;', $java-class-name,'Cfg&gt; listener) throws ConfigException {&#xa;',
' impl.registerAddListener(INSTANCE.get', $java-relation-name, 'RelationDefinition(), listener);&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public void remove', $java-relation-name, 'AddListener(&#xa;',
' ConfigurationAddListener&lt;', $java-class-name,'Cfg&gt; listener) {&#xa;',
' impl.deregisterAddListener(INSTANCE.get', $java-relation-name, 'RelationDefinition(), listener);&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public void add', $java-relation-name, 'DeleteListener(&#xa;',
' ConfigurationDeleteListener&lt;', $java-class-name,'Cfg&gt; listener) throws ConfigException {&#xa;',
' impl.registerDeleteListener(INSTANCE.get', $java-relation-name, 'RelationDefinition(), listener);&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public void remove', $java-relation-name, 'DeleteListener(&#xa;',
' ConfigurationDeleteListener&lt;', $java-class-name,'Cfg&gt; listener) {&#xa;',
' impl.deregisterDeleteListener(INSTANCE.get', $java-relation-name, 'RelationDefinition(), listener);&#xa;',
' }&#xa;')" />
</xsl:when>
<xsl:when test="adm:one-to-many">
<xsl:variable name="plural-name"
select="adm:one-to-many/@plural-name" />
<xsl:variable name="java-relation-plural-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="$plural-name" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public String[] list',
$java-relation-plural-name, '() {&#xa;',
' return impl.listChildren(INSTANCE.get', $java-relation-plural-name,'RelationDefinition());&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public ', $java-class-name, 'Cfg get',
$java-relation-name, '(String name) throws ConfigException {&#xa;',
' return impl.getChild(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), name).getConfiguration();&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public void add', $java-relation-name, 'AddListener(&#xa;',
' ConfigurationAddListener&lt;', $java-class-name,'Cfg&gt; listener) throws ConfigException {&#xa;',
' impl.registerAddListener(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), listener);&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public void remove', $java-relation-name, 'AddListener(&#xa;',
' ConfigurationAddListener&lt;', $java-class-name,'Cfg&gt; listener) {&#xa;',
' impl.deregisterAddListener(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), listener);&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public void add', $java-relation-name, 'DeleteListener(&#xa;',
' ConfigurationDeleteListener&lt;', $java-class-name,'Cfg&gt; listener) throws ConfigException {&#xa;',
' impl.registerDeleteListener(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), listener);&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public void remove', $java-relation-name, 'DeleteListener(&#xa;',
' ConfigurationDeleteListener&lt;', $java-class-name,'Cfg&gt; listener) {&#xa;',
' impl.deregisterDeleteListener(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), listener);&#xa;',
' }&#xa;')" />
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:value-of
select="concat('Unknown relation type &quot;', local-name(*), '&quot; in relation &quot;', $name, '&quot;.')" />
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
Generate change listener registration methods.
-->
<xsl:template name="generate-change-listener">
<!--
Process this managed object.
-->
<xsl:variable name="top-name"
select="$this/adm:profile[@name='preprocessor']/admpp:parent-managed-object[last()]/@name" />
<xsl:call-template name="generate-change-listener-help">
<xsl:with-param name="top-name" select="$top-name" />
<xsl:with-param name="name" select="$this-name" />
</xsl:call-template>
<!--
Process parent hierarchy.
-->
<xsl:for-each
select="$this/adm:profile[@name='preprocessor']/admpp:parent-managed-object">
<xsl:call-template name="generate-change-listener-help">
<xsl:with-param name="top-name" select="$top-name" />
<xsl:with-param name="name" select="@name" />
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<!--
Generate a single set of change listener registration methods.
-->
<xsl:template name="generate-change-listener-help">
<xsl:param name="top-name" select="/.." />
<xsl:param name="name" select="/.." />
<xsl:variable name="short-name">
<xsl:choose>
<xsl:when test="not($top-name) or $top-name = $name">
<xsl:value-of select="''" />
</xsl:when>
<xsl:otherwise>
<xsl:variable name="top-length"
select="string-length($top-name)" />
<xsl:variable name="length" select="string-length($name)" />
<xsl:variable name="diff" select="$length - $top-length" />
<xsl:value-of select="substring($name, 1, $diff - 1)" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="java-class">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="$name" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="short-java-class">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="$short-name" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;')" />
<xsl:value-of
select="concat(' public void add', $short-java-class, 'ChangeListener(&#xa;',
' ConfigurationChangeListener&lt;',$java-class,'Cfg&gt; listener) {&#xa;',
' impl.registerChangeListener(listener);&#xa;',
' }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="concat(' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;')" />
<xsl:value-of
select="concat(' public void remove', $short-java-class, 'ChangeListener(&#xa;',
' ConfigurationChangeListener&lt;',$java-class,'Cfg&gt; listener) {&#xa;',
' impl.deregisterChangeListener(listener);&#xa;',
' }&#xa;')" />
</xsl:template>
<!--
Generate import statements for change-listener
-->
<xsl:template name="generate-change-listener-import-statements">
<!--
Process this managed object.
-->
<xsl:element name="import">
<xsl:value-of
select="concat($this-package, '.server.', $this-java-class, 'Cfg')" />
</xsl:element>
<!--
Process parent hierarchy.
-->
<xsl:for-each
select="$this/adm:profile[@name='preprocessor']/admpp:parent-managed-object">
<xsl:variable name="java-class">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="@name" />
</xsl:call-template>
</xsl:variable>
<xsl:element name="import">
<xsl:value-of
select="concat(@package, '.server.', $java-class, 'Cfg')" />
</xsl:element>
</xsl:for-each>
</xsl:template>
<!--
Generate an enumeration for a locally defined enumerated property.
-->
<xsl:template name="generate-enumeration">
<xsl:value-of
select="concat(' /**&#xa;',
' * Defines the set of permissable values for the &quot;', @name, '&quot; property.&#xa;')" />
<xsl:if test="adm:synopsis">
<xsl:value-of select="' * &lt;p&gt;&#xa;'" />
<xsl:call-template name="add-java-comment">
<xsl:with-param name="indent-text" select="' *'" />
<xsl:with-param name="content" select="adm:synopsis" />
</xsl:call-template>
</xsl:if>
<xsl:if test="adm:description">
<xsl:value-of select="' * &lt;p&gt;&#xa;'" />
<xsl:call-template name="add-java-comment">
<xsl:with-param name="indent-text" select="' *'" />
<xsl:with-param name="content" select="adm:description" />
</xsl:call-template>
</xsl:if>
<xsl:value-of
select="concat(' */&#xa;',
' public static enum ')" />
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="@name" />
</xsl:call-template>
<xsl:value-of select="' {&#xa;'" />
<xsl:text>&#xa;</xsl:text>
<xsl:for-each select="adm:syntax/adm:enumeration/adm:value">
<xsl:sort select="@name" />
<xsl:value-of select="' /**&#xa;'" />
<xsl:call-template name="add-java-comment">
<xsl:with-param name="indent-text" select="' *'" />
<xsl:with-param name="content" select="adm:synopsis" />
</xsl:call-template>
<xsl:value-of select="' */&#xa;'" />
<xsl:value-of select="' '" />
<xsl:call-template name="name-to-java-constant">
<xsl:with-param name="value" select="@name" />
</xsl:call-template>
<xsl:value-of select="concat('(&quot;', @name, '&quot;)')" />
<xsl:choose>
<xsl:when test="position() != last()">
<xsl:value-of select="',&#xa;'" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="';&#xa;'" />
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of
select="' // String representation of the value.&#xa;'" />
<xsl:value-of select="' private final String name;&#xa;'" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:value-of select="' // Private constructor.&#xa;'" />
<xsl:value-of select="' private '" />
<xsl:call-template name="name-to-java">
<xsl:with-param name="value" select="@name" />
</xsl:call-template>
<xsl:value-of
select="concat('(String name) { this.name = name; }&#xa;',
'&#xa;',
'&#xa;',
'&#xa;',
' /**&#xa;',
' * {@inheritDoc}&#xa;',
' */&#xa;',
' public String toString() { return name; }&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:value-of select="' }&#xa;'" />
</xsl:template>
<!--
Main document parsing template.
-->
<xsl:template match="/">
<xsl:call-template name="copyright-notice" />
<xsl:value-of
select="concat('package ', $this-package, '.meta;&#xa;')" />
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:call-template name="generate-import-statements">
<xsl:with-param name="imports">
<xsl:if
test="$this-local-properties[@multi-valued='true' or
@read-only='true' or
@monitoring='true' or
@hidden='true' or
@mandatory='true']">
<import>org.opends.server.admin.PropertyOption</import>
</xsl:if>
<xsl:if
test="$this-local-properties/adm:default-behavior/adm:undefined
| $this-local-properties[@mandatory='true']">
<import>
org.opends.server.admin.UndefinedDefaultBehaviorProvider
</import>
</xsl:if>
<xsl:if
test="$this-local-properties/adm:default-behavior/adm:alias">
<import>
org.opends.server.admin.AliasDefaultBehaviorProvider
</import>
</xsl:if>
<xsl:if
test="$this-local-properties/adm:default-behavior/adm:inherited/adm:absolute">
<import>
org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider
</import>
<import>org.opends.server.admin.ManagedObjectPath</import>
</xsl:if>
<xsl:if
test="$this-local-properties/adm:default-behavior/adm:inherited/adm:relative">
<import>
org.opends.server.admin.RelativeInheritedDefaultBehaviorProvider
</import>
<xsl:for-each
select="$this-local-properties/adm:default-behavior/adm:inherited/adm:relative">
<xsl:if test="@managed-object-package != $this-package">
<xsl:variable name="java-class-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value"
select="@managed-object-name" />
</xsl:call-template>
</xsl:variable>
<xsl:element name="import">
<xsl:value-of
select="concat(@managed-object-package, '.meta.', $java-class-name, 'CfgDefn')" />
</xsl:element>
</xsl:if>
</xsl:for-each>
</xsl:if>
<xsl:if
test="$this-local-properties/adm:default-behavior/adm:defined">
<import>
org.opends.server.admin.DefinedDefaultBehaviorProvider
</import>
<import>
org.opends.server.admin.DefaultBehaviorProvider
</import>
</xsl:if>
<xsl:element name="import">
<xsl:value-of
select="concat($this-package, '.client.', $this-java-class, 'CfgClient')" />
</xsl:element>
<xsl:element name="import">
<xsl:value-of
select="concat($this-package, '.server.', $this-java-class, 'Cfg')" />
</xsl:element>
<xsl:for-each select="$this-inherited-properties">
<xsl:call-template name="get-property-java-imports" />
</xsl:for-each>
<xsl:for-each select="$this-all-properties">
<xsl:call-template
name="get-property-definition-java-imports" />
</xsl:for-each>
<xsl:for-each select="$this-all-relations">
<xsl:variable name="java-class-name">
<xsl:call-template name="name-to-java">
<xsl:with-param name="value"
select="@managed-object-name" />
</xsl:call-template>
</xsl:variable>
<xsl:element name="import">
<xsl:value-of
select="concat(@managed-object-package, '.client.', $java-class-name, 'CfgClient')" />
</xsl:element>
<xsl:element name="import">
<xsl:value-of
select="concat(@managed-object-package, '.server.', $java-class-name, 'Cfg')" />
</xsl:element>
</xsl:for-each>
<xsl:if test="$this-all-relations/adm:one-to-many">
<import>
org.opends.server.admin.InstantiableRelationDefinition
</import>
</xsl:if>
<xsl:if test="$this-all-relations/adm:one-to-zero-or-one">
<import>
org.opends.server.admin.OptionalRelationDefinition
</import>
</xsl:if>
<xsl:if test="$this-all-relations/adm:one-to-one">
<import>
org.opends.server.admin.SingletonRelationDefinition
</import>
</xsl:if>
<xsl:choose>
<xsl:when test="$this-is-abstract">
<import>
org.opends.server.admin.AbstractManagedObjectDefinition
</import>
</xsl:when>
<xsl:otherwise>
<import>
org.opends.server.admin.ManagedObjectDefinition
</import>
<import>org.opends.server.admin.PropertyProvider</import>
<import>
org.opends.server.admin.client.MissingMandatoryPropertiesException
</import>
<import>
org.opends.server.admin.ManagedObjectAlreadyExistsException
</import>
<import>
org.opends.server.admin.client.AuthorizationException
</import>
<import>
org.opends.server.admin.client.CommunicationException
</import>
<import>
org.opends.server.admin.client.ConcurrentModificationException
</import>
<import>
org.opends.server.admin.client.OperationRejectedException
</import>
<import>
org.opends.server.admin.client.ManagedObject
</import>
<import>
org.opends.server.admin.server.ServerManagedObject
</import>
<xsl:if test="not($this-is-root)">
<import>
org.opends.server.admin.server.ConfigurationChangeListener
</import>
<xsl:call-template
name="generate-change-listener-import-statements" />
</xsl:if>
<import>org.opends.server.types.DN</import>
<xsl:if test="$this-all-relations">
<import>
org.opends.server.admin.DefinitionDecodingException
</import>
<import>
org.opends.server.admin.ManagedObjectNotFoundException
</import>
<import>
org.opends.server.admin.client.ManagedObjectDecodingException
</import>
</xsl:if>
<xsl:if test="$this-all-relations/adm:one-to-many">
<import>java.util.Collection</import>
<import>
org.opends.server.admin.DefaultBehaviorException
</import>
<import>
org.opends.server.admin.server.ConfigurationAddListener
</import>
<import>
org.opends.server.admin.server.ConfigurationDeleteListener
</import>
<import>org.opends.server.config.ConfigException</import>
</xsl:if>
<xsl:if test="$this-all-relations/adm:one-to-zero-or-one">
<import>java.util.Collection</import>
<import>
org.opends.server.admin.DefaultBehaviorException
</import>
<import>
org.opends.server.admin.server.ConfigurationAddListener
</import>
<import>
org.opends.server.admin.server.ConfigurationDeleteListener
</import>
<import>org.opends.server.config.ConfigException</import>
</xsl:if>
<xsl:if test="$this-all-relations/adm:one-to-one">
<import>org.opends.server.config.ConfigException</import>
</xsl:if>
<xsl:if test="$this-all-properties[@multi-valued='true']">
<import>java.util.SortedSet</import>
<import>java.util.Collection</import>
</xsl:if>
<xsl:if test="$this-all-properties[@read-only='true']">
<import>
org.opends.server.admin.PropertyIsReadOnlyException
</import>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="$this/@extends">
<xsl:if test="$parent-package != $this-package">
<xsl:element name="import">
<xsl:value-of
select="concat($parent-package, '.meta.', $parent-java-class, 'CfgDefn')" />
</xsl:element>
</xsl:if>
</xsl:if>
</xsl:with-param>
</xsl:call-template>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:text>&#xa;</xsl:text>
<xsl:call-template name="generate-meta-class-declaration" />
<xsl:text>&#xa;</xsl:text>
<xsl:call-template name="generate-meta-class-body" />
<xsl:text>}&#xa;</xsl:text>
</xsl:template>
</xsl:stylesheet>