public interface SchemaManager
Modifier and Type | Field and Description |
---|---|
static boolean |
RELAXED
Two flags for RELAXED and STRICT, this is RELAXED
|
static boolean |
STRICT
Two flags for RELAXED and STRICT, this is STRICT
|
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.
|
Collection<Schema> |
getAllSchemas() |
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
|
Collection<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.
|
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 |
isRelaxed()
Tells if the SchemaManager is permissive or if it must be checked
against inconsistencies.
|
boolean |
isSchemaLoaded(String schemaName)
Tells if the specific schema is loaded
|
boolean |
isStrict()
Tells if the SchemaManager is strict.
|
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 |
setRelaxed()
Set the SchemaManager to a RELAXED mode
|
void |
setStrict()
Set the SchemaManager to a STRICT mode
|
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.
|
static final boolean STRICT
static final boolean RELAXED
boolean load(Schema... schemas) throws LdapException
getErrors()
method will contain themschemas
- the Schemas to loadLdapException
- If something went wrongboolean load(String... schemas) throws LdapException
getErrors()
method will contain themschemas
- the Schemas' name to loadLdapException
- If something went wrongboolean loadWithDeps(Schema... schemas) throws LdapException
getErrors()
method will contain themschemas
- the Schemas to loadLdapException
- If something went wrongboolean loadWithDeps(String... schemas) throws LdapException
getErrors()
method will contain themschemas
- the Schemas' name to loadLdapException
- If something went wrongboolean loadRelaxed(Schema... schemas) throws LdapException
getErrors()
method will contain themschemas
- the Schemas to load, if enabledLdapException
- If something went wrongboolean loadRelaxed(String... schemas) throws LdapException
getErrors()
method will contain themschemas
- the Schemas' name to load, if enabledLdapException
- If something went wrongboolean loadWithDepsRelaxed(Schema... schemas) throws LdapException
getErrors()
method will contain themschemas
- the Schemas to loadLdapException
- If something went wrongboolean loadWithDepsRelaxed(String... schemas) throws LdapException
getErrors()
method will contain themschemas
- the Schemas' name to loadLdapException
- If something went wrongboolean loadDisabled(Schema... schemas) throws LdapException
getErrors()
method will contain themschemas
- The Schemas to loadLdapException
- If something went wrongboolean loadDisabled(String... schemas) throws LdapException
getErrors()
method will contain themschemas
- The Schemas' name to loadLdapException
- If something went wrongboolean loadAllEnabled() throws LdapException
LdapException
- If something went wrongboolean loadAllEnabledRelaxed() throws LdapException
LdapException
- If something went wrongboolean unload(Schema... schemas) throws LdapException
schemas
- The list of Schema to unloadLdapException
- If something went wrongboolean unload(String... schemas) throws LdapException
schemas
- The list of Schema to unloadLdapException
- If something went wrongboolean enable(Schema... schemas) throws LdapException
schemas
- The list of schemas to enableLdapException
- If something went wrongboolean enable(String... schemas) throws LdapException
schemas
- The list of schema name to enableLdapException
- If something went wrongboolean enableRelaxed(Schema... schemas)
schemas
- The list of schemas to enableboolean enableRelaxed(String... schemas)
schemas
- The list of schema names to enableCollection<Schema> getEnabled()
Collection<Schema> getAllSchemas()
boolean isEnabled(String schemaName)
schemaName
- The schema nameboolean isEnabled(Schema schema)
schema
- The schemaboolean disable(Schema... schemas) throws LdapException
schemas
- The list of schemas to disableLdapException
- If something went wrongboolean disable(String... schemas) throws LdapException
schemas
- The list of schema names to disableLdapException
- If something went wrongboolean 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 isRelaxed()
void setRelaxed()
boolean isStrict()
void setStrict()
boolean verify(Schema... schemas) throws LdapException
schemas
- The schemas to checkLdapException
- if something went wrongboolean verify(String... schemas) throws LdapException
schemas
- The schema names to checkLdapException
- 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 RegistriesDn getNamingContext()
void initialize() throws LdapException
LdapException
- If the initialization failsboolean 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 unregisterLdapException
- if the SchemaObject is not registered or
the deletion operation is not supportedSchemaObject 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–2019 The Apache Software Foundation. All rights reserved.