| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of select="' // Define managed object tags.
'"/> |
| | | <xsl:value-of select="' static {
'"/> |
| | | <xsl:value-of select="' // Define managed object tags.
'" /> |
| | | <xsl:value-of select="' static {
'" /> |
| | | <xsl:for-each select="$this/adm:tag-definition"> |
| | | <xsl:sort select="@name" /> |
| | | <xsl:value-of select="concat(' Tag.define("', @name, '");
')"/> |
| | | <xsl:value-of |
| | | select="concat(' Tag.define("', @name, '");
')" /> |
| | | </xsl:for-each> |
| | | <xsl:value-of select="' }
'"/> |
| | | <xsl:value-of select="' }
'" /> |
| | | </xsl:if> |
| | | <!-- |
| | | Generate declarations for properties defined or |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of select="' // Register the tags associated with this managed object definition.
'"/> |
| | | <xsl:value-of select="' static {
'"/> |
| | | <xsl:value-of |
| | | select="' // Register the tags associated with this managed object definition.
'" /> |
| | | <xsl:value-of select="' static {
'" /> |
| | | <xsl:for-each select="$this/adm:tag"> |
| | | <xsl:sort select="@name" /> |
| | | <xsl:value-of select="concat(' INSTANCE.registerTag(Tag.valueOf("', @name, '"));
')"/> |
| | | <xsl:value-of |
| | | select="concat(' INSTANCE.registerTag(Tag.valueOf("', @name, '"));
')" /> |
| | | </xsl:for-each> |
| | | <xsl:value-of select="' }
'"/> |
| | | <xsl:value-of select="' }
'" /> |
| | | </xsl:if> |
| | | <!-- |
| | | Configuration definition singleton getter. |
| | |
| | | <xsl:value-of |
| | | select="' builder.setOption(PropertyOption.MONITORING);
'" /> |
| | | </xsl:if> |
| | | <xsl:if |
| | | test="adm:requires-admin-action/adm:server-restart|adm:requires-admin-action/adm:component-restart|adm:requires-admin-action/adm:other"> |
| | | <xsl:value-of |
| | | select="' builder.setOption(PropertyOption.REQUIRES_ADMIN_ACTION);
'" /> |
| | | </xsl:if> |
| | | <xsl:if test="@mandatory='true'"> |
| | | <xsl:value-of |
| | | select="' builder.setOption(PropertyOption.MANDATORY);
'" /> |
| | |
| | | <xsl:value-of |
| | | select="' builder.setOption(PropertyOption.HIDDEN);
'" /> |
| | | </xsl:if> |
| | | <xsl:variable name="action-type"> |
| | | <xsl:choose> |
| | | <xsl:when test="adm:requires-admin-action"> |
| | | <xsl:call-template name="name-to-java-constant"> |
| | | <xsl:with-param name="value" |
| | | select="local-name(adm:requires-admin-action/*)" /> |
| | | </xsl:call-template> |
| | | </xsl:when> |
| | | <xsl:otherwise> |
| | | <xsl:value-of select="'NONE'" /> |
| | | </xsl:otherwise> |
| | | </xsl:choose> |
| | | </xsl:variable> |
| | | <xsl:value-of |
| | | select="concat(' builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.', $action-type, ', INSTANCE, "', @name, '"));
')" /> |
| | | <xsl:if |
| | | test="not(@mandatory='true') and not(adm:default-behavior)"> |
| | | <xsl:message terminate="yes"> |
| | |
| | | @mandatory='true']"> |
| | | <import>org.opends.server.admin.PropertyOption</import> |
| | | </xsl:if> |
| | | <xsl:if test="$this-local-properties"> |
| | | <import>org.opends.server.admin.AdministratorAction</import> |
| | | </xsl:if> |
| | | <xsl:if test="$this/adm:tag-definition or $this/adm:tag"> |
| | | <import>org.opends.server.admin.Tag</import> |
| | | </xsl:if> |