From 4e6c2e385283bfa2444d5a5b31e8054d6f3c2537 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Mon, 01 Jan 2007 20:51:56 +0000
Subject: [PATCH] Add two new server properties:
---
opends/src/server/org/opends/server/core/SchemaConfigManager.java | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/SchemaConfigManager.java b/opends/src/server/org/opends/server/core/SchemaConfigManager.java
index 6aed6a0..81ceeaa 100644
--- a/opends/src/server/org/opends/server/core/SchemaConfigManager.java
+++ b/opends/src/server/org/opends/server/core/SchemaConfigManager.java
@@ -122,6 +122,27 @@
/**
+ * Retrieves the path to the directory containing the server schema files.
+ *
+ * @return The path to the directory containing the server schema files.
+ */
+ public static String getSchemaDirectoryPath()
+ {
+ assert debugEnter(CLASS_NAME, "getSchemaDirectoryPath");
+
+ String schemaDirPath = System.getProperty(PROPERTY_SCHEMA_DIRECTORY);
+ if ((schemaDirPath == null) || (schemaDirPath.length() == 0))
+ {
+ schemaDirPath = DirectoryServer.getServerRoot() + File.separator +
+ PATH_SCHEMA_DIR;
+ }
+
+ return schemaDirPath;
+ }
+
+
+
+ /**
* Retrieves a reference to the schema information that has been read from the
* server configuration. Note that this information will not be complete
* until the <CODE>initializeMatchingRules</CODE>,
@@ -625,8 +646,7 @@
// Construct the path to the directory that should contain the schema files
// and make sure that it exists and is a directory. Get a list of the files
// in that directory sorted in alphabetic order.
- String schemaDirPath = DirectoryServer.getServerRoot() + File.separator +
- PATH_SCHEMA_DIR;
+ String schemaDirPath = getSchemaDirectoryPath();
File schemaDir = new File(schemaDirPath);
String[] fileNames;
--
Gitblit v1.10.0