| | |
| | | * |
| | | * |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | |
| | | */ |
| | | public final class TestChildCfgDefn extends ManagedObjectDefinition<TestChildCfgClient, TestChildCfg> { |
| | | |
| | | // The singleton configuration definition instance. |
| | | /** The singleton configuration definition instance. */ |
| | | private static final TestChildCfgDefn INSTANCE = new TestChildCfgDefn(); |
| | | |
| | | |
| | | |
| | | // The "aggregation-property" property definition. |
| | | /** The "aggregation-property" property definition. */ |
| | | private static final AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg> PD_AGGREGATION_PROPERTY; |
| | | |
| | | |
| | | |
| | | // The "mandatory-boolean-property" property definition. |
| | | /** The "mandatory-boolean-property" property definition. */ |
| | | private static final BooleanPropertyDefinition PD_MANDATORY_BOOLEAN_PROPERTY; |
| | | |
| | | |
| | | |
| | | // The "mandatory-class-property" property definition. |
| | | /** The "mandatory-class-property" property definition. */ |
| | | private static final ClassPropertyDefinition PD_MANDATORY_CLASS_PROPERTY; |
| | | |
| | | |
| | | |
| | | // The "mandatory-read-only-attribute-type-property" property definition. |
| | | /** The "mandatory-read-only-attribute-type-property" property definition. */ |
| | | private static final AttributeTypePropertyDefinition PD_MANDATORY_READ_ONLY_ATTRIBUTE_TYPE_PROPERTY; |
| | | |
| | | |
| | | |
| | | // The "optional-multi-valued-dn-property1" property definition. |
| | | /** The "optional-multi-valued-dn-property1" property definition. */ |
| | | private static final DNPropertyDefinition PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY1; |
| | | |
| | | |
| | | |
| | | // The "optional-multi-valued-dn-property2" property definition. |
| | | /** The "optional-multi-valued-dn-property2" property definition. */ |
| | | private static final DNPropertyDefinition PD_OPTIONAL_MULTI_VALUED_DN_PROPERTY2; |
| | | |
| | | |
| | | |
| | | // Build the "aggregation-property" property definition. |
| | | /** Build the "aggregation-property" property definition. */ |
| | | static { |
| | | AggregationPropertyDefinition.Builder<ConnectionHandlerCfgClient, ConnectionHandlerCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "aggregation-property"); |
| | | builder.setOption(PropertyOption.MULTI_VALUED); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "mandatory-boolean-property" property definition. |
| | | /** Build the "mandatory-boolean-property" property definition. */ |
| | | static { |
| | | BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "mandatory-boolean-property"); |
| | | builder.setOption(PropertyOption.MANDATORY); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "mandatory-class-property" property definition. |
| | | /** Build the "mandatory-class-property" property definition. */ |
| | | static { |
| | | ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "mandatory-class-property"); |
| | | builder.setOption(PropertyOption.MANDATORY); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "mandatory-read-only-attribute-type-property" property definition. |
| | | /** Build the "mandatory-read-only-attribute-type-property" property definition. */ |
| | | static { |
| | | AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(INSTANCE, "mandatory-read-only-attribute-type-property"); |
| | | builder.setOption(PropertyOption.READ_ONLY); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "optional-multi-valued-dn-property1" property definition. |
| | | /** Build the "optional-multi-valued-dn-property1" property definition. */ |
| | | static { |
| | | DNPropertyDefinition.Builder builder = DNPropertyDefinition.createBuilder(INSTANCE, "optional-multi-valued-dn-property1"); |
| | | builder.setOption(PropertyOption.MULTI_VALUED); |
| | |
| | | |
| | | |
| | | |
| | | // Build the "optional-multi-valued-dn-property2" property definition. |
| | | /** Build the "optional-multi-valued-dn-property2" property definition. */ |
| | | static { |
| | | DNPropertyDefinition.Builder builder = DNPropertyDefinition.createBuilder(INSTANCE, "optional-multi-valued-dn-property2"); |
| | | builder.setOption(PropertyOption.MULTI_VALUED); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public TestChildCfgClient createClientConfiguration( |
| | | ManagedObject<? extends TestChildCfgClient> impl) { |
| | | return new TestChildCfgClientImpl(impl); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public TestChildCfg createServerConfiguration( |
| | | ServerManagedObject<? extends TestChildCfg> impl) { |
| | | return new TestChildCfgServerImpl(impl); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Class<TestChildCfg> getServerConfigurationClass() { |
| | | return TestChildCfg.class; |
| | | } |
| | |
| | | private static class TestChildCfgClientImpl implements |
| | | TestChildCfgClient { |
| | | |
| | | // Private implementation. |
| | | /** Private implementation. */ |
| | | private ManagedObject<? extends TestChildCfgClient> impl; |
| | | |
| | | |
| | | |
| | | // Private constructor. |
| | | /** Private constructor. */ |
| | | private TestChildCfgClientImpl( |
| | | ManagedObject<? extends TestChildCfgClient> impl) { |
| | | this.impl = impl; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<String> getAggregationProperty() { |
| | | return impl.getPropertyValues(INSTANCE.getAggregationPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setAggregationProperty(Collection<String> values) { |
| | | impl.setPropertyValues(INSTANCE.getAggregationPropertyPropertyDefinition(), values); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Boolean isMandatoryBooleanProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setMandatoryBooleanProperty(boolean value) { |
| | | impl.setPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition(), value); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getMandatoryClassProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setMandatoryClassProperty(String value) { |
| | | impl.setPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition(), value); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public AttributeType getMandatoryReadOnlyAttributeTypeProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setMandatoryReadOnlyAttributeTypeProperty(AttributeType value) throws PropertyException { |
| | | impl.setPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition(), value); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<DN> getOptionalMultiValuedDNProperty1() { |
| | | return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty1PropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setOptionalMultiValuedDNProperty1(Collection<DN> values) { |
| | | impl.setPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty1PropertyDefinition(), values); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<DN> getOptionalMultiValuedDNProperty2() { |
| | | return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty2PropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setOptionalMultiValuedDNProperty2(Collection<DN> values) { |
| | | impl.setPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty2PropertyDefinition(), values); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ManagedObjectDefinition<? extends TestChildCfgClient, ? extends TestChildCfg> definition() { |
| | | return INSTANCE; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public PropertyProvider properties() { |
| | | return impl; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void commit() throws ManagedObjectAlreadyExistsException, |
| | | MissingMandatoryPropertiesException, ConcurrentModificationException, |
| | | OperationRejectedException, AuthorizationException, |
| | |
| | | private static class TestChildCfgServerImpl implements |
| | | TestChildCfg { |
| | | |
| | | // Private implementation. |
| | | /** Private implementation. */ |
| | | private ServerManagedObject<? extends TestChildCfg> impl; |
| | | |
| | | |
| | | |
| | | // Private constructor. |
| | | /** Private constructor. */ |
| | | private TestChildCfgServerImpl(ServerManagedObject<? extends TestChildCfg> impl) { |
| | | this.impl = impl; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void addChangeListener( |
| | | ConfigurationChangeListener<TestChildCfg> listener) { |
| | | impl.registerChangeListener(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void removeChangeListener( |
| | | ConfigurationChangeListener<TestChildCfg> listener) { |
| | | impl.deregisterChangeListener(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<String> getAggregationProperty() { |
| | | return impl.getPropertyValues(INSTANCE.getAggregationPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isMandatoryBooleanProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryBooleanPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public String getMandatoryClassProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryClassPropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public AttributeType getMandatoryReadOnlyAttributeTypeProperty() { |
| | | return impl.getPropertyValue(INSTANCE.getMandatoryReadOnlyAttributeTypePropertyPropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<DN> getOptionalMultiValuedDNProperty1() { |
| | | return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty1PropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public SortedSet<DN> getOptionalMultiValuedDNProperty2() { |
| | | return impl.getPropertyValues(INSTANCE.getOptionalMultiValuedDNProperty2PropertyDefinition()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Class<? extends TestChildCfg> configurationClass() { |
| | | return TestChildCfg.class; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ServerManagedObject<? extends TestChildCfg> managedObject() { |
| | | return impl; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public DN dn() { |
| | | return impl.getDN(); |
| | | } |
| | | |
| | | } |
| | | } |