metaMO.xsl revision 2989
1008N/A<!--
1008N/A ! CDDL HEADER START
1008N/A !
1008N/A ! The contents of this file are subject to the terms of the
1008N/A ! Common Development and Distribution License, Version 1.0 only
1008N/A ! (the "License"). You may not use this file except in compliance
1008N/A ! with the License.
1008N/A !
1008N/A ! You can obtain a copy of the license at
1008N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
1008N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
1008N/A ! See the License for the specific language governing permissions
1008N/A ! and limitations under the License.
1008N/A !
1008N/A ! When distributing Covered Code, include this CDDL HEADER in each
1008N/A ! file and include the License file at
1008N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
1008N/A ! add the following below this CDDL HEADER, with the fields enclosed
1008N/A ! by brackets "[]" replaced with your own identifying information:
1008N/A ! Portions Copyright [yyyy] [name of copyright owner]
1008N/A !
1008N/A ! CDDL HEADER END
1008N/A !
1008N/A !
1008N/A ! Portions Copyright 2007 Sun Microsystems, Inc.
1008N/A ! -->
1008N/A<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
1008N/A xmlns:admpp="http://www.opends.org/admin-preprocessor"
1008N/A xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1008N/A xmlns:exsl="http://exslt.org/common">
1008N/A <xsl:import href="java-utilities.xsl" />
1008N/A <xsl:import href="preprocessor.xsl" />
1008N/A <xsl:import href="property-types.xsl" />
1008N/A <xsl:output method="text" encoding="us-ascii" />
1008N/A <!--
1008N/A Template for generating the class declaration.
1008N/A -->
1008N/A <xsl:template name="generate-meta-class-declaration">
1008N/A <xsl:value-of select="'/**&#xa;'" />
1008N/A <xsl:call-template name="add-java-comment">
1008N/A <xsl:with-param name="indent-text" select="' *'" />
1008N/A <xsl:with-param name="content"
1008N/A select="concat('An interface for querying the ', $this-ufn,
1008N/A ' managed object definition meta information.')" />
1008N/A </xsl:call-template>
1008N/A <xsl:value-of select="' * &lt;p&gt;&#xa;'" />
1008N/A <xsl:call-template name="add-java-comment">
1008N/A <xsl:with-param name="indent-text" select="' *'" />
1008N/A <xsl:with-param name="content" select="$this/adm:synopsis" />
1008N/A </xsl:call-template>
1008N/A <xsl:value-of select="' */&#xa;'" />
1008N/A <xsl:value-of
1008N/A select="concat('public final class ',
1008N/A $this-java-class,
1008N/A 'CfgDefn extends ')" />
1008N/A <xsl:choose>
1008N/A <xsl:when test="$this-is-abstract">
1008N/A <xsl:value-of
1008N/A select="concat('AbstractManagedObjectDefinition&lt;',
1008N/A $this-java-class, 'CfgClient, ',
1008N/A $this-java-class, 'Cfg&gt; {&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of
1008N/A select="concat('ManagedObjectDefinition&lt;',
1008N/A $this-java-class, 'CfgClient, ',
1008N/A $this-java-class, 'Cfg&gt; {&#xa;')" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:template>
1008N/A <!--
1008N/A Template for generating the meta class body.
1008N/A -->
1008N/A <xsl:template name="generate-meta-class-body">
1008N/A <!--
1008N/A Singleton configuration definition instance.
1008N/A -->
1008N/A <xsl:value-of
1008N/A select="concat(' // The singleton configuration definition instance.&#xa;',
1008N/A ' private static final ',
1008N/A $this-java-class ,
1008N/A 'CfgDefn INSTANCE = new ', $this-java-class, 'CfgDefn();&#xa;')" />
1008N/A <!--
1008N/A Generate enumerations defined by this managed object..
1008N/A -->
1008N/A <xsl:for-each
1008N/A select="$this-local-properties[adm:syntax/adm:enumeration and not(adm:profile[@name='preprocessor']/adm:first-defined-in)]">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:if
1008N/A test="not(adm:profile[@name='preprocessor']/admpp:first-defined-in)">
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-enumeration" />
1548N/A </xsl:if>
1548N/A </xsl:for-each>
1548N/A <!--
1548N/A Define application tags if this is the root configuration.
1548N/A -->
1548N/A <xsl:if test="$this-is-root">
1565N/A <xsl:text>&#xa;</xsl:text>
1565N/A <xsl:text>&#xa;</xsl:text>
1548N/A <xsl:text>&#xa;</xsl:text>
1548N/A <xsl:value-of select="' // Define managed object tags.&#xa;'" />
1565N/A <xsl:value-of select="' static {&#xa;'" />
1565N/A <xsl:for-each select="$this/adm:tag-definition">
1548N/A <xsl:sort select="@name" />
1565N/A <xsl:value-of
1548N/A select="concat(' Tag.define(&quot;', @name, '&quot;);&#xa;')" />
1548N/A </xsl:for-each>
1008N/A <xsl:value-of select="' }&#xa;'" />
1008N/A </xsl:if>
1008N/A <!--
1008N/A Generate declarations for properties defined or
1008N/A overridden by this managed object.
1008N/A -->
1008N/A <xsl:for-each select="$this-local-properties">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-property-declaration" />
1008N/A </xsl:for-each>
1008N/A <!--
1008N/A Generate declarations for relations.
1008N/A -->
1008N/A <xsl:for-each select="$this-local-relations">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-relation-declaration" />
1008N/A </xsl:for-each>
1008N/A <!--
1008N/A Generate constructors for properties defined or
1008N/A overridden by this managed object.
1008N/A -->
1008N/A <xsl:for-each select="$this-local-properties">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-property-constructor" />
1008N/A </xsl:for-each>
1008N/A <!--
1008N/A Generate constructors for relations.
1008N/A -->
1008N/A <xsl:for-each select="$this-local-relations">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1548N/A <xsl:call-template name="generate-relation-constructor" />
1548N/A </xsl:for-each>
1548N/A <!--
1548N/A Register any optins associated with this managed object definition.
1548N/A -->
1548N/A <xsl:if test="$this-is-advanced or $this-is-hidden">
1565N/A <xsl:text>&#xa;</xsl:text>
1565N/A <xsl:text>&#xa;</xsl:text>
1565N/A <xsl:text>&#xa;</xsl:text>
1548N/A <xsl:value-of
1548N/A select="' // Register the options associated with this managed object definition.&#xa;'" />
1565N/A <xsl:value-of select="' static {&#xa;'" />
1565N/A <xsl:if test="$this-is-advanced">
1548N/A <xsl:value-of
1565N/A select="concat(' INSTANCE.registerOption(ManagedObjectOption.ADVANCED);&#xa;')" />
1548N/A </xsl:if>
1548N/A <xsl:if test="$this-is-hidden">
1008N/A <xsl:value-of
1008N/A select="concat(' INSTANCE.registerOption(ManagedObjectOption.HIDDEN);&#xa;')" />
1008N/A </xsl:if>
1008N/A <xsl:value-of select="' }&#xa;'" />
1008N/A </xsl:if>
1008N/A <!--
1008N/A Register any tags associated with this managed object definition.
1008N/A -->
1008N/A <xsl:if test="$this/adm:tag">
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="' // Register the tags associated with this managed object definition.&#xa;'" />
1008N/A <xsl:value-of select="' static {&#xa;'" />
1008N/A <xsl:for-each select="$this/adm:tag">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:value-of
1008N/A select="concat(' INSTANCE.registerTag(Tag.valueOf(&quot;', @name, '&quot;));&#xa;')" />
1008N/A </xsl:for-each>
1008N/A <xsl:value-of select="' }&#xa;'" />
1008N/A </xsl:if>
1008N/A <!--
1008N/A Register any constraints associated with this managed object definition.
1008N/A -->
1008N/A <xsl:if test="$this/adm:constraint">
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="' // Register the constraints associated with this managed object definition.&#xa;'" />
1008N/A <xsl:value-of select="' static {&#xa;'" />
1008N/A <xsl:for-each select="$this/adm:constraint">
1008N/A <xsl:value-of
1008N/A select="concat(' INSTANCE.registerConstraint(new GenericConstraint(INSTANCE, ', position(), ', ')" />
1008N/A <xsl:apply-templates select="adm:condition/*"
1008N/A mode="compile-condition" />
1008N/A <xsl:value-of select="'));&#xa;'" />
1008N/A </xsl:for-each>
1008N/A <xsl:value-of select="' }&#xa;'" />
1008N/A </xsl:if>
1008N/A <!--
1008N/A Configuration definition singleton getter.
1008N/A -->
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of select="' /**&#xa;'" />
1008N/A <xsl:call-template name="add-java-comment">
1008N/A <xsl:with-param name="indent-text" select="' *'" />
1008N/A <xsl:with-param name="content"
1008N/A select="concat('Get the ', $this-ufn,' configuration definition singleton.')" />
1008N/A </xsl:call-template>
1008N/A <xsl:value-of select="' *&#xa;'" />
1008N/A <xsl:call-template name="add-java-comment">
1008N/A <xsl:with-param name="indent-text" select="' *'" />
1008N/A <xsl:with-param name="indent-text2" select="' * '" />
1008N/A <xsl:with-param name="content"
1008N/A select="concat('@return Returns the ', $this-ufn,
1008N/A ' configuration definition singleton.')" />
1008N/A </xsl:call-template>
1008N/A <xsl:value-of select="' */&#xa;'" />
1008N/A <xsl:value-of
1008N/A select="concat(' public static ',
1008N/A $this-java-class ,
1008N/A 'CfgDefn getInstance() {&#xa;',
1008N/A ' return INSTANCE;&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <!--
1008N/A Private constructor.
1008N/A -->
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * Private constructor.&#xa;',
1008N/A ' */&#xa;',
1008N/A ' private ',
1008N/A $this-java-class ,
1008N/A 'CfgDefn() {&#xa;')" />
1008N/A <xsl:choose>
1008N/A <xsl:when test="boolean($this/@extends)">
1008N/A <xsl:value-of
1008N/A select="concat(' super(&quot;',
1008N/A $this/@name,
1008N/A '&quot;, ',
1008N/A $parent-java-class,
1008N/A 'CfgDefn.getInstance());&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of
1008N/A select="concat(' super(&quot;',
1008N/A $this/@name,
1008N/A '&quot;, TopCfgDefn.getInstance());&#xa;')" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A <xsl:value-of select="' }&#xa;'" />
1008N/A <!--
1008N/A Create configuration view factory methods for non-abstract definitions
1008N/A -->
1008N/A <xsl:if test="not($this-is-abstract)">
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <!--
1008N/A Generate configuration client factory method.
1008N/A -->
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public ',
1008N/A $this-java-class,
1008N/A 'CfgClient createClientConfiguration(&#xa;',
1008N/A ' ManagedObject&lt;? extends ',
1008N/A $this-java-class,
1142N/A 'CfgClient&gt; impl) {&#xa;',
1008N/A ' return new ',
1008N/A $this-java-class ,
1008N/A 'CfgClientImpl(impl);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <!--
1008N/A Generate configuration server factory method.
1142N/A -->
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public ',
1008N/A $this-java-class,
1008N/A 'Cfg createServerConfiguration(&#xa;',
1008N/A ' ServerManagedObject&lt;? extends ',$this-java-class,'Cfg&gt; impl) {&#xa;',
1008N/A ' return new ',
1008N/A $this-java-class ,
1008N/A 'CfgServerImpl(impl);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <!--
1008N/A Generate configuration server class getter..
1008N/A -->
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public Class&lt;',
1008N/A $this-java-class,
1008N/A 'Cfg&gt; getServerConfigurationClass() {&#xa;',
1008N/A ' return ',
1008N/A $this-java-class ,
1008N/A 'Cfg.class;&#xa;',
1008N/A ' }&#xa;')" />
1008N/A </xsl:if>
1008N/A <!--
1008N/A Generate property definition getters for all properties.
1008N/A -->
1008N/A <xsl:for-each select="$this-all-properties">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-property-definition-getter" />
1008N/A </xsl:for-each>
1008N/A <!--
1008N/A Generate relation definition getters for all relations.
1008N/A -->
1008N/A <xsl:for-each select="$this-all-relations">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-relation-definition-getter" />
1008N/A </xsl:for-each>
1008N/A <!--
1008N/A Managed object class implementations.
1008N/A -->
1008N/A <xsl:if test="not($this-is-abstract)">
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-client-impl-class" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-server-impl-class" />
1089N/A </xsl:if>
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate managed object client class implementation.
1008N/A -->
1008N/A <xsl:template name="generate-client-impl-class">
1008N/A <!--
1008N/A Declaration.
1008N/A -->
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * Managed object client implementation.&#xa;',
1008N/A ' */&#xa;',
1008N/A ' private static class ',
1008N/A $this-java-class ,
1008N/A 'CfgClientImpl implements&#xa; ',
1008N/A $this-java-class ,
1008N/A 'CfgClient {&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <!--
1008N/A Private instance.
1008N/A -->
1008N/A <xsl:value-of
1008N/A select="concat(' // Private implementation.&#xa;',
1008N/A ' private ManagedObject&lt;? extends ',
1008N/A $this-java-class,
1008N/A 'CfgClient&gt; impl;&#xa;')" />
1008N/A <!--
1008N/A Private constructor.
1008N/A -->
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' // Private constructor.&#xa;',
1008N/A ' private ',
1008N/A $this-java-class,
1008N/A 'CfgClientImpl(&#xa;',
1008N/A ' ManagedObject&lt;? extends ',
1008N/A $this-java-class,
1008N/A 'CfgClient&gt; impl) {&#xa;',
1008N/A ' this.impl = impl;&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <!--
1008N/A Getters/Setters for all properties.
1008N/A -->
1008N/A <xsl:for-each select="$this-all-properties">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template
1008N/A name="generate-property-getter-implementation">
1008N/A <xsl:with-param name="interface" select="'client'" />
1008N/A </xsl:call-template>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-property-setter-implementation" />
1008N/A </xsl:for-each>
1008N/A <!--
1008N/A Relation methods.
1008N/A -->
1418N/A <xsl:for-each select="$this-all-relations">
1418N/A <xsl:sort select="@name" />
1389N/A <xsl:text>&#xa;</xsl:text>
1389N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-client-relation-methods" />
1008N/A </xsl:for-each>
1008N/A <!--
1008N/A Managed object definition getter.
1008N/A -->
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public ManagedObjectDefinition&lt;? extends ', $this-java-class,'CfgClient, ? extends ', $this-java-class,'Cfg&gt; definition() {&#xa;',
1008N/A ' return INSTANCE;&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <!--
1008N/A Property provider view.
1008N/A -->
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public PropertyProvider properties() {&#xa;',
1008N/A ' return impl;&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <!--
1008N/A Commit method.
1008N/A -->
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public void commit() throws ManagedObjectAlreadyExistsException,&#xa;',
1089N/A ' MissingMandatoryPropertiesException, ConcurrentModificationException,&#xa;',
1008N/A ' OperationRejectedException, AuthorizationException,&#xa;',
1008N/A ' CommunicationException {&#xa;',
1008N/A ' impl.commit();&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of select="' }&#xa;'" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate managed object server class implementation.
1008N/A -->
1008N/A <xsl:template name="generate-server-impl-class">
1008N/A <!--
1008N/A Declaration.
1008N/A -->
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * Managed object server implementation.&#xa;',
1008N/A ' */&#xa;',
1008N/A ' private static class ',
1008N/A $this-java-class ,
1008N/A 'CfgServerImpl implements&#xa; ',
1008N/A $this-java-class ,
1008N/A 'Cfg {&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <!--
1008N/A Private instance.
1008N/A -->
1008N/A <xsl:value-of
1008N/A select="concat(' // Private implementation.&#xa;',
1008N/A ' private ServerManagedObject&lt;? extends ', $this-java-class, 'Cfg&gt; impl;&#xa;')" />
1008N/A <!--
1008N/A Private members for each property.
1008N/A -->
1008N/A <xsl:for-each select="$this-all-properties">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' // The value of the &quot;', @name, '&quot; property.&#xa;')" />
1008N/A <xsl:value-of select="' private final '" />
1008N/A <xsl:choose>
1008N/A <xsl:when test="string(@multi-valued) != 'true'">
1008N/A <xsl:choose>
1008N/A <xsl:when test="adm:default-behavior/adm:defined">
1008N/A <!--
1008N/A The property is guaranteed to contain a value since there is a
1008N/A well-defined default value.
1008N/A -->
1008N/A <xsl:call-template
1008N/A name="get-property-java-primitive-type" />
1008N/A </xsl:when>
1008N/A <xsl:when test="@mandatory = 'true'">
1008N/A <!--
1008N/A The property is guaranteed to contain a value in the server interface.
1008N/A -->
1008N/A <xsl:call-template
1008N/A name="get-property-java-primitive-type" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:call-template name="get-property-java-type" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of select="'SortedSet&lt;'" />
1008N/A <xsl:call-template name="get-property-java-type" />
1008N/A <xsl:value-of select="'&gt;'" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A <xsl:value-of select="' p'" />
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="@name" />
1008N/A </xsl:call-template>
1008N/A <xsl:value-of select="';&#xa;'" />
1008N/A </xsl:for-each>
1008N/A <!--
1008N/A Private constructor.
1008N/A -->
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' // Private constructor.&#xa;',
1008N/A ' private ',
1008N/A $this-java-class,
1008N/A 'CfgServerImpl(ServerManagedObject&lt;? extends ', $this-java-class, 'Cfg&gt; impl) {&#xa;',
1008N/A ' this.impl = impl;&#xa;')" />
1008N/A <xsl:for-each select="$this-all-properties">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:variable name="java-prop-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="@name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:value-of
1008N/A select="concat(' this.p', $java-prop-name, ' = ')" />
1008N/A <xsl:choose>
1008N/A <xsl:when test="string(@multi-valued) != 'true'">
1008N/A <xsl:value-of
1008N/A select="concat('impl.getPropertyValue(INSTANCE.get', $java-prop-name , 'PropertyDefinition());&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of
1008N/A select="concat('impl.getPropertyValues(INSTANCE.get', $java-prop-name , 'PropertyDefinition());&#xa;')" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:for-each>
1008N/A <xsl:value-of select="' }&#xa;'" />
1008N/A <!--
1008N/A Generate all the change listener methods - one for each managed
1008N/A object in the hierarchy.
1008N/A -->
1008N/A <xsl:if test="not($this-is-root)">
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-change-listener" />
1008N/A </xsl:if>
1008N/A <!--
1008N/A Getters for all properties.
1008N/A -->
1008N/A <xsl:for-each select="$this-all-properties">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template
1008N/A name="generate-property-getter-implementation">
1008N/A <xsl:with-param name="interface" select="'server'" />
1008N/A </xsl:call-template>
1008N/A </xsl:for-each>
1140N/A <!--
1008N/A Relation methods.
1008N/A -->
1008N/A <xsl:for-each select="$this-all-relations">
1140N/A <xsl:sort select="@name" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1418N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-server-relation-methods" />
1008N/A </xsl:for-each>
1008N/A <!--
1418N/A Configuration definition getter.
1008N/A -->
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1418N/A <xsl:text>&#xa;</xsl:text>
1418N/A <xsl:value-of
1418N/A select="concat(' /**&#xa;',
1418N/A ' * {@inheritDoc}&#xa;',
1418N/A ' */&#xa;',
1008N/A ' public ManagedObjectDefinition&lt;? extends ', $this-java-class,'CfgClient, ? extends ', $this-java-class,'Cfg&gt; definition() {&#xa;',
1008N/A ' return INSTANCE;&#xa;',
1008N/A ' }&#xa;')" />
1418N/A <!--
1008N/A Server managed object getter.
1008N/A -->
1008N/A <xsl:text>&#xa;</xsl:text>
1906N/A <xsl:text>&#xa;</xsl:text>
1906N/A <xsl:text>&#xa;</xsl:text>
1906N/A <xsl:value-of
1906N/A select="concat(' /**&#xa;',
1565N/A ' * {@inheritDoc}&#xa;',
1565N/A ' */&#xa;',
1565N/A ' public ServerManagedObject&lt;? extends ', $this-java-class,'Cfg&gt; managedObject() {&#xa;',
1565N/A ' return impl;&#xa;',
1565N/A ' }&#xa;')" />
1565N/A <!--
1565N/A Configuration entry DN getter.
1565N/A -->
1565N/A <xsl:text>&#xa;</xsl:text>
1565N/A <xsl:text>&#xa;</xsl:text>
1565N/A <xsl:text>&#xa;</xsl:text>
1565N/A <xsl:value-of
1565N/A select="concat(' /**&#xa;',
1565N/A ' * {@inheritDoc}&#xa;',
1565N/A ' */&#xa;',
1008N/A ' public DN dn() {&#xa;',
1548N/A ' return impl.getDN();&#xa;',
1548N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of select="' }&#xa;'" />
1008N/A </xsl:template>
1426N/A <!--
1426N/A Generate a property definition constructor.
1426N/A -->
1426N/A <xsl:template name="generate-property-declaration">
1426N/A <xsl:variable name="java-prop-name">
1426N/A <xsl:call-template name="name-to-java-constant">
1426N/A <xsl:with-param name="value" select="@name" />
1008N/A </xsl:call-template>
1426N/A </xsl:variable>
1426N/A <xsl:variable name="type">
1426N/A <xsl:call-template name="get-property-definition-type" />
1426N/A </xsl:variable>
1426N/A <xsl:variable name="generic-type">
1426N/A <xsl:call-template name="get-property-definition-generic-type" />
1426N/A </xsl:variable>
1426N/A <xsl:variable name="pdtype">
1426N/A <xsl:choose>
1426N/A <xsl:when test="string-length($generic-type) != 0">
1426N/A <xsl:value-of
1426N/A select="concat($type, '&lt;', $generic-type, '&gt;')" />
1426N/A </xsl:when>
1426N/A <xsl:otherwise>
1426N/A <xsl:value-of select="$type" />
1426N/A </xsl:otherwise>
1418N/A </xsl:choose>
1426N/A </xsl:variable>
1426N/A <xsl:value-of
1426N/A select="concat(' // The &quot;',
1426N/A @name,
1426N/A '&quot; property definition.&#xa;',
1426N/A ' private static final ', $pdtype, ' PD_', $java-prop-name, ';&#xa;')" />
1426N/A </xsl:template>
1426N/A <!--
1426N/A Generate a property definition constructor.
1426N/A -->
1426N/A <xsl:template name="generate-property-constructor">
1426N/A <xsl:variable name="java-prop-name">
1426N/A <xsl:call-template name="name-to-java-constant">
1426N/A <xsl:with-param name="value" select="@name" />
1426N/A </xsl:call-template>
1426N/A </xsl:variable>
1426N/A <xsl:variable name="type">
1426N/A <xsl:call-template name="get-property-definition-type" />
1426N/A </xsl:variable>
1418N/A <xsl:variable name="generic-type">
1426N/A <xsl:call-template name="get-property-definition-generic-type" />
1426N/A </xsl:variable>
1426N/A <xsl:variable name="value-type">
1426N/A <xsl:call-template name="get-property-java-type" />
1426N/A </xsl:variable>
1426N/A <xsl:value-of
1426N/A select="concat(' // Build the &quot;', @name, '&quot; property definition.&#xa;',
1426N/A ' static {&#xa;')" />
1426N/A <xsl:choose>
1426N/A <xsl:when test="string-length($generic-type) != 0">
1426N/A <xsl:value-of
1426N/A select="concat(' ', $type, '.Builder&lt;', $generic-type, '&gt; builder = ', $type, '.createBuilder(INSTANCE, &quot;',@name, '&quot;);&#xa;')" />
1426N/A </xsl:when>
1008N/A <xsl:otherwise>
1426N/A <xsl:value-of
1008N/A select="concat(' ', $type, '.Builder builder = ', $type, '.createBuilder(INSTANCE, &quot;',@name, '&quot;);&#xa;')" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A <xsl:if test="@multi-valued='true'">
1008N/A <xsl:value-of
1008N/A select="' builder.setOption(PropertyOption.MULTI_VALUED);&#xa;'" />
1008N/A </xsl:if>
1008N/A <xsl:if test="@read-only='true'">
1008N/A <xsl:value-of
1008N/A select="' builder.setOption(PropertyOption.READ_ONLY);&#xa;'" />
1008N/A </xsl:if>
1008N/A <xsl:if test="@monitoring='true'">
1008N/A <xsl:value-of
1008N/A select="' builder.setOption(PropertyOption.MONITORING);&#xa;'" />
1008N/A </xsl:if>
1008N/A <xsl:if test="@mandatory='true'">
1008N/A <xsl:value-of
1008N/A select="' builder.setOption(PropertyOption.MANDATORY);&#xa;'" />
1008N/A </xsl:if>
1008N/A <xsl:if test="@hidden='true'">
1008N/A <xsl:value-of
1008N/A select="' builder.setOption(PropertyOption.HIDDEN);&#xa;'" />
1008N/A </xsl:if>
1008N/A <xsl:if test="@advanced='true'">
1008N/A <xsl:value-of
1008N/A select="' builder.setOption(PropertyOption.ADVANCED);&#xa;'" />
1008N/A </xsl:if>
1008N/A <xsl:variable name="action-type">
1008N/A <xsl:choose>
1008N/A <xsl:when test="adm:requires-admin-action">
1008N/A <xsl:call-template name="name-to-java-constant">
1008N/A <xsl:with-param name="value"
1008N/A select="local-name(adm:requires-admin-action/*)" />
1008N/A </xsl:call-template>
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of select="'NONE'" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:variable>
1008N/A <xsl:value-of
1008N/A select="concat(' builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.', $action-type, ', INSTANCE, &quot;', @name, '&quot;));&#xa;')" />
1008N/A <xsl:choose>
1008N/A <xsl:when
1008N/A test="not(adm:default-behavior) or adm:default-behavior/adm:undefined">
1008N/A <xsl:value-of
1008N/A select="concat(' builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider&lt;', $value-type,'&gt;());&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:when test="adm:default-behavior/adm:alias">
1008N/A <xsl:value-of
1008N/A select="concat(' builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider&lt;', $value-type,'&gt;(INSTANCE, &quot;', @name, '&quot;));&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:when test="adm:default-behavior/adm:defined">
1008N/A <xsl:value-of
1008N/A select="concat(' DefaultBehaviorProvider&lt;', $value-type,'&gt; provider = ',
1008N/A 'new DefinedDefaultBehaviorProvider&lt;', $value-type,'&gt;(')" />
1008N/A <xsl:for-each
1008N/A select="adm:default-behavior/adm:defined/adm:value">
1008N/A <xsl:value-of
1008N/A select="concat('&quot;', normalize-space(), '&quot;')" />
1008N/A <xsl:if test="position() != last()">
1008N/A <xsl:value-of select="', '" />
1008N/A </xsl:if>
1008N/A </xsl:for-each>
1008N/A <xsl:value-of select="');&#xa;'" />
1008N/A <xsl:value-of
1008N/A select="' builder.setDefaultBehaviorProvider(provider);&#xa;'" />
1008N/A </xsl:when>
1008N/A <xsl:when
1008N/A test="adm:default-behavior/adm:inherited/adm:relative">
1008N/A <xsl:value-of
1008N/A select="concat(' DefaultBehaviorProvider&lt;', $value-type,'&gt; provider = ',
1008N/A 'new RelativeInheritedDefaultBehaviorProvider&lt;', $value-type,'&gt;(')" />
1008N/A <xsl:variable name="managed-object-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value"
1008N/A select="adm:default-behavior/adm:inherited/adm:relative/@managed-object-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:variable name="property-name"
1008N/A select="adm:default-behavior/adm:inherited/adm:relative/@property-name" />
1008N/A <xsl:variable name="offset"
1893N/A select="adm:default-behavior/adm:inherited/adm:relative/@offset" />
1893N/A <xsl:value-of
1893N/A select="concat($managed-object-name, 'CfgDefn.getInstance(), &quot;', $property-name, '&quot;, ', $offset, ');&#xa;')" />
1893N/A <xsl:value-of
1893N/A select="' builder.setDefaultBehaviorProvider(provider);&#xa;'" />
1893N/A </xsl:when>
1893N/A <xsl:when
1893N/A test="adm:default-behavior/adm:inherited/adm:absolute">
1893N/A <xsl:value-of
1893N/A select="concat(' DefaultBehaviorProvider&lt;', $value-type,'&gt; provider = ',
1893N/A 'new AbsoluteInheritedDefaultBehaviorProvider&lt;', $value-type,'&gt;(')" />
1893N/A <xsl:variable name="property-name"
1893N/A select="adm:default-behavior/adm:inherited/adm:absolute/@property-name" />
1893N/A <xsl:variable name="path"
1893N/A select="adm:default-behavior/adm:inherited/adm:absolute/@path" />
1893N/A <xsl:value-of
1893N/A select="concat('&quot;', $path, '&quot;, &quot;', $property-name, '&quot;);&#xa;')" />
1893N/A <xsl:value-of
1893N/A select="' builder.setDefaultBehaviorProvider(provider);&#xa;'" />
1893N/A </xsl:when>
1893N/A <xsl:otherwise>
1008N/A <xsl:message terminate="yes">
1008N/A <xsl:value-of
1008N/A select="concat('Unrecognized default behavior type for property &quot;', @name,
1893N/A '&quot;.')" />
1893N/A </xsl:message>
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A <xsl:call-template name="get-property-definition-ctor" />
1008N/A <xsl:value-of
1008N/A select="concat(' PD_', $java-prop-name, ' = builder.getInstance();&#xa;')" />
1893N/A <xsl:value-of
1893N/A select="concat(' INSTANCE.registerPropertyDefinition(PD_', $java-prop-name, ');&#xa;')" />
1893N/A <xsl:call-template name="get-property-definition-post-ctor" />
1893N/A <xsl:value-of select="' }&#xa;'" />
1893N/A </xsl:template>
1893N/A <!--
1893N/A Generate a relation definition declaration.
1893N/A -->
1893N/A <xsl:template name="generate-relation-declaration">
1893N/A <xsl:variable name="relation-name">
1893N/A <xsl:choose>
1884N/A <xsl:when test="adm:one-to-many">
1893N/A <xsl:value-of select="adm:one-to-many/@plural-name" />
1884N/A </xsl:when>
1893N/A <xsl:otherwise>
1893N/A <xsl:value-of select="@name" />
1893N/A </xsl:otherwise>
1893N/A </xsl:choose>
1893N/A </xsl:variable>
1893N/A <xsl:variable name="java-relation-name">
1008N/A <xsl:call-template name="name-to-java-constant">
1008N/A <xsl:with-param name="value" select="$relation-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:variable name="java-managed-object-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="@managed-object-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:value-of
1008N/A select="concat(' // The &quot;',
1008N/A $relation-name,
1008N/A '&quot; relation definition.&#xa;',
1008N/A ' private static final ')" />
1008N/A <xsl:choose>
1008N/A <xsl:when test="adm:one-to-one">
1008N/A <xsl:text>SingletonRelationDefinition&lt;</xsl:text>
1008N/A </xsl:when>
1008N/A <xsl:when test="adm:one-to-zero-or-one">
1008N/A <xsl:text>OptionalRelationDefinition&lt;</xsl:text>
1008N/A </xsl:when>
1008N/A <xsl:when test="adm:one-to-many">
1008N/A <xsl:text>InstantiableRelationDefinition&lt;</xsl:text>
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:message terminate="yes">
1008N/A <xsl:value-of
1008N/A select="concat('Unknown relation type &quot;', local-name(*), '&quot; in relation &quot;', @name, '&quot;.')" />
1008N/A </xsl:message>
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A <xsl:value-of
1008N/A select="concat($java-managed-object-name, 'CfgClient, ', $java-managed-object-name, 'Cfg&gt; RD_', $java-relation-name, ';&#xa;')" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate a relation definition constructor.
1008N/A -->
1008N/A <xsl:template name="generate-relation-constructor">
1008N/A <xsl:variable name="relation-name">
1008N/A <xsl:choose>
1008N/A <xsl:when test="adm:one-to-many">
1008N/A <xsl:value-of select="adm:one-to-many/@plural-name" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of select="@name" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:variable>
1008N/A <xsl:variable name="java-relation-name">
1008N/A <xsl:call-template name="name-to-java-constant">
1008N/A <xsl:with-param name="value" select="$relation-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:variable name="java-managed-object-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="@managed-object-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:variable name="java-relation-builder-type">
1008N/A <xsl:choose>
1008N/A <xsl:when test="adm:one-to-one">
1008N/A <xsl:text>SingletonRelationDefinition</xsl:text>
1008N/A </xsl:when>
1008N/A <xsl:when test="adm:one-to-zero-or-one">
1008N/A <xsl:text>OptionalRelationDefinition</xsl:text>
1008N/A </xsl:when>
1008N/A <xsl:when test="adm:one-to-many">
1008N/A <xsl:text>InstantiableRelationDefinition</xsl:text>
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:message terminate="yes">
1008N/A <xsl:value-of
1008N/A select="concat('Unknown relation type &quot;', local-name(*), '&quot; in relation &quot;', @name, '&quot;.')" />
1008N/A </xsl:message>
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A <xsl:value-of
1008N/A select="concat('.Builder&lt;', $java-managed-object-name, 'CfgClient, ', $java-managed-object-name, 'Cfg&gt;')" />
1008N/A </xsl:variable>
1008N/A <xsl:value-of
1008N/A select="concat(' // Build the &quot;', $relation-name, '&quot; relation definition.&#xa;',
1008N/A ' static {&#xa;',
1008N/A ' ', $java-relation-builder-type, ' builder =&#xa;',
1008N/A ' new ', $java-relation-builder-type, '(INSTANCE, &quot;', @name, '&quot;, ')" />
1008N/A <xsl:if test="adm:one-to-many">
1008N/A <xsl:value-of
1008N/A select="concat('&quot;', adm:one-to-many/@plural-name, '&quot;, ')" />
1008N/A </xsl:if>
1008N/A <xsl:value-of
1008N/A select="concat($java-managed-object-name, 'CfgDefn.getInstance());&#xa;')" />
1008N/A <xsl:if test="adm:one-to-many/@naming-property">
1008N/A <xsl:variable name="java-property-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value"
1008N/A select="adm:one-to-many/@naming-property" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:value-of
1008N/A select="concat(' builder.setNamingProperty(',
1008N/A $java-managed-object-name,
1008N/A 'CfgDefn.getInstance().get',
1008N/A $java-property-name, 'PropertyDefinition());&#xa;')" />
1008N/A </xsl:if>
1008N/A <xsl:for-each select="*/adm:default-managed-object">
1008N/A <xsl:variable name="dmo-java-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="@managed-object-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:value-of select="' {&#xa;'" />
1008N/A <xsl:value-of
1008N/A select="concat(' DefaultManagedObject.Builder&lt;',
1008N/A $dmo-java-name, 'CfgClient, ',
1008N/A $dmo-java-name, 'Cfg&gt; dmoBuilder = new DefaultManagedObject.Builder&lt;',
1008N/A $dmo-java-name, 'CfgClient, ',
1008N/A $dmo-java-name, 'Cfg&gt;(',
1008N/A $dmo-java-name, 'CfgDefn.getInstance());&#xa;')" />
1008N/A <xsl:for-each select="adm:property">
1008N/A <xsl:value-of
1008N/A select="concat(' dmoBuilder.setPropertyValues(&quot;', @name, '&quot;')" />
1008N/A <xsl:for-each select="adm:value">
1008N/A <xsl:value-of
1008N/A select="concat(', &quot;', normalize-space(), '&quot;')" />
1008N/A </xsl:for-each>
1008N/A <xsl:value-of select="');&#xa;'" />
1008N/A </xsl:for-each>
1008N/A <xsl:choose>
1008N/A <xsl:when test="@name">
1008N/A <xsl:value-of
1008N/A select="concat(' builder.setDefaultManagedObject(&quot;', @name, '&quot;, dmoBuilder.getInstance());&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of
1008N/A select="' builder.setDefaultManagedObject(dmoBuilder.getInstance());&#xa;'" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A <xsl:value-of select="' }&#xa;'" />
1008N/A </xsl:for-each>
1008N/A <xsl:if test="@advanced='true'">
1008N/A <xsl:value-of
1008N/A select="' builder.setOption(RelationOption.ADVANCED);&#xa;'" />
1008N/A </xsl:if>
1008N/A <xsl:if test="@hidden='true'">
1008N/A <xsl:value-of
1008N/A select="' builder.setOption(RelationOption.HIDDEN);&#xa;'" />
1008N/A </xsl:if>
1008N/A <xsl:value-of
1008N/A select="concat(' RD_', $java-relation-name, ' = builder.getInstance();&#xa;')" />
1008N/A <xsl:value-of
1008N/A select="concat(' INSTANCE.registerRelationDefinition(RD_', $java-relation-name,');&#xa;')" />
1008N/A <xsl:value-of select="' }&#xa;'" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate a property definition getter for a locally defined
1008N/A or overriden property.
1008N/A -->
1008N/A <xsl:template name="generate-property-definition-getter">
1008N/A <xsl:variable name="java-prop-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="@name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:variable name="java-prop-name-constant">
1008N/A <xsl:call-template name="name-to-java-constant">
1008N/A <xsl:with-param name="value" select="@name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:variable name="type">
1008N/A <xsl:call-template name="get-property-definition-type" />
1008N/A </xsl:variable>
1008N/A <xsl:variable name="generic-type">
1008N/A <xsl:call-template name="get-property-definition-generic-type" />
1008N/A </xsl:variable>
1008N/A <xsl:variable name="pdtype">
1008N/A <xsl:choose>
1008N/A <xsl:when test="string-length($generic-type) != 0">
1008N/A <xsl:value-of
1008N/A select="concat($type, '&lt;', $generic-type, '&gt;')" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of select="$type" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:variable>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * Get the &quot;',
1008N/A @name,
1008N/A '&quot; property definition.&#xa;')" />
1008N/A <xsl:if test="adm:synopsis">
1008N/A <xsl:value-of select="' * &lt;p&gt;&#xa;'" />
1008N/A <xsl:call-template name="add-java-comment">
1008N/A <xsl:with-param name="indent-text" select="' *'" />
1008N/A <xsl:with-param name="content" select="adm:synopsis" />
1008N/A </xsl:call-template>
1008N/A </xsl:if>
1008N/A <xsl:if test="adm:description">
1089N/A <xsl:value-of select="' * &lt;p&gt;&#xa;'" />
1008N/A <xsl:call-template name="add-java-comment">
1008N/A <xsl:with-param name="indent-text" select="' *'" />
1008N/A <xsl:with-param name="content" select="adm:description" />
1008N/A </xsl:call-template>
1008N/A </xsl:if>
1008N/A <xsl:choose>
1008N/A <xsl:when
1089N/A test="adm:profile[@name='preprocessor']/admpp:last-defined-in[@name=$this-name and @package=$this-package]">
1008N/A <xsl:value-of
1008N/A select="concat(' *&#xa;',
1008N/A ' * @return Returns the &quot;',
1008N/A @name,
1008N/A '&quot; property definition.&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public ',
1008N/A $pdtype,
1008N/A ' get',
1008N/A $java-prop-name,
1008N/A 'PropertyDefinition() {&#xa;' ,
1008N/A ' return PD_',
1008N/A $java-prop-name-constant ,
1008N/A ';&#xa;' ,
1008N/A ' }&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of
1008N/A select="concat(' *&#xa;',
1008N/A ' * @return Returns the &quot;',
1008N/A @name,
1008N/A '&quot; property definition.&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public ',
1008N/A $pdtype,
1008N/A ' get',
1008N/A $java-prop-name,
1008N/A 'PropertyDefinition() {&#xa;' ,
1008N/A ' return ',
1008N/A $parent-java-class, 'CfgDefn.getInstance().get',
1008N/A $java-prop-name,
1008N/A 'PropertyDefinition();&#xa;',
1008N/A ' }&#xa;')" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate a relation definition getter.
1008N/A -->
1008N/A <xsl:template name="generate-relation-definition-getter">
1008N/A <xsl:variable name="relation-name">
1008N/A <xsl:choose>
1008N/A <xsl:when test="adm:one-to-many">
1008N/A <xsl:value-of select="adm:one-to-many/@plural-name" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of select="@name" />
1008N/A </xsl:otherwise>
1418N/A </xsl:choose>
1008N/A </xsl:variable>
1008N/A <xsl:variable name="java-relation-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="$relation-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:variable name="java-relation-name-constant">
1008N/A <xsl:call-template name="name-to-java-constant">
1008N/A <xsl:with-param name="value" select="$relation-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1418N/A ' * Get the &quot;',
1008N/A $relation-name,
1418N/A '&quot; relation definition.&#xa;',
1008N/A ' *&#xa;',
1008N/A ' * @return Returns the &quot;',
1008N/A $relation-name,
1008N/A '&quot; relation definition.&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public ')" />
1008N/A <xsl:choose>
1418N/A <xsl:when test="adm:one-to-one">
1418N/A <xsl:text>SingletonRelationDefinition&lt;</xsl:text>
1426N/A </xsl:when>
1426N/A <xsl:when test="adm:one-to-zero-or-one">
1418N/A <xsl:text>OptionalRelationDefinition&lt;</xsl:text>
1008N/A </xsl:when>
1418N/A <xsl:when test="adm:one-to-many">
1008N/A <xsl:text>InstantiableRelationDefinition&lt;</xsl:text>
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:message terminate="yes">
1008N/A <xsl:value-of
1008N/A select="concat('Unknown relation type &quot;', local-name(*), '&quot; in relation &quot;', @name, '&quot;.')" />
1008N/A </xsl:message>
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A <xsl:variable name="java-managed-object-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="@managed-object-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:choose>
1008N/A <xsl:when
1008N/A test="adm:profile[@name='preprocessor']/admpp:last-defined-in[@name=$this-name and @package=$this-package]">
1008N/A <xsl:value-of
1008N/A select="concat($java-managed-object-name, 'CfgClient,',
1008N/A $java-managed-object-name, 'Cfg&gt; get',
1008N/A $java-relation-name,
1008N/A 'RelationDefinition() {&#xa;' ,
1008N/A ' return RD_',
1008N/A $java-relation-name-constant,
1008N/A ';&#xa;' ,
1008N/A ' }&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of
1008N/A select="concat($java-managed-object-name, 'CfgClient,',
1008N/A $java-managed-object-name, 'Cfg&gt; get',
1008N/A $java-relation-name,
1008N/A 'RelationDefinition() {&#xa;' ,
1008N/A ' return ',
1008N/A $parent-java-class, 'CfgDefn.getInstance().get',
1008N/A $java-relation-name,
1008N/A 'RelationDefinition();&#xa;',
1008N/A ' }&#xa;')" />
1008N/A </xsl:otherwise>
1389N/A </xsl:choose>
1389N/A </xsl:template>
1389N/A <!--
1389N/A Generate client relation methods.
1008N/A -->
1008N/A <xsl:template name="generate-client-relation-methods">
1008N/A <xsl:variable name="name" select="@name" />
1008N/A <xsl:variable name="java-relation-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="$name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1389N/A <xsl:variable name="java-class-name">
1389N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="@managed-object-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:choose>
1008N/A <xsl:when test="adm:one-to-one">
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1389N/A ' public ', $java-class-name, 'CfgClient get', $java-relation-name, '()&#xa;',
1389N/A ' throws DefinitionDecodingException, ManagedObjectDecodingException,&#xa;',
1389N/A ' ManagedObjectNotFoundException, ConcurrentModificationException,&#xa;',
1389N/A ' AuthorizationException, CommunicationException {&#xa;',
1008N/A ' return impl.getChild(INSTANCE.get', $java-relation-name,'RelationDefinition()).getConfiguration();&#xa;',
1008N/A ' }&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:when test="adm:one-to-zero-or-one">
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public boolean has', $java-relation-name, '() throws ConcurrentModificationException,&#xa;',
1389N/A ' AuthorizationException, CommunicationException {&#xa;',
1418N/A ' return impl.hasChild(INSTANCE.get', $java-relation-name,'RelationDefinition());&#xa;',
1418N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public ', $java-class-name, 'CfgClient get', $java-relation-name, '()&#xa;',
1389N/A ' throws DefinitionDecodingException, ManagedObjectDecodingException,&#xa;',
1389N/A ' ManagedObjectNotFoundException, ConcurrentModificationException,&#xa;',
1389N/A ' AuthorizationException, CommunicationException {&#xa;',
1008N/A ' return impl.getChild(INSTANCE.get', $java-relation-name,'RelationDefinition()).getConfiguration();&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public &lt;M extends ', $java-class-name, 'CfgClient&gt; M create', $java-relation-name, '(&#xa;',
1008N/A ' ManagedObjectDefinition&lt;M, ? extends ', $java-class-name,'Cfg&gt; d, Collection&lt;DefaultBehaviorException&gt; exceptions) {&#xa;',
1008N/A ' return impl.createChild(INSTANCE.get', $java-relation-name,'RelationDefinition(), d, exceptions).getConfiguration();&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1389N/A <xsl:text>&#xa;</xsl:text>
1389N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public void remove', $java-relation-name, '()&#xa;',
1008N/A ' throws ManagedObjectNotFoundException, ConcurrentModificationException,&#xa;',
1008N/A ' OperationRejectedException, AuthorizationException, CommunicationException {&#xa;',
1008N/A ' impl.removeChild(INSTANCE.get', $java-relation-name,'RelationDefinition());&#xa;',
1008N/A ' }&#xa;')" />
1008N/A </xsl:when>
1389N/A <xsl:when test="adm:one-to-many">
1389N/A <xsl:variable name="plural-name"
1389N/A select="adm:one-to-many/@plural-name" />
1389N/A <xsl:variable name="java-relation-plural-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="$plural-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public String[] list', $java-relation-plural-name, '() throws ConcurrentModificationException,&#xa;',
1389N/A ' AuthorizationException, CommunicationException {&#xa;',
1884N/A ' return impl.listChildren(INSTANCE.get', $java-relation-plural-name,'RelationDefinition());&#xa;',
1418N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public ', $java-class-name, 'CfgClient get', $java-relation-name, '(String name)&#xa;',
1389N/A ' throws DefinitionDecodingException, ManagedObjectDecodingException,&#xa;',
1389N/A ' ManagedObjectNotFoundException, ConcurrentModificationException,&#xa;',
1389N/A ' AuthorizationException, CommunicationException {&#xa;',
1008N/A ' return impl.getChild(INSTANCE.get', $java-relation-plural-name,'RelationDefinition(), name).getConfiguration();&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public &lt;M extends ', $java-class-name, 'CfgClient&gt; M create', $java-relation-name, '(&#xa;',
1008N/A ' ManagedObjectDefinition&lt;M, ? extends ', $java-class-name,'Cfg&gt; d, String name, Collection&lt;DefaultBehaviorException&gt; exceptions) throws IllegalManagedObjectNameException {&#xa;',
1008N/A ' return impl.createChild(INSTANCE.get', $java-relation-plural-name,'RelationDefinition(), d, name, exceptions).getConfiguration();&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public void remove', $java-relation-name, '(String name)&#xa;',
1008N/A ' throws ManagedObjectNotFoundException, ConcurrentModificationException,&#xa;',
1008N/A ' OperationRejectedException, AuthorizationException, CommunicationException {&#xa;',
1008N/A ' impl.removeChild(INSTANCE.get', $java-relation-plural-name,'RelationDefinition(), name);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:message terminate="yes">
1008N/A <xsl:value-of
1008N/A select="concat('Unknown relation type &quot;', local-name(*), '&quot; in relation &quot;', $name, '&quot;.')" />
1008N/A </xsl:message>
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate server relation methods.
1008N/A -->
1008N/A <xsl:template name="generate-server-relation-methods">
1008N/A <xsl:variable name="name" select="@name" />
1008N/A <xsl:variable name="java-relation-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="$name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:variable name="java-class-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="@managed-object-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:choose>
1008N/A <xsl:when test="adm:one-to-one">
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public ', $java-class-name, 'Cfg get',
1008N/A $java-relation-name, '() throws ConfigException {&#xa;',
1008N/A ' return impl.getChild(INSTANCE.get', $java-relation-name, 'RelationDefinition()).getConfiguration();&#xa;',
1008N/A ' }&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:when test="adm:one-to-zero-or-one">
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public boolean has',
1008N/A $java-relation-name, '() {&#xa;',
1008N/A ' return impl.hasChild(INSTANCE.get', $java-relation-name, 'RelationDefinition());&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public ', $java-class-name, 'Cfg get',
1008N/A $java-relation-name, '() throws ConfigException {&#xa;',
1008N/A ' return impl.getChild(INSTANCE.get', $java-relation-name, 'RelationDefinition()).getConfiguration();&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public void add', $java-relation-name, 'AddListener(&#xa;',
1008N/A ' ConfigurationAddListener&lt;', $java-class-name,'Cfg&gt; listener) throws ConfigException {&#xa;',
1008N/A ' impl.registerAddListener(INSTANCE.get', $java-relation-name, 'RelationDefinition(), listener);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public void remove', $java-relation-name, 'AddListener(&#xa;',
1008N/A ' ConfigurationAddListener&lt;', $java-class-name,'Cfg&gt; listener) {&#xa;',
1008N/A ' impl.deregisterAddListener(INSTANCE.get', $java-relation-name, 'RelationDefinition(), listener);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public void add', $java-relation-name, 'DeleteListener(&#xa;',
1008N/A ' ConfigurationDeleteListener&lt;', $java-class-name,'Cfg&gt; listener) throws ConfigException {&#xa;',
1008N/A ' impl.registerDeleteListener(INSTANCE.get', $java-relation-name, 'RelationDefinition(), listener);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public void remove', $java-relation-name, 'DeleteListener(&#xa;',
1008N/A ' ConfigurationDeleteListener&lt;', $java-class-name,'Cfg&gt; listener) {&#xa;',
1008N/A ' impl.deregisterDeleteListener(INSTANCE.get', $java-relation-name, 'RelationDefinition(), listener);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:when test="adm:one-to-many">
1008N/A <xsl:variable name="plural-name"
1008N/A select="adm:one-to-many/@plural-name" />
1008N/A <xsl:variable name="java-relation-plural-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="$plural-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public String[] list',
1008N/A $java-relation-plural-name, '() {&#xa;',
1008N/A ' return impl.listChildren(INSTANCE.get', $java-relation-plural-name,'RelationDefinition());&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public ', $java-class-name, 'Cfg get',
1008N/A $java-relation-name, '(String name) throws ConfigException {&#xa;',
1008N/A ' return impl.getChild(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), name).getConfiguration();&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public void add', $java-relation-name, 'AddListener(&#xa;',
1008N/A ' ConfigurationAddListener&lt;', $java-class-name,'Cfg&gt; listener) throws ConfigException {&#xa;',
1008N/A ' impl.registerAddListener(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), listener);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public void remove', $java-relation-name, 'AddListener(&#xa;',
1008N/A ' ConfigurationAddListener&lt;', $java-class-name,'Cfg&gt; listener) {&#xa;',
1008N/A ' impl.deregisterAddListener(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), listener);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public void add', $java-relation-name, 'DeleteListener(&#xa;',
1008N/A ' ConfigurationDeleteListener&lt;', $java-class-name,'Cfg&gt; listener) throws ConfigException {&#xa;',
1008N/A ' impl.registerDeleteListener(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), listener);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public void remove', $java-relation-name, 'DeleteListener(&#xa;',
1008N/A ' ConfigurationDeleteListener&lt;', $java-class-name,'Cfg&gt; listener) {&#xa;',
1008N/A ' impl.deregisterDeleteListener(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), listener);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:message terminate="yes">
1008N/A <xsl:value-of
1008N/A select="concat('Unknown relation type &quot;', local-name(*), '&quot; in relation &quot;', $name, '&quot;.')" />
1008N/A </xsl:message>
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate change listener registration methods.
1008N/A -->
1008N/A <xsl:template name="generate-change-listener">
1008N/A <!--
1008N/A Process this managed object.
1008N/A -->
1008N/A <xsl:variable name="top-name"
1008N/A select="$this/adm:profile[@name='preprocessor']/admpp:parent-managed-object[last()]/@name" />
1008N/A <xsl:call-template name="generate-change-listener-help">
1008N/A <xsl:with-param name="top-name" select="$top-name" />
1008N/A <xsl:with-param name="name" select="$this-name" />
1008N/A </xsl:call-template>
1008N/A <!--
1008N/A Process parent hierarchy.
1008N/A -->
1008N/A <xsl:for-each
1008N/A select="$this/adm:profile[@name='preprocessor']/admpp:parent-managed-object">
1008N/A <xsl:call-template name="generate-change-listener-help">
1008N/A <xsl:with-param name="top-name" select="$top-name" />
1008N/A <xsl:with-param name="name" select="@name" />
1008N/A </xsl:call-template>
1008N/A </xsl:for-each>
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate a single set of change listener registration methods.
1008N/A -->
1008N/A <xsl:template name="generate-change-listener-help">
1008N/A <xsl:param name="top-name" select="/.." />
1008N/A <xsl:param name="name" select="/.." />
1008N/A <xsl:variable name="short-name">
1008N/A <xsl:choose>
1008N/A <xsl:when test="not($top-name) or $top-name = $name">
1008N/A <xsl:value-of select="''" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:variable name="top-length"
1008N/A select="string-length($top-name)" />
1008N/A <xsl:variable name="length" select="string-length($name)" />
1008N/A <xsl:variable name="diff" select="$length - $top-length" />
1008N/A <xsl:value-of select="substring($name, 1, $diff - 1)" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:variable>
1008N/A <xsl:variable name="java-class">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="$name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:variable name="short-java-class">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="$short-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;')" />
1008N/A <xsl:value-of
1008N/A select="concat(' public void add', $short-java-class, 'ChangeListener(&#xa;',
1008N/A ' ConfigurationChangeListener&lt;',$java-class,'Cfg&gt; listener) {&#xa;',
1008N/A ' impl.registerChangeListener(listener);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;')" />
1008N/A <xsl:value-of
1008N/A select="concat(' public void remove', $short-java-class, 'ChangeListener(&#xa;',
1008N/A ' ConfigurationChangeListener&lt;',$java-class,'Cfg&gt; listener) {&#xa;',
1008N/A ' impl.deregisterChangeListener(listener);&#xa;',
1008N/A ' }&#xa;')" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate import statements for change-listener
1008N/A -->
1008N/A <xsl:template name="generate-change-listener-import-statements">
1008N/A <!--
1008N/A Process this managed object.
1008N/A -->
1008N/A <xsl:element name="import">
1008N/A <xsl:value-of
1008N/A select="concat($this-package, '.server.', $this-java-class, 'Cfg')" />
1008N/A </xsl:element>
1008N/A <!--
1008N/A Process parent hierarchy.
1008N/A -->
1008N/A <xsl:for-each
1008N/A select="$this/adm:profile[@name='preprocessor']/admpp:parent-managed-object">
1008N/A <xsl:variable name="java-class">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="@name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:element name="import">
1008N/A <xsl:value-of
1008N/A select="concat(@package, '.server.', $java-class, 'Cfg')" />
1008N/A </xsl:element>
1008N/A </xsl:for-each>
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate an enumeration for a locally defined enumerated property.
1008N/A -->
1008N/A <xsl:template name="generate-enumeration">
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * Defines the set of permissable values for the &quot;', @name, '&quot; property.&#xa;')" />
1008N/A <xsl:if test="adm:synopsis">
1008N/A <xsl:value-of select="' * &lt;p&gt;&#xa;'" />
1008N/A <xsl:call-template name="add-java-comment">
1008N/A <xsl:with-param name="indent-text" select="' *'" />
1141N/A <xsl:with-param name="content" select="adm:synopsis" />
1008N/A </xsl:call-template>
1008N/A </xsl:if>
1008N/A <xsl:if test="adm:description">
1008N/A <xsl:value-of select="' * &lt;p&gt;&#xa;'" />
1008N/A <xsl:call-template name="add-java-comment">
1008N/A <xsl:with-param name="indent-text" select="' *'" />
1008N/A <xsl:with-param name="content" select="adm:description" />
1008N/A </xsl:call-template>
1008N/A </xsl:if>
1008N/A <xsl:value-of
1008N/A select="concat(' */&#xa;',
1008N/A ' public static enum ')" />
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value" select="@name" />
1008N/A </xsl:call-template>
1008N/A <xsl:value-of select="' {&#xa;'" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:for-each select="adm:syntax/adm:enumeration/adm:value">
1008N/A <xsl:sort select="@name" />
1008N/A <xsl:value-of select="' /**&#xa;'" />
1008N/A <xsl:call-template name="add-java-comment">
1008N/A <xsl:with-param name="indent-text" select="' *'" />
1008N/A <xsl:with-param name="content" select="adm:synopsis" />
1008N/A </xsl:call-template>
1008N/A <xsl:value-of select="' */&#xa;'" />
1008N/A <xsl:value-of select="' '" />
1008N/A <xsl:call-template name="name-to-java-constant">
1008N/A <xsl:with-param name="value" select="@name" />
1008N/A </xsl:call-template>
1008N/A <xsl:value-of select="concat('(&quot;', @name, '&quot;)')" />
1008N/A <xsl:choose>
1008N/A <xsl:when test="position() != last()">
1008N/A <xsl:value-of select="',&#xa;'" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of select="';&#xa;'" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:for-each>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="' // String representation of the value.&#xa;'" />
1008N/A <xsl:value-of select="' private final String name;&#xa;'" />
1008N/A <xsl:text>&#xa;</xsl:text>
1906N/A <xsl:text>&#xa;</xsl:text>
1906N/A <xsl:text>&#xa;</xsl:text>
1906N/A <xsl:value-of select="' // Private constructor.&#xa;'" />
1906N/A <xsl:value-of select="' private '" />
1906N/A <xsl:call-template name="name-to-java">
1906N/A <xsl:with-param name="value" select="@name" />
1906N/A </xsl:call-template>
1906N/A <xsl:value-of
1906N/A select="concat('(String name) { this.name = name; }&#xa;',
1906N/A '&#xa;',
1906N/A '&#xa;',
1906N/A '&#xa;',
1906N/A ' /**&#xa;',
1906N/A ' * {@inheritDoc}&#xa;',
1906N/A ' */&#xa;',
1906N/A ' public String toString() { return name; }&#xa;')" />
1906N/A <xsl:text>&#xa;</xsl:text>
1906N/A <xsl:value-of select="' }&#xa;'" />
1906N/A </xsl:template>
1906N/A <!--
1906N/A Main document parsing template.
1906N/A -->
1906N/A <xsl:template match="/">
1906N/A <!-- Perform some initial validation.
1906N/A -->
1906N/A <xsl:for-each select="$this-all-properties">
1906N/A <!--
1906N/A Check that all non-mandatory properties have a default behavior.
1906N/A -->
1906N/A <xsl:if
1906N/A test="not(@mandatory='true') and not(adm:default-behavior)">
1906N/A <xsl:message terminate="yes">
1906N/A <xsl:value-of
1906N/A select="concat('No default behavior defined for non-mandatory property &quot;', @name,
1906N/A '&quot;.')" />
1906N/A </xsl:message>
1906N/A </xsl:if>
1906N/A <!--
1906N/A Check that all advanced properties conform to one of
1008N/A the following rules:
1008N/A
1008N/A * is mandatory and has a defined default value(s)
1008N/A * is mandatory and is part of an advanced managed object
1008N/A * is mandatory and is part of an abstract managed object
1008N/A * is not mandatory
1008N/A -->
1008N/A <xsl:choose>
1008N/A <xsl:when test="$this-is-advanced">
1008N/A <!-- OK -->
1008N/A </xsl:when>
1418N/A <xsl:when test="$this-is-abstract">
1008N/A <!-- OK -->
1906N/A </xsl:when>
1008N/A <xsl:when test="@advanced='true' and @mandatory='true'">
1008N/A <xsl:choose>
1008N/A <xsl:when test="adm:default-behavior/adm:defined">
1565N/A <!-- OK -->
1565N/A </xsl:when>
1565N/A <xsl:when test="adm:default-behavior/adm:inherited">
1548N/A <!-- OK -->
1548N/A </xsl:when>
1548N/A <xsl:otherwise>
1008N/A <xsl:message terminate="yes">
1433N/A <xsl:value-of
1008N/A select="concat('Advanced property &quot;', @name,
1008N/A '&quot; must have defined or inherited default values.')" />
1008N/A </xsl:message>
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:when>
1008N/A </xsl:choose>
1008N/A </xsl:for-each>
1008N/A <!--
1008N/A Now generate the definition.
1008N/A -->
1418N/A <xsl:call-template name="copyright-notice" />
1418N/A <xsl:value-of
1418N/A select="concat('package ', $this-package, '.meta;&#xa;')" />
1418N/A <xsl:text>&#xa;</xsl:text>
1418N/A <xsl:text>&#xa;</xsl:text>
1418N/A <xsl:text>&#xa;</xsl:text>
1418N/A <xsl:call-template name="generate-import-statements">
1418N/A <xsl:with-param name="imports">
1418N/A <xsl:if test="not(boolean($this/@extends))">
1418N/A <import>org.opends.server.admin.TopCfgDefn</import>
1418N/A </xsl:if>
1418N/A <xsl:if test="$this/adm:constraint">
1418N/A <import>org.opends.server.admin.GenericConstraint</import>
1418N/A <import>org.opends.server.admin.condition.Conditions</import>
1418N/A </xsl:if>
1418N/A <xsl:if
1418N/A test="$this-local-properties[@multi-valued='true' or
1418N/A @read-only='true' or
1418N/A @monitoring='true' or
1418N/A @hidden='true' or
1418N/A @advanced='true' or
1418N/A @mandatory='true']">
1418N/A <import>org.opends.server.admin.PropertyOption</import>
1418N/A </xsl:if>
1418N/A <xsl:if test="$this-local-properties">
1418N/A <import>org.opends.server.admin.AdministratorAction</import>
1418N/A </xsl:if>
1418N/A <xsl:if test="$this/adm:tag-definition or $this/adm:tag">
1008N/A <import>org.opends.server.admin.Tag</import>
1008N/A </xsl:if>
1008N/A <xsl:if
1008N/A test="$this-local-properties[adm:default-behavior/adm:undefined or not(adm:default-behavior)]">
1008N/A <import>
1008N/A org.opends.server.admin.UndefinedDefaultBehaviorProvider
1008N/A </import>
1008N/A </xsl:if>
1008N/A <xsl:if
1008N/A test="$this-local-properties/adm:default-behavior/adm:alias">
1008N/A <import>
1008N/A org.opends.server.admin.AliasDefaultBehaviorProvider
1008N/A </import>
1008N/A </xsl:if>
1008N/A <xsl:if
1008N/A test="$this-local-properties/adm:default-behavior/adm:inherited/adm:absolute">
1008N/A <import>
1008N/A org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider
1008N/A </import>
1008N/A </xsl:if>
1008N/A <xsl:if
1008N/A test="$this-local-properties/adm:default-behavior/adm:inherited/adm:relative">
1008N/A <import>
1008N/A org.opends.server.admin.RelativeInheritedDefaultBehaviorProvider
1008N/A </import>
1008N/A <xsl:for-each
1008N/A select="$this-local-properties/adm:default-behavior/adm:inherited/adm:relative">
1008N/A <xsl:if test="@managed-object-package != $this-package">
1008N/A <xsl:variable name="java-class-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value"
1008N/A select="@managed-object-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:element name="import">
1008N/A <xsl:value-of
1008N/A select="concat(@managed-object-package, '.meta.', $java-class-name, 'CfgDefn')" />
1008N/A </xsl:element>
1008N/A </xsl:if>
1906N/A </xsl:for-each>
1893N/A </xsl:if>
1893N/A <xsl:if
1142N/A test="$this-local-properties/adm:default-behavior/adm:defined">
1142N/A <import>
1142N/A org.opends.server.admin.DefinedDefaultBehaviorProvider
1142N/A </import>
1142N/A <import>
1142N/A org.opends.server.admin.DefaultBehaviorProvider
1142N/A </import>
1142N/A </xsl:if>
1142N/A <xsl:element name="import">
1142N/A <xsl:value-of
1142N/A select="concat($this-package, '.client.', $this-java-class, 'CfgClient')" />
1142N/A </xsl:element>
1142N/A <xsl:element name="import">
1142N/A <xsl:value-of
1142N/A select="concat($this-package, '.server.', $this-java-class, 'Cfg')" />
1008N/A </xsl:element>
1008N/A <xsl:for-each select="$this-inherited-properties">
1008N/A <xsl:call-template name="get-property-java-imports">
1008N/A <xsl:with-param name="interface" select="'server'" />
1008N/A </xsl:call-template>
1008N/A </xsl:for-each>
1008N/A <xsl:for-each select="$this-all-properties">
1008N/A <xsl:call-template
1008N/A name="get-property-definition-java-imports" />
1008N/A </xsl:for-each>
1008N/A <xsl:for-each select="$this-all-relations">
1389N/A <xsl:variable name="java-class-name">
1418N/A <xsl:call-template name="name-to-java">
1418N/A <xsl:with-param name="value"
1418N/A select="@managed-object-name" />
1418N/A </xsl:call-template>
1418N/A </xsl:variable>
1418N/A <xsl:element name="import">
1389N/A <xsl:value-of
1389N/A select="concat(@managed-object-package, '.client.', $java-class-name, 'CfgClient')" />
1389N/A </xsl:element>
1389N/A <xsl:element name="import">
1389N/A <xsl:value-of
1389N/A select="concat(@managed-object-package, '.server.', $java-class-name, 'Cfg')" />
1389N/A </xsl:element>
1389N/A </xsl:for-each>
1389N/A <xsl:if
1389N/A test="$this-local-relations/*/adm:default-managed-object">
1389N/A <import>org.opends.server.admin.DefaultManagedObject</import>
1008N/A </xsl:if>
1008N/A <xsl:for-each
1008N/A select="$this-local-relations/*/adm:default-managed-object">
1008N/A <xsl:variable name="java-class-name">
1008N/A <xsl:call-template name="name-to-java">
1008N/A <xsl:with-param name="value"
1008N/A select="@managed-object-name" />
1008N/A </xsl:call-template>
1008N/A </xsl:variable>
1008N/A <xsl:element name="import">
1008N/A <xsl:value-of
1008N/A select="concat(@managed-object-package, '.client.', $java-class-name, 'CfgClient')" />
1008N/A </xsl:element>
1008N/A <xsl:element name="import">
1389N/A <xsl:value-of
1389N/A select="concat(@managed-object-package, '.server.', $java-class-name, 'Cfg')" />
1389N/A </xsl:element>
1389N/A <xsl:element name="import">
1389N/A <xsl:value-of
1389N/A select="concat(@managed-object-package, '.meta.', $java-class-name, 'CfgDefn')" />
1389N/A </xsl:element>
1389N/A </xsl:for-each>
1389N/A <xsl:if
1389N/A test="$this-local-relations[@advanced='true' or @hidden='true']">
1389N/A <import>org.opends.server.admin.RelationOption</import>
1008N/A </xsl:if>
1418N/A <xsl:if test="$this-is-hidden or $this-is-advanced">
1008N/A <import>org.opends.server.admin.ManagedObjectOption</import>
1884N/A </xsl:if>
1884N/A <xsl:if test="$this-all-relations/adm:one-to-many">
1884N/A <import>
1418N/A org.opends.server.admin.InstantiableRelationDefinition
1389N/A </import>
1389N/A </xsl:if>
1008N/A <xsl:if test="$this-all-relations/adm:one-to-zero-or-one">
1008N/A <import>
1008N/A org.opends.server.admin.OptionalRelationDefinition
1008N/A </import>
1008N/A </xsl:if>
1008N/A <xsl:if test="$this-all-relations/adm:one-to-one">
1008N/A <import>
1008N/A org.opends.server.admin.SingletonRelationDefinition
1418N/A </import>
1008N/A </xsl:if>
1418N/A <xsl:choose>
1389N/A <xsl:when test="$this-is-abstract">
1389N/A <import>
1008N/A org.opends.server.admin.AbstractManagedObjectDefinition
1008N/A </import>
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <import>
1008N/A org.opends.server.admin.ManagedObjectDefinition
1008N/A </import>
1008N/A <import>org.opends.server.admin.PropertyProvider</import>
1008N/A <import>
1008N/A org.opends.server.admin.client.MissingMandatoryPropertiesException
1008N/A </import>
1008N/A <import>
1008N/A org.opends.server.admin.ManagedObjectAlreadyExistsException
1008N/A </import>
1418N/A <import>
1426N/A org.opends.server.admin.client.AuthorizationException
1426N/A </import>
1426N/A <import>
1418N/A org.opends.server.admin.client.CommunicationException
1008N/A </import>
1008N/A <import>
1008N/A org.opends.server.admin.client.ConcurrentModificationException
1008N/A </import>
1008N/A <import>
1008N/A org.opends.server.admin.client.OperationRejectedException
1008N/A </import>
1008N/A <import>
1008N/A org.opends.server.admin.client.ManagedObject
1008N/A </import>
1008N/A <import>
1008N/A org.opends.server.admin.server.ServerManagedObject
1008N/A </import>
1008N/A <xsl:if test="not($this-is-root)">
1008N/A <import>
1008N/A org.opends.server.admin.server.ConfigurationChangeListener
1008N/A </import>
1008N/A <xsl:call-template
1008N/A name="generate-change-listener-import-statements" />
1008N/A </xsl:if>
1008N/A <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.client.IllegalManagedObjectNameException
</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>