public interface SchemaManager
Modifier and Type | Method and Description |
---|---|
boolean |
add(SchemaObject schemaObject)
Registers a new SchemaObject.
|
boolean |
delete(SchemaObject schemaObject)
Unregisters a new SchemaObject.
|
boolean |
disable(Schema... schemas)
Disables a set of Schemas, and returns true if all the schema have been
disabled, with all the dependent schemas, and if the registries is
still consistent.
|
boolean |
disable(String... schemas)
Disables a set of Schemas, and returns true if all the schema have been
disabled, with all the dependent schemas, and if the registries is
still consistent.
|
boolean |
disabledRelaxed(Schema... schemas)
Disables a set of Schemas, and returns true if all the schema have been
disabled, with all the dependent schemas.
|
boolean |
disabledRelaxed(String... schemas)
Disables a set of Schemas, and returns true if all the schema have been
disabled, with all the dependent schemas.
|
boolean |
enable(Schema... schemas)
Enables a set of Schemas, and returns true if all the schema have been
enabled, with all the dependent schemas, and if the registries is
still consistent.
|
boolean |
enable(String... schemas)
Enables a set of Schemas, and returns true if all the schema have been
enabled, with all the dependent schemas, and if the registries is
still consistent.
|
boolean |
enableRelaxed(Schema... schemas)
Enables a set of Schemas, and returns true if all the schema have been
enabled, with all the dependent schemas.
|
boolean |
enableRelaxed(String... schemas)
Enables a set of Schemas, and returns true if all the schema have been
enabled, with all the dependent schemas.
|
AttributeType |
getAttributeType(String oid)
Get an AttributeType in the AttributeType registry.
|
AttributeTypeRegistry |
getAttributeTypeRegistry()
Get an immutable reference on the AttributeType registry
|
ComparatorRegistry |
getComparatorRegistry()
Get an immutable reference on the Comparator registry
|
List<Schema> |
getDisabled() |
DITContentRuleRegistry |
getDITContentRuleRegistry()
Get an immutable reference on the DITContentRule registry
|
DITStructureRuleRegistry |
getDITStructureRuleRegistry()
Get an immutable reference on the DITStructureRule registry
|
List<Schema> |
getEnabled() |
List<Throwable> |
getErrors() |
OidRegistry |
getGlobalOidRegistry()
Returns a reference to the global OidRegistry
|
LdapSyntaxRegistry |
getLdapSyntaxRegistry()
Get an immutable reference on the LdapSyntax registry
|
Schema |
getLoadedSchema(String schemaName)
Gets a schema that has been loaded into these Registries.
|
SchemaLoader |
getLoader() |
MatchingRuleRegistry |
getMatchingRuleRegistry()
Get an immutable reference on the MatchingRule registry
|
MatchingRuleUseRegistry |
getMatchingRuleUseRegistry()
Get an immutable reference on the MatchingRuleUse registry
|
NameFormRegistry |
getNameFormRegistry()
Get an immutable reference on the NameForm registry
|
Dn |
getNamingContext() |
Map<String,OidNormalizer> |
getNormalizerMapping()
Get an immutable reference on the Normalizer mapping
|
NormalizerRegistry |
getNormalizerRegistry()
Get an immutable reference on the Normalizer registry
|
ObjectClassRegistry |
getObjectClassRegistry()
Get an immutable reference on the ObjectClass registry
|
Registries |
getRegistries() |
SyntaxCheckerRegistry |
getSyntaxCheckerRegistry()
Get an immutable reference on the SyntaxChecker registry
|
void |
initialize()
Initializes the SchemaService
|
boolean |
isDisabled(Schema schema)
Tells if the given Schema is disabled
|
boolean |
isDisabled(String schemaName)
Tells if the given Schema is disabled
|
boolean |
isEnabled(Schema schema)
Tells if the given Schema is enabled
|
boolean |
isEnabled(String schemaName)
Tells if the given Schema is enabled
|
boolean |
isSchemaLoaded(String schemaName)
Tells if the specific schema is loaded
|
Set<String> |
listDependentSchemaNames(String schemaName)
Get the list of Schema names which has the given schema name as a dependence
|
boolean |
load(Schema... schemas)
Load some Schemas into the registries.
|
boolean |
load(String... schemas)
Load some Schemas into the registries.
|
boolean |
loadAllEnabled()
Load all the enabled schema into the Registries.
|
boolean |
loadAllEnabledRelaxed()
Load all the enabled schema into the Registries.
|
boolean |
loadDisabled(Schema... schemas)
Load Schemas into the Registries, even if they are disabled.
|
boolean |
loadDisabled(String... schemas)
Load Schemas into the Registries, even if they are disabled.
|
boolean |
loadRelaxed(Schema... schemas)
Load Schemas into the registries, even if there are some errors in the schemas.
|
boolean |
loadRelaxed(String... schemas)
Load Schemas into the registries, even if there are some errors in the schemas.
|
boolean |
loadWithDeps(Schema... schemas)
Load some Schemas into the registries, and loads all of the schemas they depend
on.
|
boolean |
loadWithDeps(String... schemas)
Load some Schemas into the registries, and loads all of the schemas they depend
on.
|
boolean |
loadWithDepsRelaxed(Schema... schemas)
Load some Schemas into the registries, and loads all of the schemas they depend
on.
|
boolean |
loadWithDepsRelaxed(String... schemas)
Load some Schemas into the registries, and loads all of the schemas they depend
on.
|
AttributeType |
lookupAttributeTypeRegistry(String oid)
Lookup for an AttributeType in the AttributeType registry
|
LdapComparator<?> |
lookupComparatorRegistry(String oid)
Lookup for a Comparator in the Comparator registry
|
LdapSyntax |
lookupLdapSyntaxRegistry(String oid)
Lookup for an LdapSyntax in the LdapSyntax registry
|
MatchingRule |
lookupMatchingRuleRegistry(String oid)
Lookup for a MatchingRule in the MatchingRule registry
|
Normalizer |
lookupNormalizerRegistry(String oid)
Lookup for a Normalizer in the Normalizer registry
|
ObjectClass |
lookupObjectClassRegistry(String oid)
Lookup for a ObjectClass in the ObjectClass registry
|
SyntaxChecker |
lookupSyntaxCheckerRegistry(String oid)
Lookup for a SyntaxChecker in the SyntaxChecker registry
|
void |
setRegistries(Registries registries)
Associate a new Registries to the SchemaManager
|
void |
setSchemaLoader(SchemaLoader schemaLoader)
Associate a Schema loader to this SchemaManager
|
boolean |
unload(Schema... schemas)
Unload the given set of Schemas
|
boolean |
unload(String... schemas)
Unload the given set of Schemas
|
SchemaObject |
unregisterAttributeType(String attributeTypeOid)
Removes the registered attributeType from the attributeTypeRegistry
|
SchemaObject |
unregisterComparator(String comparatorOid)
Removes the registered Comparator from the ComparatorRegistry
|
SchemaObject |
unregisterDitControlRule(String ditControlRuleOid)
Removes the registered DitControlRule from the DitControlRuleRegistry
|
SchemaObject |
unregisterDitStructureRule(String ditStructureRuleOid)
Removes the registered DitStructureRule from the DitStructureRuleRegistry
|
SchemaObject |
unregisterLdapSyntax(String ldapSyntaxOid)
Removes the registered LdapSyntax from the LdapSyntaxRegistry
|
SchemaObject |
unregisterMatchingRule(String matchingRuleOid)
Removes the registered MatchingRule from the MatchingRuleRegistry
|
SchemaObject |
unregisterMatchingRuleUse(String matchingRuleUseOid)
Removes the registered MatchingRuleUse from the MatchingRuleUseRegistry
|
SchemaObject |
unregisterNameForm(String nameFormOid)
Removes the registered NameForm from the NameFormRegistry
|
SchemaObject |
unregisterNormalizer(String normalizerOid)
Removes the registered Normalizer from the NormalizerRegistry
|
SchemaObject |
unregisterObjectClass(String objectClassOid)
Removes the registered ObjectClass from the ObjectClassRegistry
|
SchemaObject |
unregisterSyntaxChecker(String syntaxCheckerOid)
Removes the registered SyntaxChecker from the SyntaxCheckerRegistry
|
boolean |
verify(Schema... schemas)
Check that the Schemas are consistent regarding the current Registries.
|
boolean |
verify(String... schemas)
Check that the Schemas are consistent regarding the current Registries.
|
boolean load(Schema... schemas) throws LdapException
getErrors()
method will contain themschemas
- the Schemas to loadException
- @TODOLdapException
boolean load(String... schemas) throws Exception
getErrors()
method will contain themschemas
- the Schemas' name to loadException
- @TODOboolean loadWithDeps(Schema... schemas) throws Exception
getErrors()
method will contain themschemas
- the Schemas to loadException
- @TODOboolean loadWithDeps(String... schemas) throws Exception
getErrors()
method will contain themschemas
- the Schemas' name to loadException
- @TODOboolean loadRelaxed(Schema... schemas) throws Exception
getErrors()
method will contain themschemas
- the Schemas to load, if enabledException
- @TODOboolean loadRelaxed(String... schemas) throws Exception
getErrors()
method will contain themschemas
- the Schemas' name to load, if enabledException
- @TODOboolean loadWithDepsRelaxed(Schema... schemas) throws Exception
getErrors()
method will contain themschemas
- the Schemas to loadException
- @TODOboolean loadWithDepsRelaxed(String... schemas) throws Exception
getErrors()
method will contain themschemas
- the Schemas' name to loadException
- @TODOboolean loadDisabled(Schema... schemas) throws Exception
getErrors()
method will contain themschemas
- The Schemas to loadException
- @TODOboolean loadDisabled(String... schemas) throws LdapException
getErrors()
method will contain themschemas
- The Schemas' name to loadException
- @TODOLdapException
boolean loadAllEnabled() throws Exception
Exception
- @TODOboolean loadAllEnabledRelaxed() throws Exception
Exception
- @TODOboolean unload(Schema... schemas) throws Exception
schemas
- The list of Schema to unloadException
boolean unload(String... schemas) throws LdapException
schemas
- The list of Schema to unloadLdapException
boolean enable(Schema... schemas) throws Exception
schemas
- The list of schemas to enableIf
- something went wrongException
boolean enable(String... schemas) throws LdapException
schemas
- The list of schema name to enableIf
- something went wrongLdapException
boolean enableRelaxed(Schema... schemas)
schemas
- The list of schemas to enableboolean enableRelaxed(String... schemas)
schemas
- The list of schema names to enableList<Schema> getEnabled()
boolean isEnabled(String schemaName)
schemaName
- The schema nameboolean isEnabled(Schema schema)
schema
- The schemaboolean disable(Schema... schemas) throws Exception
schemas
- The list of schemas to disableIf
- something went wrongException
boolean disable(String... schemas) throws LdapException
schemas
- The list of schema names to disableIf
- something went wrongLdapException
boolean disabledRelaxed(Schema... schemas)
schemas
- The list of schemas to disableboolean disabledRelaxed(String... schemas)
schemas
- The list of schema names to disableList<Schema> getDisabled()
boolean isDisabled(String schemaName)
schemaName
- The schema nameboolean isDisabled(Schema schema)
schema
- The schemaboolean verify(Schema... schemas) throws Exception
schemas
- The schemas to checkException
- if something went wrongboolean verify(String... schemas) throws Exception
schemas
- The schema names to checkException
- if something went wrongRegistries getRegistries()
AttributeType lookupAttributeTypeRegistry(String oid) throws LdapException
oid
- the OID we are looking forLdapException
- if the OID is not found in the AttributeType registryAttributeType getAttributeType(String oid)
oid
- the OID we are looking forLdapComparator<?> lookupComparatorRegistry(String oid) throws LdapException
oid
- the OID we are looking forLdapException
- if the OID is not found in the Comparator registryMatchingRule lookupMatchingRuleRegistry(String oid) throws LdapException
oid
- the OID we are looking forLdapException
- if the OID is not found in the MatchingRule registryNormalizer lookupNormalizerRegistry(String oid) throws LdapException
oid
- the OID we are looking forLdapException
- if the OID is not found in the Normalizer registryObjectClass lookupObjectClassRegistry(String oid) throws LdapException
oid
- the OID we are looking forLdapException
- if the OID is not found in the ObjectClass registryLdapSyntax lookupLdapSyntaxRegistry(String oid) throws LdapException
oid
- the OID we are looking forLdapException
- if the OID is not found in the LdapSyntax registrySyntaxChecker lookupSyntaxCheckerRegistry(String oid) throws LdapException
oid
- the OID we are looking forLdapException
- if the OID is not found in the SyntaxChecker registryAttributeTypeRegistry getAttributeTypeRegistry()
ComparatorRegistry getComparatorRegistry()
DITContentRuleRegistry getDITContentRuleRegistry()
DITStructureRuleRegistry getDITStructureRuleRegistry()
MatchingRuleRegistry getMatchingRuleRegistry()
MatchingRuleUseRegistry getMatchingRuleUseRegistry()
NormalizerRegistry getNormalizerRegistry()
NameFormRegistry getNameFormRegistry()
ObjectClassRegistry getObjectClassRegistry()
LdapSyntaxRegistry getLdapSyntaxRegistry()
SyntaxCheckerRegistry getSyntaxCheckerRegistry()
Map<String,OidNormalizer> getNormalizerMapping()
void setRegistries(Registries registries)
registries
- The new Registriesvoid setSchemaLoader(SchemaLoader schemaLoader)
schemaLoader
- The schema loader to useDn getNamingContext()
void initialize() throws Exception
Exception
- If the initialization failsSchemaLoader getLoader()
boolean add(SchemaObject schemaObject) throws LdapException
schemaObject
- the SchemaObject to registerLdapException
- if the SchemaObject is already registered or
the registration operation is not supportedboolean delete(SchemaObject schemaObject) throws LdapException
schemaObject
- the SchemaObject to unregisterException
- if the SchemaObject is not registered or
the deletion operation is not supportedLdapException
SchemaObject unregisterAttributeType(String attributeTypeOid) throws LdapException
attributeTypeOid
- the attributeType OID to unregisterLdapException
- if the attributeType is invalidSchemaObject unregisterComparator(String comparatorOid) throws LdapException
comparatorOid
- the Comparator OID to unregisterLdapException
- if the Comparator is invalidSchemaObject unregisterDitControlRule(String ditControlRuleOid) throws LdapException
ditControlRuleOid
- the DitControlRule OID to unregisterLdapException
- if the DitControlRule is invalidSchemaObject unregisterDitStructureRule(String ditStructureRuleOid) throws LdapException
ditStructureRuleOid
- the DitStructureRule OID to unregisterLdapException
- if the DitStructureRule is invalidSchemaObject unregisterMatchingRule(String matchingRuleOid) throws LdapException
matchingRuleOid
- the MatchingRuleRule OID to unregisterLdapException
- if the MatchingRule is invalidSchemaObject unregisterMatchingRuleUse(String matchingRuleUseOid) throws LdapException
matchingRuleUseOid
- the MatchingRuleUse OID to unregisterLdapException
- if the MatchingRuleUse is invalidSchemaObject unregisterNameForm(String nameFormOid) throws LdapException
nameFormOid
- the NameForm OID to unregisterLdapException
- if the NameForm is invalidSchemaObject unregisterNormalizer(String normalizerOid) throws LdapException
normalizerOid
- the Normalizer OID to unregisterLdapException
- if the Normalizer is invalidSchemaObject unregisterObjectClass(String objectClassOid) throws LdapException
objectClassOid
- the ObjectClass OID to unregisterLdapException
- if the ObjectClass is invalidSchemaObject unregisterLdapSyntax(String ldapSyntaxOid) throws LdapException
ldapSyntaxOid
- the LdapSyntax OID to unregisterLdapException
- if the LdapSyntax is invalidSchemaObject unregisterSyntaxChecker(String syntaxCheckerOid) throws LdapException
syntaxCheckerOid
- the SyntaxChecker OID to unregisterLdapException
- if the SyntaxChecker is invalidOidRegistry getGlobalOidRegistry()
Schema getLoadedSchema(String schemaName)
schemaName
- the name of the schema to lookupboolean isSchemaLoaded(String schemaName)
schemaName
- The schema we want to checkSet<String> listDependentSchemaNames(String schemaName)
schemaName
- The Schema name for which we want to get the list of dependent schemasCopyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.