public class SchemaConfigManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SchemaConfigManager.SchemaFileFilter
Filter implementation that accepts only ldif files.
|
Constructor and Description |
---|
SchemaConfigManager(ServerContext serverContext)
Creates a new instance of this schema config manager.
|
Modifier and Type | Method and Description |
---|---|
Schema |
getSchema()
Retrieves a reference to the schema information that has been read from the server
configuration.
|
static String |
getSchemaDirectoryPath()
Retrieves the path to the directory containing the server schema files.
|
void |
initializeAttributeSyntaxes()
Initializes all the attribute syntaxes defined in the Directory Server
configuration.
|
void |
initializeMatchingRules()
Initializes all the matching rules defined in the Directory Server
configuration.
|
void |
initializeSchemaFromFiles()
Initializes all the attribute type, object class, name form, DIT content
rule, DIT structure rule, and matching rule use definitions by reading the
server schema files.
|
static boolean |
isSchemaAttribute(String attrOid)
Checks if a given attribute oid corresponds to an attribute that is used by the definition of the schema.
|
static void |
loadSchemaFile(Schema schema,
Map<String,Attribute> extraAttrs,
String schemaFile)
Loads the contents of the specified schema file into the provided schema.
|
static List<Modification> |
loadSchemaFileReturnModifications(Schema schema,
String schemaFile,
Map<String,Attribute> extraAttrs)
Loads the contents of the specified schema file into the provided schema and returns the list
of modifications.
|
public SchemaConfigManager(ServerContext serverContext)
serverContext
- The server context.public static String getSchemaDirectoryPath()
public Schema getSchema()
Note that this information will not be complete until the initializeMatchingRules()
,
initializeAttributeSyntaxes()
methods have been called.
public void initializeMatchingRules() throws ConfigException, InitializationException
ConfigException
- If a configuration problem causes the matching
rule initialization process to fail.InitializationException
- If a problem occurs while initializing
the matching rules that is not related to
the server configuration.public void initializeAttributeSyntaxes() throws ConfigException, InitializationException
ConfigException
- If a configuration problem causes the syntax
initialization process to fail.InitializationException
- If a problem occurs while initializing
the syntaxes that is not related to the
server configuration.public void initializeSchemaFromFiles() throws ConfigException, InitializationException
ConfigException
- If a configuration problem causes the schema
element initialization to fail.InitializationException
- If a problem occurs while initializing
the schema elements that is not related
to the server configuration.public static void loadSchemaFile(Schema schema, Map<String,Attribute> extraAttrs, String schemaFile) throws ConfigException, InitializationException
schema
- The schema in which the contents of the schema file are
to be loaded.schemaFile
- The name of the schema file to be loaded into the
provided schema.extraAttrs
- The map of extra attributes that will be completed by this method.
Maybe null
if loading extra attributes is not required.ConfigException
- If a configuration problem causes the schema
element initialization to fail.InitializationException
- If a problem occurs while initializing
the schema elements that is not related
to the server configuration.public static List<Modification> loadSchemaFileReturnModifications(Schema schema, String schemaFile, Map<String,Attribute> extraAttrs) throws ConfigException, InitializationException
schema
- The schema in which the contents of the schema file are to be loaded.schemaFile
- The name of the schema file to be loaded into the provided schema.extraAttrs
- The map of extra attributes that will be completed by this method.
Maybe null
if loading extra attributes is not required.ConfigException
- If a configuration problem causes the schema element initialization to fail.InitializationException
- If a problem occurs while initializing the schema elements that is not related to the
server configuration.public static boolean isSchemaAttribute(String attrOid)
attrOid
- The oid of the attribute to be checked.true
if the attribute is part of the schema definition, false otherwiseCopyright 2010-2017 ForgeRock AS.