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
-
-
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 void
addDependencies(String... dependenciesToAdd)
Add a set of dependencies this schema uses.void
disable()
Disable the schemavoid
enable()
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.String
getOwner()
Gets the name of the owner of the schema objects within this Schema.SchemaLoader
getSchemaLoader()
Gets the SchemaLoader this Schema has to be loaded withString
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.boolean
isDisabled()
Checks whether or not this schema is enabled or disabled.boolean
isEnabled()
Checks whether or not this schema is enabled or disabled.String
toString()
-
-
-
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:
getDependencies
in interfaceSchema
- Returns:
- the String names of schema dependencies
-
addDependencies
public void addDependencies(String... dependenciesToAdd)
Add a set of dependencies this schema uses.- Specified by:
addDependencies
in 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:
getSchemaName
in interfaceSchema
- Returns:
- the name of the logical schema
-
isDisabled
public boolean isDisabled()
Checks whether or not this schema is enabled or disabled.- Specified by:
isDisabled
in 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:
getContent
in interfaceSchema
- Returns:
- The Set of associated SchemaObjects
-
getSchemaLoader
public SchemaLoader getSchemaLoader()
Gets the SchemaLoader this Schema has to be loaded with- Specified by:
getSchemaLoader
in interfaceSchema
- Returns:
- The SchemaLoader in use
-
-