|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.schemamanager.impl.DefaultSchemaManager
public class DefaultSchemaManager
The SchemaManager class : it handles all the schema operations (addition, removal, modification).
| Field Summary | |
|---|---|
static boolean |
RELAXED
Two flags for RELAXED and STRICT, this is RELAXED |
static boolean |
STRICT
Two flags for RELAXED and STRICT, this is STRICT |
| Constructor Summary | |
|---|---|
DefaultSchemaManager()
Creates a new instance of DefaultSchemaManager with the default schema schemaLoader |
|
DefaultSchemaManager(SchemaLoader loader)
Creates a new instance of DefaultSchemaManager with the default schema schemaLoader |
|
DefaultSchemaManager(SchemaLoader loader,
Dn namingContext)
Creates a new instance of DefaultSchemaManager, for a specific naming context |
|
| Method Summary | |
|---|---|
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... schemaNames)
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... schemaNames)
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 |
isDisabledAccepted()
|
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... schemaNames)
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... schemaNames)
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... schemaNames)
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()
Change the SchemaManager to a relaxed mode, where invalid SchemaObjects can be registered. |
void |
setSchemaLoader(SchemaLoader schemaLoader)
Associate a Schema loader to this SchemaManager |
void |
setStrict()
Change the SchemaManager to a strict mode, where invalid SchemaObjects cannot be registered. |
boolean |
unload(Schema... schemas)
Unload the given set of Schemas |
boolean |
unload(String... schemaNames)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean STRICT
public static final boolean RELAXED
| Constructor Detail |
|---|
public DefaultSchemaManager()
throws Exception
loader - The schema loader to use
Exceptionpublic DefaultSchemaManager(SchemaLoader loader)
loader - The schema loader to use
public DefaultSchemaManager(SchemaLoader loader,
Dn namingContext)
loader - The schema loader to usenamingContext - The associated NamingContext| Method Detail |
|---|
public boolean disable(Schema... schemas)
throws LdapException
disable in interface SchemaManagerschemas - The list of schemas to disable
LdapException
public boolean disable(String... schemaNames)
throws LdapException
disable in interface SchemaManagerschemaNames - The list of schema names to disable
LdapExceptionpublic boolean disabledRelaxed(Schema... schemas)
disabledRelaxed in interface SchemaManagerschemas - The list of schemas to disable
public boolean disabledRelaxed(String... schemas)
disabledRelaxed in interface SchemaManagerschemas - The list of schema names to disable
public List<Schema> getDisabled()
getDisabled in interface SchemaManager
public boolean enable(Schema... schemas)
throws LdapException
enable in interface SchemaManagerschemas - The list of schemas to enable
LdapException
public boolean enable(String... schemaNames)
throws LdapException
enable in interface SchemaManagerschemaNames - The list of schema name to enable
LdapExceptionpublic boolean enableRelaxed(Schema... schemas)
enableRelaxed in interface SchemaManagerschemas - The list of schemas to enable
public boolean enableRelaxed(String... schemas)
enableRelaxed in interface SchemaManagerschemas - The list of schema names to enable
public List<Schema> getEnabled()
getEnabled in interface SchemaManagerpublic List<Throwable> getErrors()
getErrors in interface SchemaManagerpublic Registries getRegistries()
getRegistries in interface SchemaManagerpublic boolean isDisabledAccepted()
public boolean load(Schema... schemas)
throws LdapException
SchemaManager.getErrors() method will contain them
load in interface SchemaManagerschemas - the Schemas to load
LdapException
public boolean load(String... schemaNames)
throws Exception
SchemaManager.getErrors() method will contain them
load in interface SchemaManagerschemaNames - the Schemas' name to load
Exception - @TODO
public boolean loadAllEnabled()
throws Exception
loadAllEnabled in interface SchemaManagerException - @TODO
public boolean loadAllEnabledRelaxed()
throws Exception
loadAllEnabledRelaxed in interface SchemaManagerException - @TODO
public boolean loadDisabled(Schema... schemas)
throws LdapException
SchemaManager.getErrors() method will contain them
loadDisabled in interface SchemaManagerschemas - The Schemas to load
LdapException
public boolean loadDisabled(String... schemaNames)
throws LdapException
SchemaManager.getErrors() method will contain them
loadDisabled in interface SchemaManagerschemaNames - The Schemas' name to load
LdapException
public boolean loadRelaxed(Schema... schemas)
throws Exception
SchemaManager.getErrors() method will contain them
loadRelaxed in interface SchemaManagerschemas - the Schemas to load, if enabled
Exception - @TODO
public boolean loadRelaxed(String... schemaNames)
throws Exception
SchemaManager.getErrors() method will contain them
loadRelaxed in interface SchemaManagerschemaNames - the Schemas' name to load, if enabled
Exception - @TODO
public boolean loadWithDeps(Schema... schemas)
throws Exception
SchemaManager.getErrors() method will contain them
loadWithDeps in interface SchemaManagerschemas - the Schemas to load
Exception - @TODO
public boolean loadWithDeps(String... schemas)
throws Exception
SchemaManager.getErrors() method will contain them
loadWithDeps in interface SchemaManagerschemas - the Schemas' name to load
Exception - @TODO
public boolean loadWithDepsRelaxed(Schema... schemas)
throws Exception
SchemaManager.getErrors() method will contain them
loadWithDepsRelaxed in interface SchemaManagerschemas - the Schemas to load
Exception - @TODO
public boolean loadWithDepsRelaxed(String... schemas)
throws Exception
SchemaManager.getErrors() method will contain them
loadWithDepsRelaxed in interface SchemaManagerschemas - the Schemas' name to load
Exception - @TODOpublic void setRegistries(Registries registries)
setRegistries in interface SchemaManagerregistries - The new Registries
public boolean unload(Schema... schemas)
throws LdapException
unload in interface SchemaManagerschemas - The list of Schema to unload
LdapException
public boolean unload(String... schemaNames)
throws LdapException
unload in interface SchemaManagerschemaNames - The list of Schema to unload
LdapException
public boolean verify(Schema... schemas)
throws Exception
verify in interface SchemaManagerschemas - The schemas to check
Exception - if something went wrong
public boolean verify(String... schemas)
throws Exception
verify in interface SchemaManagerschemas - The schema names to check
Exception - if something went wrongpublic void setSchemaLoader(SchemaLoader schemaLoader)
setSchemaLoader in interface SchemaManagerschemaLoader - The schema loader to usepublic Dn getNamingContext()
getNamingContext in interface SchemaManager
public void initialize()
throws Exception
initialize in interface SchemaManagerException - If the initialization failspublic SchemaLoader getLoader()
getLoader in interface SchemaManagerpublic AttributeTypeRegistry getAttributeTypeRegistry()
getAttributeTypeRegistry in interface SchemaManagerpublic ComparatorRegistry getComparatorRegistry()
getComparatorRegistry in interface SchemaManagerpublic DitContentRuleRegistry getDITContentRuleRegistry()
getDITContentRuleRegistry in interface SchemaManagerpublic DitStructureRuleRegistry getDITStructureRuleRegistry()
getDITStructureRuleRegistry in interface SchemaManagerpublic MatchingRuleRegistry getMatchingRuleRegistry()
getMatchingRuleRegistry in interface SchemaManagerpublic MatchingRuleUseRegistry getMatchingRuleUseRegistry()
getMatchingRuleUseRegistry in interface SchemaManagerpublic NameFormRegistry getNameFormRegistry()
getNameFormRegistry in interface SchemaManagerpublic NormalizerRegistry getNormalizerRegistry()
getNormalizerRegistry in interface SchemaManagerpublic ObjectClassRegistry getObjectClassRegistry()
getObjectClassRegistry in interface SchemaManagerpublic LdapSyntaxRegistry getLdapSyntaxRegistry()
getLdapSyntaxRegistry in interface SchemaManagerpublic SyntaxCheckerRegistry getSyntaxCheckerRegistry()
getSyntaxCheckerRegistry in interface SchemaManager
public AttributeType lookupAttributeTypeRegistry(String oid)
throws LdapException
lookupAttributeTypeRegistry in interface SchemaManageroid - the OID we are looking for
LdapException - if the OID is not found in the AttributeType registrypublic AttributeType getAttributeType(String oid)
getAttributeType in interface SchemaManageroid - the OID we are looking for
public LdapComparator<?> lookupComparatorRegistry(String oid)
throws LdapException
lookupComparatorRegistry in interface SchemaManageroid - the OID we are looking for
LdapException - if the OID is not found in the Comparator registry
public MatchingRule lookupMatchingRuleRegistry(String oid)
throws LdapException
lookupMatchingRuleRegistry in interface SchemaManageroid - the OID we are looking for
LdapException - if the OID is not found in the MatchingRule registry
public Normalizer lookupNormalizerRegistry(String oid)
throws LdapException
lookupNormalizerRegistry in interface SchemaManageroid - the OID we are looking for
LdapException - if the OID is not found in the Normalizer registry
public ObjectClass lookupObjectClassRegistry(String oid)
throws LdapException
lookupObjectClassRegistry in interface SchemaManageroid - the OID we are looking for
LdapException - if the OID is not found in the ObjectClass registry
public LdapSyntax lookupLdapSyntaxRegistry(String oid)
throws LdapException
lookupLdapSyntaxRegistry in interface SchemaManageroid - the OID we are looking for
LdapException - if the OID is not found in the LdapSyntax registry
public SyntaxChecker lookupSyntaxCheckerRegistry(String oid)
throws LdapException
lookupSyntaxCheckerRegistry in interface SchemaManageroid - the OID we are looking for
LdapException - if the OID is not found in the SyntaxChecker registry
public boolean add(SchemaObject schemaObject)
throws LdapException
add in interface SchemaManagerschemaObject - the SchemaObject to register
LdapException - if the SchemaObject is already registered or
the registration operation is not supported
public boolean delete(SchemaObject schemaObject)
throws LdapException
delete in interface SchemaManagerschemaObject - the SchemaObject to unregister
LdapExceptionpublic Map<String,OidNormalizer> getNormalizerMapping()
getNormalizerMapping in interface SchemaManagerpublic OidRegistry getGlobalOidRegistry()
getGlobalOidRegistry in interface SchemaManagerpublic Schema getLoadedSchema(String schemaName)
getLoadedSchema in interface SchemaManagerschemaName - the name of the schema to lookup
public boolean isSchemaLoaded(String schemaName)
isSchemaLoaded in interface SchemaManagerschemaName - The schema we want to check
public SchemaObject unregisterAttributeType(String attributeTypeOid)
throws LdapException
unregisterAttributeType in interface SchemaManagerattributeTypeOid - the attributeType OID to unregister
LdapException - if the attributeType is invalid
public SchemaObject unregisterComparator(String comparatorOid)
throws LdapException
unregisterComparator in interface SchemaManagercomparatorOid - the Comparator OID to unregister
LdapException - if the Comparator is invalid
public SchemaObject unregisterDitControlRule(String ditControlRuleOid)
throws LdapException
unregisterDitControlRule in interface SchemaManagerditControlRuleOid - the DitControlRule OID to unregister
LdapException - if the DitControlRule is invalid
public SchemaObject unregisterDitStructureRule(String ditStructureRuleOid)
throws LdapException
unregisterDitStructureRule in interface SchemaManagerditStructureRuleOid - the DitStructureRule OID to unregister
LdapException - if the DitStructureRule is invalid
public SchemaObject unregisterLdapSyntax(String ldapSyntaxOid)
throws LdapException
unregisterLdapSyntax in interface SchemaManagerldapSyntaxOid - the LdapSyntax OID to unregister
LdapException - if the LdapSyntax is invalid
public SchemaObject unregisterMatchingRule(String matchingRuleOid)
throws LdapException
unregisterMatchingRule in interface SchemaManagermatchingRuleOid - the MatchingRuleRule OID to unregister
LdapException - if the MatchingRule is invalid
public SchemaObject unregisterMatchingRuleUse(String matchingRuleUseOid)
throws LdapException
unregisterMatchingRuleUse in interface SchemaManagermatchingRuleUseOid - the MatchingRuleUse OID to unregister
LdapException - if the MatchingRuleUse is invalid
public SchemaObject unregisterNameForm(String nameFormOid)
throws LdapException
unregisterNameForm in interface SchemaManagernameFormOid - the NameForm OID to unregister
LdapException - if the NameForm is invalid
public SchemaObject unregisterNormalizer(String normalizerOid)
throws LdapException
unregisterNormalizer in interface SchemaManagernormalizerOid - the Normalizer OID to unregister
LdapException - if the Normalizer is invalid
public SchemaObject unregisterObjectClass(String objectClassOid)
throws LdapException
unregisterObjectClass in interface SchemaManagerobjectClassOid - the ObjectClass OID to unregister
LdapException - if the ObjectClass is invalid
public SchemaObject unregisterSyntaxChecker(String syntaxCheckerOid)
throws LdapException
unregisterSyntaxChecker in interface SchemaManagersyntaxCheckerOid - the SyntaxChecker OID to unregister
LdapException - if the SyntaxChecker is invalidpublic boolean isRelaxed()
public boolean isStrict()
public Set<String> listDependentSchemaNames(String schemaName)
listDependentSchemaNames in interface SchemaManagerschemaName - The Schema name for which we want to get the list of dependent schemas
public void setRelaxed()
public void setStrict()
public boolean isDisabled(String schemaName)
isDisabled in interface SchemaManagerschemaName - The schema name
public boolean isDisabled(Schema schema)
isDisabled in interface SchemaManagerschema - The schema
public boolean isEnabled(String schemaName)
isEnabled in interface SchemaManagerschemaName - The schema name
public boolean isEnabled(Schema schema)
isEnabled in interface SchemaManagerschema - The schema
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||