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 !
5018N/A ! Copyright 2008-2010 Sun Microsystems, Inc.
1008N/A ! -->
1008N/A<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
1008N/A xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5018N/A <xsl:import href="java-utilities.xsl" />
1008N/A <!--
1008N/A
1008N/A
1008N/A
1008N/A WARNING: when new property types are defined, they must be
1008N/A included here.
1008N/A
1008N/A These stylesheets are included and NOT imported so that they
1008N/A have the same import precedence as the default rules.
1008N/A
1008N/A
1008N/A
1008N/A -->
2407N/A <xsl:include href="property-types/aggregation.xsl" />
1008N/A <xsl:include href="property-types/attribute-type.xsl" />
1008N/A <xsl:include href="property-types/boolean.xsl" />
1008N/A <xsl:include href="property-types/dn.xsl" />
1008N/A <xsl:include href="property-types/duration.xsl" />
1008N/A <xsl:include href="property-types/enumeration.xsl" />
1008N/A <xsl:include href="property-types/integer.xsl" />
1008N/A <xsl:include href="property-types/ip-address-mask.xsl" />
1008N/A <xsl:include href="property-types/ip-address.xsl" />
1008N/A <xsl:include href="property-types/java-class.xsl" />
2487N/A <xsl:include href="property-types/aci.xsl" />
1008N/A <xsl:include href="property-types/oid.xsl" />
1008N/A <xsl:include href="property-types/password.xsl" />
1008N/A <xsl:include href="property-types/size.xsl" />
1008N/A <xsl:include href="property-types/string.xsl" />
4126N/A <xsl:include href="property-types/extensible-matching-rule-type.xsl" />
1008N/A <!--
1008N/A
1008N/A
1008N/A
1008N/A Default rules applicable to each property type.
1008N/A
1008N/A Property type stylesheets should override these where necessary.
1008N/A
1008N/A
1008N/A
1008N/A -->
1008N/A <!--
1008N/A Get the Java object-based type associated with a property syntax.
1008N/A
1008N/A By default property values are represented using strings.
1008N/A -->
1008N/A <xsl:template match="*" mode="java-value-type">
1008N/A <xsl:value-of select="'String'" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Get the Java primitive type, if applicable, associated with a
1008N/A property syntax.
1008N/A
1008N/A By default property values are represented using the type defined by
1008N/A java-value-type.
1008N/A -->
1008N/A <xsl:template match="*" mode="java-value-primitive-type">
1008N/A <xsl:apply-templates select="." mode="java-value-type" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate import elements represesenting the import statements
1008N/A required by values of the property.
1008N/A
1008N/A By default property values are represented using strings which
1008N/A don't require an import statement - so do nothing.
1008N/A -->
2499N/A <xsl:template match="*" mode="java-value-imports">
2499N/A <xsl:param name="interface" select="/.." />
2499N/A </xsl:template>
1008N/A <!--
1008N/A Generate the Java definition type used to define the property.
1008N/A
1008N/A By default properties are defined using string property
1008N/A definitions.
1008N/A -->
1008N/A <xsl:template match="*" mode="java-definition-type">
1008N/A <xsl:value-of select="'StringPropertyDefinition'" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate import elements represesenting the import statements
1008N/A required by the property's definition and its values.
1008N/A
1008N/A By default assume that the definition type is in
1008N/A org.opends.server.admin and is derived directly from the
1008N/A java-definition-type (might not be the case for parameterized
1008N/A types. In addition pull in the value imports.
1008N/A -->
1008N/A <xsl:template match="*" mode="java-definition-imports">
1008N/A <xsl:element name="import">
1008N/A <xsl:value-of select="'org.opends.server.admin.'" />
1008N/A <xsl:apply-templates select="." mode="java-definition-type" />
1008N/A </xsl:element>
2499N/A <xsl:apply-templates select="." mode="java-value-imports">
2499N/A <xsl:with-param name="interface" select="'server'" />
2499N/A </xsl:apply-templates>
1008N/A </xsl:template>
1008N/A <!--
1008N/A If the property definition is generic, get the generic type. Otherwise,
1008N/A do nothing.
1008N/A
1008N/A Default: do nothing.
1008N/A -->
1008N/A <xsl:template match="*" mode="java-definition-generic-type" />
1008N/A <!--
1008N/A Generate property definition specific constructor setters.
1008N/A
1008N/A By default, do nothing.
1008N/A -->
1008N/A <xsl:template match="*" mode="java-definition-ctor" />
1008N/A <!--
2411N/A Generate property definition specific post-construction code.
2411N/A
2411N/A By default, do nothing.
2411N/A -->
2411N/A <xsl:template match="*" mode="java-definition-post-ctor" />
2411N/A <!--
2499N/A Generate property getter declaration(s).
2499N/A
2499N/A By default, generate a single getter with minimal documentation.
2499N/A -->
2499N/A <xsl:template match="*" mode="java-property-getter-declaration">
2499N/A <xsl:param name="interface" select="/.." />
2499N/A <xsl:call-template
2499N/A name="generate-default-property-getter-declaration">
2499N/A <xsl:with-param name="interface" select="$interface" />
2499N/A </xsl:call-template>
2499N/A </xsl:template>
2499N/A <!--
2499N/A Generate property getter implementation(s).
2499N/A
2499N/A By default, generate a single getter.
2499N/A -->
2499N/A <xsl:template match="*" mode="java-property-getter-implementation">
2499N/A <xsl:param name="interface" select="/.." />
2499N/A <xsl:call-template
2499N/A name="generate-default-property-getter-implementation">
2499N/A <xsl:with-param name="interface" select="$interface" />
2499N/A </xsl:call-template>
2499N/A </xsl:template>
2499N/A <!--
2499N/A Generate property setter declaration(s).
2499N/A
2499N/A By default, generate a single setter with minimal documentation.
2499N/A -->
2499N/A <xsl:template match="*" mode="java-property-setter-declaration">
2499N/A <xsl:call-template
2499N/A name="generate-default-property-setter-declaration" />
2499N/A </xsl:template>
2499N/A <!--
2499N/A Generate property setter implementation(s).
2499N/A
2499N/A By default, generate a single setter.
2499N/A -->
2499N/A <xsl:template match="*" mode="java-property-setter-implementation">
2499N/A <xsl:call-template
2499N/A name="generate-default-property-setter-implementation" />
2499N/A </xsl:template>
2499N/A <!--
1008N/A
1008N/A
1008N/A Wrapper templates which can be called directly instead of
1008N/A requiring the more indirect and less readable apply-templates
1008N/A mechanism.
1008N/A
1008N/A
1008N/A -->
1008N/A <!--
1008N/A Get the Java imports required for a property's values.
1008N/A -->
1008N/A <xsl:template name="get-property-java-imports">
2499N/A <xsl:param name="interface" select="/.." />
1008N/A <xsl:apply-templates select="adm:syntax/*"
2499N/A mode="java-value-imports">
2499N/A <xsl:with-param name="interface" select="$interface" />
2499N/A </xsl:apply-templates>
1008N/A </xsl:template>
1008N/A <!--
1008N/A Get the Java imports required for a property's definition.
1008N/A -->
1008N/A <xsl:template name="get-property-definition-java-imports">
1008N/A <xsl:apply-templates select="adm:syntax/*"
1008N/A mode="java-definition-imports" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Get the Java object-based type associated with a property syntax.
1008N/A -->
1008N/A <xsl:template name="get-property-java-type">
1008N/A <xsl:apply-templates select="adm:syntax/*" mode="java-value-type" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Get the Java primitive type, if applicable, associated with a
1008N/A property syntax.
1008N/A -->
1008N/A <xsl:template name="get-property-java-primitive-type">
1008N/A <xsl:apply-templates select="adm:syntax/*"
1008N/A mode="java-value-primitive-type" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Get the property definition type associated with a
1008N/A property syntax.
1008N/A -->
1008N/A <xsl:template name="get-property-definition-type">
1008N/A <xsl:apply-templates select="adm:syntax/*"
1008N/A mode="java-definition-type" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A If the property definition is generic, get the generic type. Otherwise,
1008N/A do nothing.
1008N/A -->
1008N/A <xsl:template name="get-property-definition-generic-type">
1008N/A <xsl:apply-templates select="adm:syntax/*"
1008N/A mode="java-definition-generic-type" />
1008N/A </xsl:template>
1008N/A <!--
1008N/A Generate property definition specific constructor setters.
1008N/A -->
1008N/A <xsl:template name="get-property-definition-ctor">
1008N/A <xsl:apply-templates select="adm:syntax/*"
1008N/A mode="java-definition-ctor" />
1008N/A </xsl:template>
2411N/A <!--
2411N/A Generate property definition specific post-construction code.
2411N/A -->
2411N/A <xsl:template name="get-property-definition-post-ctor">
2411N/A <xsl:apply-templates select="adm:syntax/*"
2411N/A mode="java-definition-post-ctor" />
2411N/A </xsl:template>
2499N/A <!--
1008N/A Generate the property getter declarations.
1008N/A -->
1008N/A <xsl:template name="generate-property-getter-declaration">
1008N/A <xsl:param name="interface" select="/.." />
2499N/A <xsl:apply-templates select="adm:syntax/*"
2499N/A mode="java-property-getter-declaration">
2499N/A <xsl:with-param name="interface" select="$interface" />
2499N/A </xsl:apply-templates>
2499N/A </xsl:template>
2499N/A <!--
2499N/A Generate the property getter implementations.
2499N/A -->
2499N/A <xsl:template name="generate-property-getter-implementation">
2499N/A <xsl:param name="interface" select="/.." />
2499N/A <xsl:apply-templates select="adm:syntax/*"
2499N/A mode="java-property-getter-implementation">
2499N/A <xsl:with-param name="interface" select="$interface" />
2499N/A </xsl:apply-templates>
2499N/A </xsl:template>
2499N/A <!--
2499N/A Generate the property setter declarations.
2499N/A -->
2499N/A <xsl:template name="generate-property-setter-declaration">
2499N/A <xsl:apply-templates select="adm:syntax/*"
2499N/A mode="java-property-setter-declaration" />
2499N/A </xsl:template>
2499N/A <!--
2499N/A Generate the property setter implementations.
2499N/A -->
2499N/A <xsl:template name="generate-property-setter-implementation">
2499N/A <xsl:apply-templates select="adm:syntax/*"
2499N/A mode="java-property-setter-implementation" />
2499N/A </xsl:template>
2499N/A <!--
2499N/A Generate the default property getter declarations.
2499N/A -->
2499N/A <xsl:template name="generate-default-property-getter-declaration">
2499N/A <xsl:param name="interface" select="/.." />
2499N/A <xsl:apply-templates select="../.."
2499N/A mode="generate-default-property-getter-declaration-aux">
2499N/A <xsl:with-param name="interface" select="$interface" />
2499N/A </xsl:apply-templates>
2499N/A </xsl:template>
2499N/A <xsl:template match="adm:property"
2499N/A mode="generate-default-property-getter-declaration-aux">
2499N/A <xsl:param name="interface" select="/.." />
1008N/A <xsl:variable name="name" select="@name" />
1008N/A <xsl:variable name="java-property-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(' /**&#xa;',
2499N/A ' * Gets 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:choose>
1008N/A <xsl:when test="string(@multi-valued) != 'true'">
1008N/A <xsl:value-of
1008N/A select="concat(' *&#xa;',
1008N/A ' * @return Returns the value of the &quot;', $name,'&quot; property.&#xa;',
1008N/A ' */&#xa;')" />
1008N/A <xsl:value-of select="' '" />
1008N/A <xsl:choose>
1008N/A <xsl:when test="adm:default-behavior/adm:defined">
1008N/A <!--
1008N/A The method is guaranteed to return a value since there is a
1008N/A well-defined default value.
1008N/A -->
1008N/A <xsl:call-template name="get-property-java-primitive-type" />
1008N/A </xsl:when>
1008N/A <xsl:when
1008N/A test="$interface = 'server' and @mandatory = 'true'">
1008N/A <!--
1008N/A The method is guaranteed to return a value in the server interface, but
1008N/A not necessarily in the client, since the mandatory property might not
1008N/A have been created yet.
1008N/A -->
1008N/A <xsl:call-template 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>
2517N/A <xsl:choose>
2517N/A <xsl:when test="$interface='server'">
2517N/A <xsl:value-of
2517N/A select="concat(' *&#xa;',
2517N/A ' * @return Returns an unmodifiable set containing the values of the &quot;', $name,'&quot; property.&#xa;',
2517N/A ' */&#xa;')" />
2517N/A </xsl:when>
2517N/A <xsl:otherwise>
2517N/A <xsl:value-of
2517N/A select="concat(' *&#xa;',
1008N/A ' * @return Returns the values of the &quot;', $name,'&quot; property.&#xa;',
1008N/A ' */&#xa;')" />
2517N/A </xsl:otherwise>
2517N/A </xsl:choose>
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:choose>
1008N/A <xsl:when test="adm:syntax/adm:boolean">
1008N/A <xsl:value-of select="' is'" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of select="' get'" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1008N/A <xsl:value-of
1008N/A select="concat($java-property-name,
1008N/A '();&#xa;')" />
1008N/A </xsl:template>
1008N/A <!--
2499N/A Generate the default property getter implementation.
1008N/A -->
2499N/A <xsl:template
2499N/A name="generate-default-property-getter-implementation">
2499N/A <xsl:param name="interface" select="/.." />
2499N/A <xsl:apply-templates select="../.."
2499N/A mode="generate-default-property-getter-implementation-aux">
2499N/A <xsl:with-param name="interface" select="$interface" />
2499N/A </xsl:apply-templates>
2499N/A </xsl:template>
2499N/A <xsl:template match="adm:property"
2499N/A mode="generate-default-property-getter-implementation-aux">
2499N/A <xsl:param name="interface" select="/.." />
2499N/A <xsl:variable name="java-prop-name">
2499N/A <xsl:call-template name="name-to-java">
2499N/A <xsl:with-param name="value" select="@name" />
2499N/A </xsl:call-template>
2499N/A </xsl:variable>
2499N/A <xsl:value-of
2499N/A select="concat(' /**&#xa;',
2499N/A ' * {@inheritDoc}&#xa;',
2499N/A ' */&#xa;',
2499N/A ' public ')" />
2499N/A <xsl:choose>
2499N/A <xsl:when test="string(@multi-valued) != 'true'">
2499N/A <xsl:choose>
2499N/A <xsl:when test="adm:default-behavior/adm:defined">
2499N/A <!--
2499N/A The method is guaranteed to return a value since there is a
2499N/A well-defined default value.
2499N/A -->
2499N/A <xsl:call-template name="get-property-java-primitive-type" />
2499N/A </xsl:when>
2499N/A <xsl:when
2499N/A test="$interface = 'server' and @mandatory = 'true'">
2499N/A <!--
2499N/A The method is guaranteed to return a value in the server interface, but
2499N/A not necessarily in the client, since the mandatory property might not
2499N/A have been created yet.
2499N/A -->
2499N/A <xsl:call-template name="get-property-java-primitive-type" />
2499N/A </xsl:when>
2499N/A <xsl:otherwise>
2499N/A <xsl:call-template name="get-property-java-type" />
2499N/A </xsl:otherwise>
2499N/A </xsl:choose>
2499N/A </xsl:when>
2499N/A <xsl:otherwise>
2499N/A <xsl:value-of select="'SortedSet&lt;'" />
2499N/A <xsl:call-template name="get-property-java-type" />
2499N/A <xsl:value-of select="'&gt;'" />
2499N/A </xsl:otherwise>
2499N/A </xsl:choose>
2499N/A <xsl:choose>
2499N/A <xsl:when test="adm:syntax/adm:boolean">
2499N/A <xsl:value-of select="' is'" />
2499N/A </xsl:when>
2499N/A <xsl:otherwise>
2499N/A <xsl:value-of select="' get'" />
2499N/A </xsl:otherwise>
2499N/A </xsl:choose>
2499N/A <xsl:choose>
2517N/A <xsl:when test="$interface='server'">
2499N/A <xsl:value-of
2499N/A select="concat($java-prop-name, '() {&#xa;',
2517N/A ' return p', $java-prop-name , ';&#xa;' ,
2517N/A ' }&#xa;')" />
2517N/A </xsl:when>
2517N/A <xsl:otherwise>
2517N/A <xsl:choose>
2517N/A <xsl:when test="string(@multi-valued) != 'true'">
2517N/A <xsl:value-of
2517N/A select="concat($java-prop-name, '() {&#xa;',
2499N/A ' return impl.getPropertyValue',
2499N/A '(INSTANCE.get', $java-prop-name ,
2499N/A 'PropertyDefinition());&#xa;' ,
2499N/A ' }&#xa;')" />
2517N/A </xsl:when>
2517N/A <xsl:otherwise>
2517N/A <xsl:value-of
2517N/A select="concat($java-prop-name, '() {&#xa;',
2499N/A ' return impl.getPropertyValues',
2499N/A '(INSTANCE.get', $java-prop-name ,
2499N/A 'PropertyDefinition());&#xa;' ,
2499N/A ' }&#xa;')" />
2517N/A </xsl:otherwise>
2517N/A </xsl:choose>
2499N/A </xsl:otherwise>
2499N/A </xsl:choose>
2499N/A </xsl:template>
2499N/A <!--
2499N/A Generate the default property setter declarations.
2499N/A -->
2499N/A <xsl:template name="generate-default-property-setter-declaration">
2499N/A <xsl:apply-templates select="../.."
2499N/A mode="generate-default-property-setter-declaration-aux" />
2499N/A </xsl:template>
2499N/A <xsl:template match="adm:property"
2499N/A mode="generate-default-property-setter-declaration-aux">
1418N/A <xsl:if test="not(@monitoring='true')">
1008N/A <xsl:variable name="name" select="@name" />
1008N/A <xsl:variable name="java-property-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(' /**&#xa;',
2499N/A ' * Sets 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>
1418N/A <xsl:if test="@read-only='true'">
1418N/A <xsl:value-of select="' * &lt;p&gt;&#xa;'" />
1418N/A <xsl:value-of
1418N/A select="concat(
1418N/A ' * This property is read-only and can only be modified during&#xa;',
1418N/A ' * creation of a ', $this-ufn, '.&#xa;')" />
1418N/A </xsl:if>
1008N/A <xsl:choose>
1418N/A <xsl:when test="not(@multi-valued='true')">
1008N/A <xsl:value-of
1008N/A select="concat(' *&#xa;',
1008N/A ' * @param value The value of the &quot;', $name, '&quot; property.&#xa;',
1008N/A ' * @throws IllegalPropertyValueException&#xa;',
1418N/A ' * If the new value is invalid.&#xa;')" />
1418N/A <xsl:if test="@read-only='true'">
1418N/A <xsl:value-of
1418N/A select="concat(
1418N/A ' * @throws PropertyIsReadOnlyException&#xa;',
1418N/A ' * If this ', $this-ufn, ' is not being initialized.&#xa;')" />
1418N/A </xsl:if>
1418N/A <xsl:value-of
1418N/A select="concat(
1008N/A ' */&#xa;',
1008N/A ' void set', $java-property-name, '(')" />
1008N/A <xsl:choose>
1008N/A <xsl:when test="@mandatory = 'true'">
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>
1418N/A <xsl:value-of select="' value'" />
1008N/A </xsl:when>
1008N/A <xsl:otherwise>
1008N/A <xsl:value-of
1008N/A select="concat(' *&#xa;',
1008N/A ' * @param values The values of the &quot;', $name, '&quot; property.&#xa;',
1008N/A ' * @throws IllegalPropertyValueException&#xa;',
1418N/A ' * If one or more of the new values are invalid.&#xa;')" />
1418N/A <xsl:if test="@read-only='true'">
1418N/A <xsl:value-of
1418N/A select="concat(
1418N/A ' * @throws PropertyIsReadOnlyException&#xa;',
1418N/A ' * If this ', $this-ufn, ' is not being initialized.&#xa;')" />
1418N/A </xsl:if>
1418N/A <xsl:value-of
1418N/A select="concat(
1008N/A ' */&#xa;',
1008N/A ' void set', $java-property-name, '(Collection&lt;')" />
1008N/A <xsl:call-template name="get-property-java-type" />
1418N/A <xsl:value-of select="'&gt; values'" />
1008N/A </xsl:otherwise>
1008N/A </xsl:choose>
1418N/A <xsl:value-of select="') throws IllegalPropertyValueException'" />
1418N/A <xsl:if test="@read-only='true'">
1418N/A <xsl:value-of select="', PropertyIsReadOnlyException'" />
1418N/A </xsl:if>
1418N/A <xsl:value-of select="';&#xa;'" />
1008N/A </xsl:if>
1008N/A </xsl:template>
2499N/A <!--
2499N/A Generate the default property setter implementation.
2499N/A -->
2499N/A <xsl:template
2499N/A name="generate-default-property-setter-implementation">
2499N/A <xsl:apply-templates select="../.."
2499N/A mode="generate-default-property-setter-implementation-aux" />
2499N/A </xsl:template>
2499N/A <xsl:template match="adm:property"
2499N/A mode="generate-default-property-setter-implementation-aux">
2499N/A <xsl:if test="not(@monitoring='true')">
2499N/A <xsl:variable name="java-prop-name">
2499N/A <xsl:call-template name="name-to-java">
2499N/A <xsl:with-param name="value" select="@name" />
2499N/A </xsl:call-template>
2499N/A </xsl:variable>
2499N/A <xsl:value-of
2499N/A select="concat(' /**&#xa;',
2499N/A ' * {@inheritDoc}&#xa;',
2499N/A ' */&#xa;',
2499N/A ' public void set',
2499N/A $java-prop-name ,
2499N/A '(')" />
2499N/A <xsl:choose>
2499N/A <xsl:when test="not(@multi-valued='true')">
2499N/A <xsl:choose>
2499N/A <xsl:when test="@mandatory='true'">
2499N/A <xsl:call-template
2499N/A name="get-property-java-primitive-type" />
2499N/A </xsl:when>
2499N/A <xsl:otherwise>
2499N/A <xsl:call-template name="get-property-java-type" />
2499N/A </xsl:otherwise>
2499N/A </xsl:choose>
2499N/A <xsl:value-of select="' value)'" />
2499N/A <xsl:if test="@read-only='true'">
2499N/A <xsl:value-of
2499N/A select="' throws PropertyIsReadOnlyException'" />
2499N/A </xsl:if>
2499N/A <xsl:value-of
2499N/A select="concat(' {&#xa;' ,
2499N/A ' impl.setPropertyValue(INSTANCE.get',
2499N/A $java-prop-name ,
2499N/A 'PropertyDefinition(), value);&#xa;',
2499N/A ' }&#xa;')" />
2499N/A </xsl:when>
2499N/A <xsl:otherwise>
2499N/A <xsl:value-of select="'Collection&lt;'" />
2499N/A <xsl:call-template name="get-property-java-type" />
5018N/A <xsl:value-of select="'&gt; values)'" />
5018N/A <xsl:if test="@read-only='true'">
5018N/A <xsl:value-of
5018N/A select="' throws PropertyIsReadOnlyException'" />
5018N/A </xsl:if>
2499N/A <xsl:value-of
5018N/A select="concat(' {&#xa;' ,
2499N/A ' impl.setPropertyValues(INSTANCE.get',
2499N/A $java-prop-name ,
2499N/A 'PropertyDefinition(), values);&#xa;',
2499N/A ' }&#xa;')" />
2499N/A </xsl:otherwise>
2499N/A </xsl:choose>
2499N/A </xsl:if>
2499N/A </xsl:template>
1008N/A</xsl:stylesheet>