org.apache.directory.api.ldap.model.schema.registries
Class DefaultSchema

java.lang.Object
  extended by 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
protected  Set<SchemaObjectWrapper> content
          The set of SchemaObjects declared in this schema
protected static String DEFAULT_OWNER
          The default schema's owner
protected  String[] dependencies
          Contains the list of schema it depends on
protected  boolean disabled
          Tells if this schema is disabled
protected  String name
          The schema name
protected  String owner
          The schema owner
 
Constructor Summary
DefaultSchema(String name)
          Creates a new instance of DefaultSchema.
DefaultSchema(String name, String owner)
          Creates a new instance of DefaultSchema.
DefaultSchema(String name, String owner, String[] dependencies)
          Creates a new instance of DefaultSchema.
DefaultSchema(String name, String owner, String[] dependencies, boolean disabled)
          Creates a new instance of DefaultSchema.
 
Method Summary
 void addDependencies(String... dependenciesToAdd)
          Add a set of dependencies this schema uses.
 void disable()
          Disable the schema
 void enable()
          Enable the schema
 Set<SchemaObjectWrapper> getContent()
          Gets the set of SchemaObject elements declared in this schema
 String[] 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.
 String getSchemaName()
          Gets the name of the logical schema the objects of this Schema belong to: e.g.
 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()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

Constructor Detail

DefaultSchema

public DefaultSchema(String name)
Creates a new instance of DefaultSchema.

Parameters:
name - The schema's name

DefaultSchema

public DefaultSchema(String name,
                     String owner)
Creates a new instance of DefaultSchema.

Parameters:
name - The schema's name
owner - the schema's owner

DefaultSchema

public DefaultSchema(String name,
                     String owner,
                     String[] dependencies)
Creates a new instance of DefaultSchema.

Parameters:
name - The schema's name
owner - the schema's owner
dependencies - The list of schemas it depends on

DefaultSchema

public DefaultSchema(String name,
                     String owner,
                     String[] dependencies,
                     boolean disabled)
Creates a new instance of DefaultSchema.

Parameters:
name - The schema's name
owner - the schema's owner
dependencies - The list of schemas it depends on
disabled - 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 interface Schema
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 interface Schema
Parameters:
dependenciesToAdd - The dependencies to add

getOwner

public String getOwner()
Gets the name of the owner of the schema objects within this Schema.

Specified by:
getOwner in interface Schema
Returns:
the identifier for the owner of this set's objects

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 interface Schema
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 interface Schema
Returns:
true if this schema is disabled, false otherwise

isEnabled

public boolean isEnabled()
Checks whether or not this schema is enabled or disabled.

Specified by:
isEnabled in interface Schema
Returns:
true if this schema is enabled, false otherwise

disable

public void disable()
Disable the schema

Specified by:
disable in interface Schema

enable

public void enable()
Enable the schema

Specified by:
enable in interface Schema

getContent

public Set<SchemaObjectWrapper> getContent()
Gets the set of SchemaObject elements declared in this schema

Specified by:
getContent in interface Schema
Returns:
The Set of associated SchemaObjects

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.