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 !
6983N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
6983N/A ! or http://forgerock.org/license/CDDLv1.0.html.
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
6983N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
6983N/A ! If applicable, add the following below this CDDL HEADER, with the
6983N/A ! fields enclosed by brackets "[]" replaced with your own identifying
6983N/A ! information:
1008N/A ! Portions Copyright [yyyy] [name of copyright owner]
1008N/A !
1008N/A ! CDDL HEADER END
1008N/A !
1008N/A !
4990N/A ! Copyright 2007-2010 Sun Microsystems, Inc.
5487N/A ! Portions copyright 2011 ForgeRock AS.
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
2345N/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" />
2517N/A <xsl:if
2517N/A test="not(adm:profile[@name='preprocessor']/admpp:first-defined-in)">
2345N/A <xsl:text>&#xa;</xsl:text>
2345N/A <xsl:text>&#xa;</xsl:text>
2345N/A <xsl:text>&#xa;</xsl:text>
2345N/A <xsl:call-template name="generate-enumeration" />
2345N/A </xsl:if>
1008N/A </xsl:for-each>
1008N/A <!--
1548N/A Define application tags if this is the root configuration.
1548N/A -->
1548N/A <xsl:if test="$this-is-root">
1548N/A <xsl:text>&#xa;</xsl:text>
1548N/A <xsl:text>&#xa;</xsl:text>
1548N/A <xsl:text>&#xa;</xsl:text>
1565N/A <xsl:value-of select="' // Define managed object tags.&#xa;'" />
1565N/A <xsl:value-of select="' static {&#xa;'" />
1548N/A <xsl:for-each select="$this/adm:tag-definition">
1548N/A <xsl:sort select="@name" />
1565N/A <xsl:value-of
1565N/A select="concat(' Tag.define(&quot;', @name, '&quot;);&#xa;')" />
1548N/A </xsl:for-each>
1565N/A <xsl:value-of select="' }&#xa;'" />
1548N/A </xsl:if>
1548N/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>
1008N/A <xsl:call-template name="generate-relation-constructor" />
1008N/A </xsl:for-each>
1008N/A <!--
2872N/A Register any optins associated with this managed object definition.
2872N/A -->
2872N/A <xsl:if test="$this-is-advanced or $this-is-hidden">
2872N/A <xsl:text>&#xa;</xsl:text>
2872N/A <xsl:text>&#xa;</xsl:text>
2872N/A <xsl:text>&#xa;</xsl:text>
2872N/A <xsl:value-of
2872N/A select="' // Register the options associated with this managed object definition.&#xa;'" />
2872N/A <xsl:value-of select="' static {&#xa;'" />
2872N/A <xsl:if test="$this-is-advanced">
2872N/A <xsl:value-of
5018N/A select="' INSTANCE.registerOption(ManagedObjectOption.ADVANCED);&#xa;'" />
2872N/A </xsl:if>
2872N/A <xsl:if test="$this-is-hidden">
2872N/A <xsl:value-of
5018N/A select="' INSTANCE.registerOption(ManagedObjectOption.HIDDEN);&#xa;'" />
2872N/A </xsl:if>
2872N/A <xsl:value-of select="' }&#xa;'" />
2872N/A </xsl:if>
2872N/A <!--
1548N/A Register any tags associated with this managed object definition.
1548N/A -->
1548N/A <xsl:if test="$this/adm:tag">
1548N/A <xsl:text>&#xa;</xsl:text>
1548N/A <xsl:text>&#xa;</xsl:text>
1548N/A <xsl:text>&#xa;</xsl:text>
1565N/A <xsl:value-of
1565N/A select="' // Register the tags associated with this managed object definition.&#xa;'" />
1565N/A <xsl:value-of select="' static {&#xa;'" />
1548N/A <xsl:for-each select="$this/adm:tag">
1548N/A <xsl:sort select="@name" />
1565N/A <xsl:value-of
1565N/A select="concat(' INSTANCE.registerTag(Tag.valueOf(&quot;', @name, '&quot;));&#xa;')" />
1548N/A </xsl:for-each>
1565N/A <xsl:value-of select="' }&#xa;'" />
1548N/A </xsl:if>
1548N/A <!--
2648N/A Register any constraints associated with this managed object definition.
2648N/A -->
2648N/A <xsl:if test="$this/adm:constraint">
2648N/A <xsl:text>&#xa;</xsl:text>
2648N/A <xsl:text>&#xa;</xsl:text>
2648N/A <xsl:text>&#xa;</xsl:text>
2648N/A <xsl:value-of
2648N/A select="' // Register the constraints associated with this managed object definition.&#xa;'" />
2648N/A <xsl:value-of select="' static {&#xa;'" />
2648N/A <xsl:for-each select="$this/adm:constraint">
2648N/A <xsl:value-of
2648N/A select="concat(' INSTANCE.registerConstraint(new GenericConstraint(INSTANCE, ', position(), ', ')" />
2648N/A <xsl:apply-templates select="adm:condition/*"
2648N/A mode="compile-condition" />
2648N/A <xsl:value-of select="'));&#xa;'" />
2648N/A </xsl:for-each>
2648N/A <xsl:value-of select="' }&#xa;'" />
2648N/A </xsl:if>
2648N/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,
2521N/A '&quot;, TopCfgDefn.getInstance());&#xa;')" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
2345N/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,
1008N/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.
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 '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 <!--
1142N/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 <!--
1142N/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" />
1008N/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;',
1089N/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>
2517N/A <xsl:call-template
2517N/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>
2499N/A <xsl:call-template name="generate-property-setter-implementation" />
1008N/A </xsl:for-each>
1008N/A <!--
1008N/A Relation methods.
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-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;',
1418N/A ' public void commit() throws ManagedObjectAlreadyExistsException,&#xa;',
1418N/A ' MissingMandatoryPropertiesException, ConcurrentModificationException,&#xa;',
1389N/A ' OperationRejectedException, AuthorizationException,&#xa;',
1389N/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 <!--
2517N/A Private members for each property.
2517N/A -->
2517N/A <xsl:for-each select="$this-all-properties">
2517N/A <xsl:sort select="@name" />
2517N/A <xsl:text>&#xa;</xsl:text>
2517N/A <xsl:value-of
2517N/A select="concat(' // The value of the &quot;', @name, '&quot; property.&#xa;')" />
2517N/A <xsl:value-of select="' private final '" />
2517N/A <xsl:choose>
2517N/A <xsl:when test="string(@multi-valued) != 'true'">
2517N/A <xsl:choose>
2517N/A <xsl:when test="adm:default-behavior/adm:defined">
2517N/A <!--
2517N/A The property is guaranteed to contain a value since there is a
2517N/A well-defined default value.
2517N/A -->
2517N/A <xsl:call-template
2517N/A name="get-property-java-primitive-type" />
2517N/A </xsl:when>
2517N/A <xsl:when test="@mandatory = 'true'">
2517N/A <!--
2517N/A The property is guaranteed to contain a value in the server interface.
2517N/A -->
2517N/A <xsl:call-template
2517N/A name="get-property-java-primitive-type" />
2517N/A </xsl:when>
2517N/A <xsl:otherwise>
2517N/A <xsl:call-template name="get-property-java-type" />
2517N/A </xsl:otherwise>
2517N/A </xsl:choose>
2517N/A </xsl:when>
2517N/A <xsl:otherwise>
2517N/A <xsl:value-of select="'SortedSet&lt;'" />
2517N/A <xsl:call-template name="get-property-java-type" />
2517N/A <xsl:value-of select="'&gt;'" />
2517N/A </xsl:otherwise>
2517N/A </xsl:choose>
2517N/A <xsl:value-of select="' p'" />
2517N/A <xsl:call-template name="name-to-java">
2517N/A <xsl:with-param name="value" select="@name" />
2517N/A </xsl:call-template>
2517N/A <xsl:value-of select="';&#xa;'" />
2517N/A </xsl:for-each>
2517N/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;',
2517N/A ' this.impl = impl;&#xa;')" />
2517N/A <xsl:for-each select="$this-all-properties">
2517N/A <xsl:sort select="@name" />
2517N/A <xsl:variable name="java-prop-name">
2517N/A <xsl:call-template name="name-to-java">
2517N/A <xsl:with-param name="value" select="@name" />
2517N/A </xsl:call-template>
2517N/A </xsl:variable>
2517N/A <xsl:value-of
2517N/A select="concat(' this.p', $java-prop-name, ' = ')" />
2517N/A <xsl:choose>
2517N/A <xsl:when test="string(@multi-valued) != 'true'">
2517N/A <xsl:value-of
2517N/A select="concat('impl.getPropertyValue(INSTANCE.get', $java-prop-name , 'PropertyDefinition());&#xa;')" />
2517N/A </xsl:when>
2517N/A <xsl:otherwise>
2517N/A <xsl:value-of
2517N/A select="concat('impl.getPropertyValues(INSTANCE.get', $java-prop-name , 'PropertyDefinition());&#xa;')" />
2517N/A </xsl:otherwise>
2517N/A </xsl:choose>
2517N/A </xsl:for-each>
2517N/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 <!--
2517N/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>
2517N/A <xsl:call-template
2517N/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>
1008N/A <!--
1008N/A Relation methods.
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-server-relation-methods" />
1008N/A </xsl:for-each>
1008N/A <!--
3065N/A Configuration class 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;',
3065N/A ' public Class&lt;? extends ', $this-java-class,'Cfg&gt; configurationClass() {&#xa;',
3065N/A ' return ', $this-java-class, 'Cfg.class;&#xa;',
1008N/A ' }&#xa;')" />
1008N/A <!--
1008N/A Configuration entry DN 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 DN dn() {&#xa;',
1008N/A ' return impl.getDN();&#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 a property definition constructor.
1008N/A -->
1008N/A <xsl:template name="generate-property-declaration">
1008N/A <xsl:variable name="java-prop-name">
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(' // The &quot;',
1008N/A @name,
1008N/A '&quot; property definition.&#xa;',
1008N/A ' private static final ', $pdtype, ' PD_', $java-prop-name, ';&#xa;')" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate a property definition constructor.
1008N/A -->
1008N/A <xsl:template name="generate-property-constructor">
1008N/A <xsl:variable name="java-prop-name">
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="value-type">
1008N/A <xsl:call-template name="get-property-java-type" />
1008N/A </xsl:variable>
1008N/A <xsl:value-of
1008N/A select="concat(' // Build the &quot;', @name, '&quot; property definition.&#xa;',
1008N/A ' static {&#xa;')" />
1008N/A <xsl:choose>
1008N/A <xsl:when test="string-length($generic-type) != 0">
1008N/A <xsl:value-of
1140N/A select="concat(' ', $type, '.Builder&lt;', $generic-type, '&gt; builder = ', $type, '.createBuilder(INSTANCE, &quot;',@name, '&quot;);&#xa;')" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of
1140N/A select="concat(' ', $type, '.Builder builder = ', $type, '.createBuilder(INSTANCE, &quot;',@name, '&quot;);&#xa;')" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1418N/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>
1418N/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>
1418N/A <xsl:if test="@monitoring='true'">
1418N/A <xsl:value-of
1418N/A select="' builder.setOption(PropertyOption.MONITORING);&#xa;'" />
1418N/A </xsl:if>
1418N/A <xsl:if test="@mandatory='true'">
1008N/A <xsl:value-of
1008N/A select="' builder.setOption(PropertyOption.MANDATORY);&#xa;'" />
1008N/A </xsl:if>
1418N/A <xsl:if test="@hidden='true'">
1008N/A <xsl:value-of
1008N/A select="' builder.setOption(PropertyOption.HIDDEN);&#xa;'" />
1008N/A </xsl:if>
1906N/A <xsl:if test="@advanced='true'">
1906N/A <xsl:value-of
1906N/A select="' builder.setOption(PropertyOption.ADVANCED);&#xa;'" />
1906N/A </xsl:if>
1565N/A <xsl:variable name="action-type">
1565N/A <xsl:choose>
1565N/A <xsl:when test="adm:requires-admin-action">
1565N/A <xsl:call-template name="name-to-java-constant">
1565N/A <xsl:with-param name="value"
1565N/A select="local-name(adm:requires-admin-action/*)" />
1565N/A </xsl:call-template>
1565N/A </xsl:when>
1565N/A <xsl:otherwise>
1565N/A <xsl:value-of select="'NONE'" />
1565N/A </xsl:otherwise>
1565N/A </xsl:choose>
1565N/A </xsl:variable>
1565N/A <xsl:value-of
1565N/A select="concat(' builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.', $action-type, ', INSTANCE, &quot;', @name, '&quot;));&#xa;')" />
1008N/A <xsl:choose>
1548N/A <xsl:when
1548N/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>
1426N/A <xsl:when test="adm:default-behavior/adm:alias">
1426N/A <xsl:value-of
1426N/A select="concat(' builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider&lt;', $value-type,'&gt;(INSTANCE, &quot;', @name, '&quot;));&#xa;')" />
1426N/A </xsl:when>
1426N/A <xsl:when test="adm:default-behavior/adm:defined">
1426N/A <xsl:value-of
1426N/A select="concat(' DefaultBehaviorProvider&lt;', $value-type,'&gt; provider = ',
1008N/A 'new DefinedDefaultBehaviorProvider&lt;', $value-type,'&gt;(')" />
1426N/A <xsl:for-each
1426N/A select="adm:default-behavior/adm:defined/adm:value">
1426N/A <xsl:value-of
1426N/A select="concat('&quot;', normalize-space(), '&quot;')" />
1426N/A <xsl:if test="position() != last()">
1426N/A <xsl:value-of select="', '" />
1426N/A </xsl:if>
1426N/A </xsl:for-each>
1426N/A <xsl:value-of select="');&#xa;'" />
1426N/A <xsl:value-of
1426N/A select="' builder.setDefaultBehaviorProvider(provider);&#xa;'" />
1426N/A </xsl:when>
1426N/A <xsl:when
1426N/A test="adm:default-behavior/adm:inherited/adm:relative">
1426N/A <xsl:value-of
1426N/A select="concat(' DefaultBehaviorProvider&lt;', $value-type,'&gt; provider = ',
1418N/A 'new RelativeInheritedDefaultBehaviorProvider&lt;', $value-type,'&gt;(')" />
1426N/A <xsl:variable name="managed-object-name">
1426N/A <xsl:call-template name="name-to-java">
1426N/A <xsl:with-param name="value"
1426N/A select="adm:default-behavior/adm:inherited/adm:relative/@managed-object-name" />
1426N/A </xsl:call-template>
1426N/A </xsl:variable>
1426N/A <xsl:variable name="property-name"
1426N/A select="adm:default-behavior/adm:inherited/adm:relative/@property-name" />
1426N/A <xsl:variable name="offset"
1426N/A select="adm:default-behavior/adm:inherited/adm:relative/@offset" />
1426N/A <xsl:value-of
1426N/A select="concat($managed-object-name, 'CfgDefn.getInstance(), &quot;', $property-name, '&quot;, ', $offset, ');&#xa;')" />
1426N/A <xsl:value-of
1426N/A select="' builder.setDefaultBehaviorProvider(provider);&#xa;'" />
1426N/A </xsl:when>
1426N/A <xsl:when
1426N/A test="adm:default-behavior/adm:inherited/adm:absolute">
1426N/A <xsl:value-of
1426N/A select="concat(' DefaultBehaviorProvider&lt;', $value-type,'&gt; provider = ',
1418N/A 'new AbsoluteInheritedDefaultBehaviorProvider&lt;', $value-type,'&gt;(')" />
1426N/A <xsl:variable name="property-name"
1426N/A select="adm:default-behavior/adm:inherited/adm:absolute/@property-name" />
1426N/A <xsl:variable name="path"
1426N/A select="adm:default-behavior/adm:inherited/adm:absolute/@path" />
1426N/A <xsl:value-of
2501N/A select="concat('&quot;', $path, '&quot;, &quot;', $property-name, '&quot;);&#xa;')" />
1426N/A <xsl:value-of
1426N/A select="' builder.setDefaultBehaviorProvider(provider);&#xa;'" />
1426N/A </xsl:when>
1426N/A <xsl:otherwise>
1426N/A <xsl:message terminate="yes">
1426N/A <xsl:value-of
1426N/A select="concat('Unrecognized default behavior type for property &quot;', @name,
1008N/A '&quot;.')" />
1426N/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;')" />
1008N/A <xsl:value-of
1008N/A select="concat(' INSTANCE.registerPropertyDefinition(PD_', $java-prop-name, ');&#xa;')" />
2517N/A <xsl:call-template name="get-property-definition-post-ctor" />
1008N/A <xsl:value-of select="' }&#xa;'" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate a relation definition declaration.
1008N/A -->
1008N/A <xsl:template name="generate-relation-declaration">
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: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>
4129N/A <xsl:when test="string(adm:one-to-many/@unique) != 'true'">
1008N/A <xsl:text>InstantiableRelationDefinition&lt;</xsl:text>
1008N/A </xsl:when>
4129N/A <xsl:when test="string(adm:one-to-many/@unique) = 'true'">
4129N/A <xsl:text>SetRelationDefinition&lt;</xsl:text>
4129N/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>
1893N/A <xsl:variable name="java-relation-builder-type">
1893N/A <xsl:choose>
1893N/A <xsl:when test="adm:one-to-one">
1893N/A <xsl:text>SingletonRelationDefinition</xsl:text>
1893N/A </xsl:when>
1893N/A <xsl:when test="adm:one-to-zero-or-one">
1893N/A <xsl:text>OptionalRelationDefinition</xsl:text>
1893N/A </xsl:when>
4129N/A <xsl:when test="string(adm:one-to-many/@unique) != 'true'">
1893N/A <xsl:text>InstantiableRelationDefinition</xsl:text>
1893N/A </xsl:when>
4129N/A <xsl:when test="string(adm:one-to-many/@unique) = 'true'">
4129N/A <xsl:text>SetRelationDefinition</xsl:text>
4129N/A </xsl:when>
1893N/A <xsl:otherwise>
1893N/A <xsl:message terminate="yes">
1893N/A <xsl:value-of
1893N/A select="concat('Unknown relation type &quot;', local-name(*), '&quot; in relation &quot;', @name, '&quot;.')" />
1893N/A </xsl:message>
1893N/A </xsl:otherwise>
1893N/A </xsl:choose>
1893N/A <xsl:value-of
1893N/A select="concat('.Builder&lt;', $java-managed-object-name, 'CfgClient, ', $java-managed-object-name, 'Cfg&gt;')" />
1893N/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;',
1893N/A ' ', $java-relation-builder-type, ' builder =&#xa;',
1893N/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
1893N/A select="concat($java-managed-object-name, 'CfgDefn.getInstance());&#xa;')" />
1893N/A <xsl:if test="adm:one-to-many/@naming-property">
4129N/A <xsl:if test="string(adm:one-to-many/@unique) = 'true'">
4129N/A <xsl:message terminate="yes">
4129N/A <xsl:value-of
4129N/A select="concat('Naming properties found in unique one-to-many relation &quot;', @name, '&quot;.')" />
4129N/A </xsl:message>
4129N/A </xsl:if>
1893N/A <xsl:variable name="java-property-name">
1893N/A <xsl:call-template name="name-to-java">
1893N/A <xsl:with-param name="value"
1893N/A select="adm:one-to-many/@naming-property" />
1893N/A </xsl:call-template>
1893N/A </xsl:variable>
1893N/A <xsl:value-of
1893N/A select="concat(' builder.setNamingProperty(',
1893N/A $java-managed-object-name,
1884N/A 'CfgDefn.getInstance().get',
1893N/A $java-property-name, 'PropertyDefinition());&#xa;')" />
1884N/A </xsl:if>
2989N/A <xsl:for-each select="*/adm:default-managed-object">
2989N/A <xsl:variable name="dmo-java-name">
2989N/A <xsl:call-template name="name-to-java">
2989N/A <xsl:with-param name="value" select="@managed-object-name" />
2989N/A </xsl:call-template>
2989N/A </xsl:variable>
2989N/A <xsl:value-of select="' {&#xa;'" />
2989N/A <xsl:value-of
2989N/A select="concat(' DefaultManagedObject.Builder&lt;',
2989N/A $dmo-java-name, 'CfgClient, ',
2989N/A $dmo-java-name, 'Cfg&gt; dmoBuilder = new DefaultManagedObject.Builder&lt;',
2989N/A $dmo-java-name, 'CfgClient, ',
2989N/A $dmo-java-name, 'Cfg&gt;(',
2989N/A $dmo-java-name, 'CfgDefn.getInstance());&#xa;')" />
2989N/A <xsl:for-each select="adm:property">
2989N/A <xsl:value-of
2989N/A select="concat(' dmoBuilder.setPropertyValues(&quot;', @name, '&quot;')" />
2989N/A <xsl:for-each select="adm:value">
2989N/A <xsl:value-of
2989N/A select="concat(', &quot;', normalize-space(), '&quot;')" />
2989N/A </xsl:for-each>
2989N/A <xsl:value-of select="');&#xa;'" />
2989N/A </xsl:for-each>
2989N/A <xsl:choose>
2989N/A <xsl:when test="@name">
2989N/A <xsl:value-of
2989N/A select="concat(' builder.setDefaultManagedObject(&quot;', @name, '&quot;, dmoBuilder.getInstance());&#xa;')" />
2989N/A </xsl:when>
2989N/A <xsl:otherwise>
2989N/A <xsl:value-of
2989N/A select="' builder.setDefaultManagedObject(dmoBuilder.getInstance());&#xa;'" />
2989N/A </xsl:otherwise>
2989N/A </xsl:choose>
2989N/A <xsl:value-of select="' }&#xa;'" />
2989N/A </xsl:for-each>
2872N/A <xsl:if test="@advanced='true'">
2872N/A <xsl:value-of
2872N/A select="' builder.setOption(RelationOption.ADVANCED);&#xa;'" />
2872N/A </xsl:if>
1893N/A <xsl:if test="@hidden='true'">
1893N/A <xsl:value-of
1893N/A select="' builder.setOption(RelationOption.HIDDEN);&#xa;'" />
1893N/A </xsl:if>
1893N/A <xsl:value-of
1893N/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">
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:choose>
1008N/A <xsl:when
2345N/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>
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">
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;',
1008N/A ' * Get the &quot;',
1008N/A $relation-name,
1008N/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>
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>
4129N/A <xsl:when test="string(adm:one-to-many/@unique) != 'true'">
1008N/A <xsl:text>InstantiableRelationDefinition&lt;</xsl:text>
1008N/A </xsl:when>
4129N/A <xsl:when test="string(adm:one-to-many/@unique) = 'true'">
4129N/A <xsl:text>SetRelationDefinition&lt;</xsl:text>
4129N/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
2345N/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>
1008N/A </xsl:choose>
1008N/A </xsl:template>
1008N/A <!--
1008N/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>
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;',
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;',
1389N/A ' public boolean has', $java-relation-name, '() throws ConcurrentModificationException,&#xa;',
1389N/A ' AuthorizationException, CommunicationException {&#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;',
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: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;',
1389N/A ' public &lt;M extends ', $java-class-name, 'CfgClient&gt; M create', $java-relation-name, '(&#xa;',
1929N/A ' ManagedObjectDefinition&lt;M, ? extends ', $java-class-name,'Cfg&gt; d, Collection&lt;DefaultBehaviorException&gt; exceptions) {&#xa;',
1418N/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>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of
1008N/A select="concat(' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1389N/A ' public void remove', $java-relation-name, '()&#xa;',
1389N/A ' throws ManagedObjectNotFoundException, ConcurrentModificationException,&#xa;',
1389N/A ' OperationRejectedException, AuthorizationException, CommunicationException {&#xa;',
1008N/A ' impl.removeChild(INSTANCE.get', $java-relation-name,'RelationDefinition());&#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;',
1389N/A ' public String[] list', $java-relation-plural-name, '() throws ConcurrentModificationException,&#xa;',
1389N/A ' AuthorizationException, CommunicationException {&#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;',
1389N/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>
4129N/A <xsl:choose>
4129N/A <xsl:when test="string(adm:one-to-many/@unique) != 'true'">
4129N/A <xsl:value-of
4129N/A select="concat(' /**&#xa;',
4129N/A ' * {@inheritDoc}&#xa;',
4129N/A ' */&#xa;',
4129N/A ' public &lt;M extends ', $java-class-name, 'CfgClient&gt; M create', $java-relation-name, '(&#xa;',
4129N/A ' ManagedObjectDefinition&lt;M, ? extends ', $java-class-name,'Cfg&gt; d, String name, Collection&lt;DefaultBehaviorException&gt; exceptions) throws IllegalManagedObjectNameException {&#xa;',
4129N/A ' return impl.createChild(INSTANCE.get', $java-relation-plural-name,'RelationDefinition(), d, name, exceptions).getConfiguration();&#xa;',
4129N/A ' }&#xa;')" />
4129N/A </xsl:when>
4129N/A <xsl:when test="string(adm:one-to-many/@unique) = 'true'">
4129N/A <!-- Unique one-to-many children are named implicitly by their definition -->
4129N/A <xsl:value-of
4129N/A select="concat(' /**&#xa;',
4129N/A ' * {@inheritDoc}&#xa;',
4129N/A ' */&#xa;',
4129N/A ' public &lt;M extends ', $java-class-name, 'CfgClient&gt; M create', $java-relation-name, '(&#xa;',
4129N/A ' ManagedObjectDefinition&lt;M, ? extends ', $java-class-name,'Cfg&gt; d, Collection&lt;DefaultBehaviorException&gt; exceptions) {&#xa;',
4129N/A ' return impl.createChild(INSTANCE.get', $java-relation-plural-name,'RelationDefinition(), d, exceptions).getConfiguration();&#xa;',
4129N/A ' }&#xa;')" />
4129N/A </xsl:when>
4129N/A </xsl:choose>
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;',
1389N/A ' public void remove', $java-relation-name, '(String name)&#xa;',
1389N/A ' throws ManagedObjectNotFoundException, ConcurrentModificationException,&#xa;',
1389N/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="/.." />
5487N/A
5487N/A <xsl:variable name="_top-length" select="string-length($top-name)" />
5487N/A <xsl:variable name="_length" select="string-length($name)" />
5487N/A <xsl:variable name="_diff" select="$_length - $_top-length" />
5487N/A <xsl:variable name="_start" select="substring($name, 1, $_diff - 1)" />
5487N/A <xsl:variable name="_middle" select="substring($name, $_diff, 1)" />
5487N/A <xsl:variable name="_end"
5487N/A select="substring($name, $_diff + 1, $_top-length)" />
5487N/A
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>
5487N/A <xsl:when test="$_middle != '-' or $_end != $_top-name">
5487N/A <xsl:value-of select="$name" />
5487N/A </xsl:when>
1008N/A <xsl:otherwise>
5487N/A <xsl:value-of select="$_start" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A </xsl:variable>
5487N/A
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="' *'" />
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">
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="' *'" />
1141N/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>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of select="' // Private constructor.&#xa;'" />
1008N/A <xsl:value-of select="' private '" />
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
1008N/A select="concat('(String name) { this.name = name; }&#xa;',
1008N/A '&#xa;',
1008N/A '&#xa;',
1008N/A '&#xa;',
1008N/A ' /**&#xa;',
1008N/A ' * {@inheritDoc}&#xa;',
1008N/A ' */&#xa;',
1008N/A ' public String toString() { return name; }&#xa;')" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:value-of select="' }&#xa;'" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Main document parsing template.
1008N/A -->
1008N/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 <!--
2872N/A Check that all advanced properties conform to one of
2872N/A the following rules:
2872N/A
2872N/A * is mandatory and has a defined default value(s)
2872N/A * is mandatory and is part of an advanced managed object
2872N/A * is mandatory and is part of an abstract managed object
2872N/A * is not mandatory
1906N/A -->
2872N/A <xsl:choose>
2872N/A <xsl:when test="$this-is-advanced">
2872N/A <!-- OK -->
2872N/A </xsl:when>
2872N/A <xsl:when test="$this-is-abstract">
2872N/A <!-- OK -->
2872N/A </xsl:when>
2872N/A <xsl:when test="@advanced='true' and @mandatory='true'">
2872N/A <xsl:choose>
2872N/A <xsl:when test="adm:default-behavior/adm:defined">
2872N/A <!-- OK -->
2872N/A </xsl:when>
2872N/A <xsl:when test="adm:default-behavior/adm:inherited">
2872N/A <!-- OK -->
2872N/A </xsl:when>
2872N/A <xsl:otherwise>
2872N/A <xsl:message terminate="yes">
2872N/A <xsl:value-of
2872N/A select="concat('Advanced property &quot;', @name,
2872N/A '&quot; must have defined or inherited default values.')" />
2872N/A </xsl:message>
2872N/A </xsl:otherwise>
2872N/A </xsl:choose>
2872N/A </xsl:when>
2872N/A </xsl:choose>
1906N/A </xsl:for-each>
1906N/A <!--
1906N/A Now generate the definition.
1906N/A -->
1008N/A <xsl:call-template name="copyright-notice" />
1008N/A <xsl:value-of
1008N/A select="concat('package ', $this-package, '.meta;&#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:call-template name="generate-import-statements">
1008N/A <xsl:with-param name="imports">
2521N/A <xsl:if test="not(boolean($this/@extends))">
2521N/A <import>org.opends.server.admin.TopCfgDefn</import>
2521N/A </xsl:if>
2648N/A <xsl:if test="$this/adm:constraint">
2648N/A <import>org.opends.server.admin.GenericConstraint</import>
2648N/A <import>org.opends.server.admin.condition.Conditions</import>
2648N/A </xsl:if>
1008N/A <xsl:if
1008N/A test="$this-local-properties[@multi-valued='true' or
1008N/A @read-only='true' or
1418N/A @monitoring='true' or
1008N/A @hidden='true' or
1906N/A @advanced='true' or
1008N/A @mandatory='true']">
1008N/A <import>org.opends.server.admin.PropertyOption</import>
1008N/A </xsl:if>
1565N/A <xsl:if test="$this-local-properties">
1565N/A <import>org.opends.server.admin.AdministratorAction</import>
1565N/A </xsl:if>
1548N/A <xsl:if test="$this/adm:tag-definition or $this/adm:tag">
1548N/A <import>org.opends.server.admin.Tag</import>
1548N/A </xsl:if>
1008N/A <xsl:if
1433N/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
1418N/A test="$this-local-properties/adm:default-behavior/adm:inherited/adm:absolute">
1418N/A <import>
1418N/A org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider
1418N/A </import>
4990N/A <import>
4990N/A org.opends.server.admin.DefaultBehaviorProvider
4990N/A </import>
1418N/A </xsl:if>
1418N/A <xsl:if
1418N/A test="$this-local-properties/adm:default-behavior/adm:inherited/adm:relative">
1418N/A <import>
1418N/A org.opends.server.admin.RelativeInheritedDefaultBehaviorProvider
1418N/A </import>
4990N/A <import>
4990N/A org.opends.server.admin.DefaultBehaviorProvider
4990N/A </import>
1418N/A <xsl:for-each
1418N/A select="$this-local-properties/adm:default-behavior/adm:inherited/adm:relative">
1418N/A <xsl:if test="@managed-object-package != $this-package">
1418N/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">
1418N/A <xsl:value-of
1418N/A select="concat(@managed-object-package, '.meta.', $java-class-name, 'CfgDefn')" />
1418N/A </xsl:element>
1418N/A </xsl:if>
1418N/A </xsl:for-each>
1418N/A </xsl:if>
1418N/A <xsl:if
1008N/A test="$this-local-properties/adm:default-behavior/adm:defined">
1008N/A <import>
1008N/A org.opends.server.admin.DefinedDefaultBehaviorProvider
1008N/A </import>
1008N/A <import>
1008N/A org.opends.server.admin.DefaultBehaviorProvider
1008N/A </import>
1008N/A </xsl:if>
1008N/A <xsl:element name="import">
1008N/A <xsl:value-of
1008N/A select="concat($this-package, '.client.', $this-java-class, 'CfgClient')" />
1008N/A </xsl:element>
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 <xsl:for-each select="$this-inherited-properties">
2499N/A <xsl:call-template name="get-property-java-imports">
2499N/A <xsl:with-param name="interface" select="'server'" />
2499N/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">
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">
1008N/A <xsl:value-of
1008N/A select="concat(@managed-object-package, '.server.', $java-class-name, 'Cfg')" />
1008N/A </xsl:element>
1008N/A </xsl:for-each>
2872N/A <xsl:if
2989N/A test="$this-local-relations/*/adm:default-managed-object">
2989N/A <import>org.opends.server.admin.DefaultManagedObject</import>
2989N/A </xsl:if>
2989N/A <xsl:for-each
2989N/A select="$this-local-relations/*/adm:default-managed-object">
2989N/A <xsl:variable name="java-class-name">
2989N/A <xsl:call-template name="name-to-java">
2989N/A <xsl:with-param name="value"
2989N/A select="@managed-object-name" />
2989N/A </xsl:call-template>
2989N/A </xsl:variable>
2989N/A <xsl:element name="import">
2989N/A <xsl:value-of
2989N/A select="concat(@managed-object-package, '.client.', $java-class-name, 'CfgClient')" />
2989N/A </xsl:element>
2989N/A <xsl:element name="import">
2989N/A <xsl:value-of
2989N/A select="concat(@managed-object-package, '.server.', $java-class-name, 'Cfg')" />
2989N/A </xsl:element>
2989N/A <xsl:element name="import">
2989N/A <xsl:value-of
2989N/A select="concat(@managed-object-package, '.meta.', $java-class-name, 'CfgDefn')" />
2989N/A </xsl:element>
2989N/A </xsl:for-each>
2989N/A <xsl:if
2872N/A test="$this-local-relations[@advanced='true' or @hidden='true']">
1893N/A <import>org.opends.server.admin.RelationOption</import>
1893N/A </xsl:if>
2872N/A <xsl:if test="$this-is-hidden or $this-is-advanced">
2872N/A <import>org.opends.server.admin.ManagedObjectOption</import>
2872N/A </xsl:if>
4129N/A <xsl:if test="$this-all-relations/adm:one-to-many[not(@unique = 'true')]">
1142N/A <import>
1142N/A org.opends.server.admin.InstantiableRelationDefinition
1142N/A </import>
1142N/A </xsl:if>
4129N/A <xsl:if test="$this-all-relations/adm:one-to-many[@unique = 'true']">
4129N/A <import>
4129N/A org.opends.server.admin.SetRelationDefinition
4129N/A </import>
4129N/A </xsl:if>
1142N/A <xsl:if test="$this-all-relations/adm:one-to-zero-or-one">
1142N/A <import>
1142N/A org.opends.server.admin.OptionalRelationDefinition
1142N/A </import>
1142N/A </xsl:if>
1142N/A <xsl:if test="$this-all-relations/adm:one-to-one">
1142N/A <import>
1142N/A org.opends.server.admin.SingletonRelationDefinition
1142N/A </import>
1142N/A </xsl:if>
1008N/A <xsl:choose>
1008N/A <xsl:when test="$this-is-abstract">
1008N/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>
1389N/A <import>
1418N/A org.opends.server.admin.client.MissingMandatoryPropertiesException
1418N/A </import>
1418N/A <import>
1418N/A org.opends.server.admin.ManagedObjectAlreadyExistsException
1418N/A </import>
1418N/A <import>
1389N/A org.opends.server.admin.client.AuthorizationException
1389N/A </import>
1389N/A <import>
1389N/A org.opends.server.admin.client.CommunicationException
1389N/A </import>
1389N/A <import>
1389N/A org.opends.server.admin.client.ConcurrentModificationException
1389N/A </import>
1389N/A <import>
1389N/A org.opends.server.admin.client.OperationRejectedException
1389N/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>
1389N/A <xsl:if test="$this-all-relations">
1389N/A <import>
1389N/A org.opends.server.admin.DefinitionDecodingException
1389N/A </import>
1389N/A <import>
1389N/A org.opends.server.admin.ManagedObjectNotFoundException
1389N/A </import>
1389N/A <import>
1389N/A org.opends.server.admin.client.ManagedObjectDecodingException
1389N/A </import>
1389N/A </xsl:if>
1008N/A <xsl:if test="$this-all-relations/adm:one-to-many">
1418N/A <import>java.util.Collection</import>
4129N/A <xsl:if test="$this-all-relations/adm:one-to-many[not(@unique = 'true')]">
4129N/A <import>
4129N/A org.opends.server.admin.client.IllegalManagedObjectNameException
4129N/A </import>
4129N/A </xsl:if>
1884N/A <import>
1418N/A org.opends.server.admin.DefaultBehaviorException
1389N/A </import>
1389N/A <import>
1008N/A org.opends.server.admin.server.ConfigurationAddListener
1008N/A </import>
1008N/A <import>
1008N/A org.opends.server.admin.server.ConfigurationDeleteListener
1008N/A </import>
1008N/A <import>org.opends.server.config.ConfigException</import>
1008N/A </xsl:if>
1008N/A <xsl:if test="$this-all-relations/adm:one-to-zero-or-one">
1418N/A <import>java.util.Collection</import>
1008N/A <import>
1418N/A org.opends.server.admin.DefaultBehaviorException
1389N/A </import>
1389N/A <import>
1008N/A org.opends.server.admin.server.ConfigurationAddListener
1008N/A </import>
1008N/A <import>
1008N/A org.opends.server.admin.server.ConfigurationDeleteListener
1008N/A </import>
1008N/A <import>org.opends.server.config.ConfigException</import>
1008N/A </xsl:if>
1008N/A <xsl:if test="$this-all-relations/adm:one-to-one">
1008N/A <import>org.opends.server.config.ConfigException</import>
1008N/A </xsl:if>
1008N/A <xsl:if test="$this-all-properties[@multi-valued='true']">
1008N/A <import>java.util.SortedSet</import>
1008N/A <import>java.util.Collection</import>
1008N/A </xsl:if>
1418N/A <xsl:if test="$this-all-properties[@read-only='true']">
1426N/A <import>
1426N/A org.opends.server.admin.PropertyIsReadOnlyException
1426N/A </import>
1418N/A </xsl:if>
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A <xsl:if test="$this/@extends">
1008N/A <xsl:if test="$parent-package != $this-package">
1008N/A <xsl:element name="import">
1008N/A <xsl:value-of
1008N/A select="concat($parent-package, '.meta.', $parent-java-class, 'CfgDefn')" />
1008N/A </xsl:element>
1008N/A </xsl:if>
1008N/A </xsl:if>
1008N/A </xsl:with-param>
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-meta-class-declaration" />
1008N/A <xsl:text>&#xa;</xsl:text>
1008N/A <xsl:call-template name="generate-meta-class-body" />
1008N/A <xsl:text>}&#xa;</xsl:text>
1008N/A </xsl:template>
1008N/A</xsl:stylesheet>