From 45359adc09ac1d9e48206c549e667ed6965c7cd3 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Mon, 28 May 2007 15:31:13 +0000
Subject: [PATCH] Fix the following issues:
---
opends/tests/unit-tests-testng/src/server/org/opends/server/admin/TestChildCfgDefn.java | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 116 insertions(+), 1 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/TestChildCfgDefn.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/TestChildCfgDefn.java
index 46ee42f..84c16f0 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/TestChildCfgDefn.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/TestChildCfgDefn.java
@@ -32,6 +32,7 @@
import org.opends.server.admin.client.CommunicationException;
import org.opends.server.admin.client.ConcurrentModificationException;
import org.opends.server.admin.client.ManagedObject;
+import org.opends.server.admin.client.MissingMandatoryPropertiesException;
import org.opends.server.admin.client.OperationRejectedException;
import org.opends.server.admin.server.ServerManagedObject;
import org.opends.server.types.DN;
@@ -47,9 +48,40 @@
// The singleton configuration definition instance.
private static final TestChildCfgDefn INSTANCE = new TestChildCfgDefn();
+ // The "maximum-length" property definition.
+ private static final IntegerPropertyDefinition PD_MAXIMUM_LENGTH;
+
+ // The "minimum-length" property definition.
+ private static final IntegerPropertyDefinition PD_MINIMUM_LENGTH;
+
// The "heartbeat-interval" property definition.
private static final DurationPropertyDefinition PD_HEARTBEAT_INTERVAL;
+ // Build the "maximum-length" property definition.
+ static {
+ IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition
+ .createBuilder(INSTANCE, "maximum-length");
+ DefaultBehaviorProvider<Integer> provider = new RelativeInheritedDefaultBehaviorProvider<Integer>(
+ TestParentCfgDefn.getInstance(), "maximum-length", 1);
+ builder.setDefaultBehaviorProvider(provider);
+ builder.setLowerLimit(0);
+ PD_MAXIMUM_LENGTH = builder.getInstance();
+ INSTANCE.registerPropertyDefinition(PD_MAXIMUM_LENGTH);
+ }
+
+ // Build the "minimum-length" property definition.
+ static {
+ IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition
+ .createBuilder(INSTANCE, "minimum-length");
+ DefaultBehaviorProvider<Integer> provider = new AbsoluteInheritedDefaultBehaviorProvider<Integer>(
+ ManagedObjectPath.valueOf("/relation=test-parent+name=test parent 2"),
+ "minimum-length");
+ builder.setDefaultBehaviorProvider(provider);
+ builder.setLowerLimit(0);
+ PD_MINIMUM_LENGTH = builder.getInstance();
+ INSTANCE.registerPropertyDefinition(PD_MINIMUM_LENGTH);
+ }
+
// Build the "heartbeat-interval" property definition.
static {
DurationPropertyDefinition.Builder builder = DurationPropertyDefinition
@@ -127,6 +159,28 @@
/**
+ * Get the "maximum-length" property definition.
+ *
+ * @return Returns the "maximum-length" property definition.
+ */
+ public IntegerPropertyDefinition getMaximumLengthPropertyDefinition() {
+ return PD_MAXIMUM_LENGTH;
+ }
+
+
+
+ /**
+ * Get the "minimum-length" property definition.
+ *
+ * @return Returns the "minimum-length" property definition.
+ */
+ public IntegerPropertyDefinition getMinimumLengthPropertyDefinition() {
+ return PD_MINIMUM_LENGTH;
+ }
+
+
+
+ /**
* Managed object client implementation.
*/
private static class TestChildCfgClientImpl implements TestChildCfgClient {
@@ -167,6 +221,46 @@
/**
* {@inheritDoc}
*/
+ public int getMaximumLength() {
+ return impl.getPropertyValue(INSTANCE
+ .getMaximumLengthPropertyDefinition());
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setMaximumLength(Integer value) {
+ impl.setPropertyValue(INSTANCE.getMaximumLengthPropertyDefinition(),
+ value);
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getMinimumLength() {
+ return impl.getPropertyValue(INSTANCE
+ .getMinimumLengthPropertyDefinition());
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setMinimumLength(Integer value) {
+ impl.setPropertyValue(INSTANCE.getMinimumLengthPropertyDefinition(),
+ value);
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
public ManagedObjectDefinition<? extends TestChildCfgClient, ? extends TestChildCfg> definition() {
return INSTANCE;
}
@@ -187,7 +281,8 @@
*/
public void commit() throws ConcurrentModificationException,
OperationRejectedException, AuthorizationException,
- CommunicationException {
+ CommunicationException, ManagedObjectAlreadyExistsException,
+ MissingMandatoryPropertiesException {
impl.commit();
}
}
@@ -225,6 +320,26 @@
/**
* {@inheritDoc}
*/
+ public int getMaximumLength() {
+ return impl.getPropertyValue(INSTANCE
+ .getMaximumLengthPropertyDefinition());
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getMinimumLength() {
+ return impl.getPropertyValue(INSTANCE
+ .getMinimumLengthPropertyDefinition());
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
public ManagedObjectDefinition<? extends TestChildCfgClient, ? extends TestChildCfg> definition() {
return INSTANCE;
}
--
Gitblit v1.10.0