| | |
| | | <xsl:call-template name="generate-relation-constructor" /> |
| | | </xsl:for-each> |
| | | <!-- |
| | | Register any optins associated with this managed object definition. |
| | | Register any options associated with this managed object definition. |
| | | --> |
| | | <xsl:if test="$this-is-advanced or $this-is-hidden"> |
| | | <xsl:text>
</xsl:text> |
| | |
| | | Generate configuration client factory method. |
| | | --> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public ', |
| | | $this-java-class, |
| | | 'CfgClient createClientConfiguration(
', |
| | |
| | | Generate configuration server factory method. |
| | | --> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public ', |
| | | $this-java-class, |
| | | 'Cfg createServerConfiguration(
', |
| | |
| | | Generate configuration server class getter.. |
| | | --> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public Class<', |
| | | $this-java-class, |
| | | 'Cfg> getServerConfigurationClass() {
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public ManagedObjectDefinition<? extends ', $this-java-class,'CfgClient, ? extends ', $this-java-class,'Cfg> definition() {
', |
| | | ' return INSTANCE;
', |
| | | ' }
')" /> |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public PropertyProvider properties() {
', |
| | | ' return impl;
', |
| | | ' }
')" /> |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public void commit() throws ManagedObjectAlreadyExistsException,
', |
| | | ' MissingMandatoryPropertiesException, ConcurrentModificationException,
', |
| | | ' OperationRejectedException, LdapException {
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public Class<? extends ', $this-java-class,'Cfg> configurationClass() {
', |
| | | ' return ', $this-java-class, 'Cfg.class;
', |
| | | ' }
')" /> |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public DN dn() {
', |
| | | ' return impl.getDN();
', |
| | | ' }
')" /> |
| | |
| | | <xsl:choose> |
| | | <xsl:when test="adm:one-to-one"> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public ', $java-class-name, 'CfgClient get', $java-relation-name, '()
', |
| | | ' throws DefinitionDecodingException, ManagedObjectDecodingException,
', |
| | | ' ManagedObjectNotFoundException, ConcurrentModificationException,
', |
| | |
| | | </xsl:when> |
| | | <xsl:when test="adm:one-to-zero-or-one"> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public boolean has', $java-relation-name, '() throws ConcurrentModificationException,
', |
| | | ' LdapException {
', |
| | | ' return impl.hasChild(INSTANCE.get', $java-relation-name,'RelationDefinition());
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public ', $java-class-name, 'CfgClient get', $java-relation-name, '()
', |
| | | ' throws DefinitionDecodingException, ManagedObjectDecodingException,
', |
| | | ' ManagedObjectNotFoundException, ConcurrentModificationException,
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public <M extends ', $java-class-name, 'CfgClient> M create', $java-relation-name, '(
', |
| | | ' ManagedObjectDefinition<M, ? extends ', $java-class-name,'Cfg> d, Collection<PropertyException> exceptions) {
', |
| | | ' return impl.createChild(INSTANCE.get', $java-relation-name,'RelationDefinition(), d, exceptions).getConfiguration();
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public void remove', $java-relation-name, '()
', |
| | | ' throws ManagedObjectNotFoundException, ConcurrentModificationException,
', |
| | | ' OperationRejectedException, LdapException {
', |
| | |
| | | </xsl:call-template> |
| | | </xsl:variable> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public String[] list', $java-relation-plural-name, '() throws ConcurrentModificationException,
', |
| | | ' LdapException {
', |
| | | ' return impl.listChildren(INSTANCE.get', $java-relation-plural-name,'RelationDefinition());
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public ', $java-class-name, 'CfgClient get', $java-relation-name, '(String name)
', |
| | | ' throws DefinitionDecodingException, ManagedObjectDecodingException,
', |
| | | ' ManagedObjectNotFoundException, ConcurrentModificationException,
', |
| | |
| | | <xsl:choose> |
| | | <xsl:when test="string(adm:one-to-many/@unique) != 'true'"> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public <M extends ', $java-class-name, 'CfgClient> M create', $java-relation-name, '(
', |
| | | ' ManagedObjectDefinition<M, ? extends ', $java-class-name,'Cfg> d, String name, Collection<PropertyException> exceptions) throws IllegalManagedObjectNameException {
', |
| | | ' return impl.createChild(INSTANCE.get', $java-relation-plural-name,'RelationDefinition(), d, name, exceptions).getConfiguration();
', |
| | |
| | | <xsl:when test="string(adm:one-to-many/@unique) = 'true'"> |
| | | <!-- Unique one-to-many children are named implicitly by their definition --> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public <M extends ', $java-class-name, 'CfgClient> M create', $java-relation-name, '(
', |
| | | ' ManagedObjectDefinition<M, ? extends ', $java-class-name,'Cfg> d, Collection<PropertyException> exceptions) {
', |
| | | ' return impl.createChild(INSTANCE.get', $java-relation-plural-name,'RelationDefinition(), d, exceptions).getConfiguration();
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public void remove', $java-relation-name, '(String name)
', |
| | | ' throws ManagedObjectNotFoundException, ConcurrentModificationException,
', |
| | | ' OperationRejectedException, LdapException {
', |
| | |
| | | <xsl:choose> |
| | | <xsl:when test="adm:one-to-one"> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public ', $java-class-name, 'Cfg get', |
| | | $java-relation-name, '() throws ConfigException {
', |
| | | ' return impl.getChild(INSTANCE.get', $java-relation-name, 'RelationDefinition()).getConfiguration();
', |
| | |
| | | </xsl:when> |
| | | <xsl:when test="adm:one-to-zero-or-one"> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public boolean has', |
| | | $java-relation-name, '() {
', |
| | | ' return impl.hasChild(INSTANCE.get', $java-relation-name, 'RelationDefinition());
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public ', $java-class-name, 'Cfg get', |
| | | $java-relation-name, '() throws ConfigException {
', |
| | | ' return impl.getChild(INSTANCE.get', $java-relation-name, 'RelationDefinition()).getConfiguration();
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public void add', $java-relation-name, 'AddListener(
', |
| | | ' ConfigurationAddListener<', $java-class-name,'Cfg> listener) throws ConfigException {
', |
| | | ' impl.registerAddListener(INSTANCE.get', $java-relation-name, 'RelationDefinition(), listener);
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public void remove', $java-relation-name, 'AddListener(
', |
| | | ' ConfigurationAddListener<', $java-class-name,'Cfg> listener) {
', |
| | | ' impl.deregisterAddListener(INSTANCE.get', $java-relation-name, 'RelationDefinition(), listener);
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public void add', $java-relation-name, 'DeleteListener(
', |
| | | ' ConfigurationDeleteListener<', $java-class-name,'Cfg> listener) throws ConfigException {
', |
| | | ' impl.registerDeleteListener(INSTANCE.get', $java-relation-name, 'RelationDefinition(), listener);
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public void remove', $java-relation-name, 'DeleteListener(
', |
| | | ' ConfigurationDeleteListener<', $java-class-name,'Cfg> listener) {
', |
| | | ' impl.deregisterDeleteListener(INSTANCE.get', $java-relation-name, 'RelationDefinition(), listener);
', |
| | |
| | | </xsl:call-template> |
| | | </xsl:variable> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public String[] list', |
| | | $java-relation-plural-name, '() {
', |
| | | ' return impl.listChildren(INSTANCE.get', $java-relation-plural-name,'RelationDefinition());
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public ', $java-class-name, 'Cfg get', |
| | | $java-relation-name, '(String name) throws ConfigException {
', |
| | | ' return impl.getChild(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), name).getConfiguration();
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public void add', $java-relation-name, 'AddListener(
', |
| | | ' ConfigurationAddListener<', $java-class-name,'Cfg> listener) throws ConfigException {
', |
| | | ' impl.registerAddListener(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), listener);
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public void remove', $java-relation-name, 'AddListener(
', |
| | | ' ConfigurationAddListener<', $java-class-name,'Cfg> listener) {
', |
| | | ' impl.deregisterAddListener(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), listener);
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public void add', $java-relation-name, 'DeleteListener(
', |
| | | ' ConfigurationDeleteListener<', $java-class-name,'Cfg> listener) throws ConfigException {
', |
| | | ' impl.registerDeleteListener(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), listener);
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | select="concat(' /** {@inheritDoc} */
', |
| | | ' public void remove', $java-relation-name, 'DeleteListener(
', |
| | | ' ConfigurationDeleteListener<', $java-class-name,'Cfg> listener) {
', |
| | | ' impl.deregisterDeleteListener(INSTANCE.get', $java-relation-plural-name, 'RelationDefinition(), listener);
', |
| | |
| | | </xsl:call-template> |
| | | </xsl:variable> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
')" /> |
| | | select="concat(' /** {@inheritDoc} */
')" /> |
| | | <xsl:value-of |
| | | select="concat(' public void add', $short-java-class, 'ChangeListener(
', |
| | | ' ConfigurationChangeListener<',$java-class,'Cfg> listener) {
', |
| | |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of |
| | | select="concat(' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
')" /> |
| | | select="concat(' /** {@inheritDoc} */
')" /> |
| | | <xsl:value-of |
| | | select="concat(' public void remove', $short-java-class, 'ChangeListener(
', |
| | | ' ConfigurationChangeListener<',$java-class,'Cfg> listener) {
', |
| | |
| | | '
', |
| | | '
', |
| | | '
', |
| | | ' /**
', |
| | | ' * {@inheritDoc}
', |
| | | ' */
', |
| | | ' /** {@inheritDoc} */
', |
| | | ' public String toString() { return name; }
')" /> |
| | | <xsl:text>
</xsl:text> |
| | | <xsl:value-of select="' }
'" /> |