Class DefaultSchema
- java.lang.Object
-
- org.apache.directory.api.ldap.model.schema.registries.DefaultSchema
-
- All Implemented Interfaces:
Schema
public class DefaultSchema extends Object implements Schema
The default Schema interface implementation.- Author:
- Apache Directory Project
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<SchemaObjectWrapper>contentThe set of SchemaObjects declared in this schemaprotected static StringDEFAULT_OWNERThe default schema's ownerprotected String[]dependenciesContains the list of schema it depends onprotected booleandisabledTells if this schema is disabledprotected StringnameThe schema nameprotected StringownerThe schema ownerprotected SchemaLoaderschemaLoaderThe SchemaLoader used to load this schema
-
Constructor Summary
Constructors Constructor Description DefaultSchema(SchemaLoader schemaLoader, String name)Creates a new instance of DefaultSchema.DefaultSchema(SchemaLoader schemaLoader, String name, String owner)Creates a new instance of DefaultSchema.DefaultSchema(SchemaLoader schemaLoader, String name, String owner, String[] dependencies)Creates a new instance of DefaultSchema.DefaultSchema(SchemaLoader schemaLoader, String name, String owner, String[] dependencies, boolean disabled)Creates a new instance of DefaultSchema.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDependencies(String... dependenciesToAdd)Add a set of dependencies this schema uses.voiddisable()Disable the schemavoidenable()Enable the schemaSet<SchemaObjectWrapper>getContent()Gets the set of SchemaObject elements declared in this schemaString[]getDependencies()Gets the names of other schemas that the objects within this Schema depends upon.StringgetOwner()Gets the name of the owner of the schema objects within this Schema.SchemaLoadergetSchemaLoader()Gets the SchemaLoader this Schema has to be loaded withStringgetSchemaName()Gets the name of the logical schema the objects of this Schema belong to: e.g.booleanisDisabled()Checks whether or not this schema is enabled or disabled.booleanisEnabled()Checks whether or not this schema is enabled or disabled.StringtoString()
-
-
-
Field Detail
-
DEFAULT_OWNER
protected static final String DEFAULT_OWNER
The default schema's owner- See Also:
- Constant Field Values
-
disabled
protected boolean disabled
Tells if this schema is disabled
-
dependencies
protected String[] dependencies
Contains the list of schema it depends on
-
owner
protected String owner
The schema owner
-
name
protected String name
The schema name
-
content
protected Set<SchemaObjectWrapper> content
The set of SchemaObjects declared in this schema
-
schemaLoader
protected SchemaLoader schemaLoader
The SchemaLoader used to load this schema
-
-
Constructor Detail
-
DefaultSchema
public DefaultSchema(SchemaLoader schemaLoader, String name)
Creates a new instance of DefaultSchema.- Parameters:
schemaLoader- The ShcemaLoader to usename- The schema's name
-
DefaultSchema
public DefaultSchema(SchemaLoader schemaLoader, String name, String owner)
Creates a new instance of DefaultSchema.- Parameters:
schemaLoader- The ShcemaLoader to usename- The schema's nameowner- the schema's owner
-
DefaultSchema
public DefaultSchema(SchemaLoader schemaLoader, String name, String owner, String[] dependencies)
Creates a new instance of DefaultSchema.- Parameters:
schemaLoader- The ShcemaLoader to usename- The schema's nameowner- the schema's ownerdependencies- The list of schemas it depends on
-
DefaultSchema
public DefaultSchema(SchemaLoader schemaLoader, String name, String owner, String[] dependencies, boolean disabled)
Creates a new instance of DefaultSchema.- Parameters:
schemaLoader- The ShcemaLoader to usename- The schema's nameowner- the schema's ownerdependencies- The list of schemas it depends ondisabled- Set the status for this schema
-
-
Method Detail
-
getDependencies
public String[] getDependencies()
Gets the names of other schemas that the objects within this Schema depends upon.- Specified by:
getDependenciesin interfaceSchema- Returns:
- the String names of schema dependencies
-
addDependencies
public void addDependencies(String... dependenciesToAdd)
Add a set of dependencies this schema uses.- Specified by:
addDependenciesin interfaceSchema- Parameters:
dependenciesToAdd- The dependencies to add
-
getOwner
public String getOwner()
Gets the name of the owner of the schema objects within this Schema.
-
getSchemaName
public String getSchemaName()
Gets the name of the logical schema the objects of this Schema belong to: e.g. krb5-kdc may be the logical LDAP schema name.- Specified by:
getSchemaNamein interfaceSchema- Returns:
- the name of the logical schema
-
isDisabled
public boolean isDisabled()
Checks whether or not this schema is enabled or disabled.- Specified by:
isDisabledin interfaceSchema- Returns:
- true if this schema is disabled, false otherwise
-
isEnabled
public boolean isEnabled()
Checks whether or not this schema is enabled or disabled.
-
getContent
public Set<SchemaObjectWrapper> getContent()
Gets the set of SchemaObject elements declared in this schema- Specified by:
getContentin interfaceSchema- Returns:
- The Set of associated SchemaObjects
-
getSchemaLoader
public SchemaLoader getSchemaLoader()
Gets the SchemaLoader this Schema has to be loaded with- Specified by:
getSchemaLoaderin interfaceSchema- Returns:
- The SchemaLoader in use
-
-