org.apache.directory.shared.ldap.schema.registries
Class DefaultSchema

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.registries.DefaultSchema
All Implemented Interfaces:
Schema

public class DefaultSchema
extends java.lang.Object
implements Schema

The default Schema interface implementation.

Version:
$Rev$
Author:
Apache Directory Project

Constructor Summary
DefaultSchema(java.lang.String name)
          Creates a new instance of DefaultSchema.
DefaultSchema(java.lang.String name, java.lang.String owner)
          Creates a new instance of DefaultSchema.
DefaultSchema(java.lang.String name, java.lang.String owner, java.lang.String[] dependencies)
          Creates a new instance of DefaultSchema.
DefaultSchema(java.lang.String name, java.lang.String owner, java.lang.String[] dependencies, boolean disabled)
          Creates a new instance of DefaultSchema.
 
Method Summary
 void addDependencies(java.lang.String... dependencies)
          Add a set of dependencies this schema uses.
 void disable()
          Disable the schema
 void enable()
          Enable the schema
 java.util.Set<SchemaObjectWrapper> getContent()
          Gets the set of SchemaObject elements declared in this schema
 java.lang.String[] getDependencies()
          Gets the names of other schemas that the objects within this Schema depends upon.
 java.lang.String getOwner()
          Gets the name of the owner of the schema objects within this Schema.
 java.lang.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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultSchema

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

Parameters:
name - The schema's name

DefaultSchema

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

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

DefaultSchema

public DefaultSchema(java.lang.String name,
                     java.lang.String owner,
                     java.lang.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(java.lang.String name,
                     java.lang.String owner,
                     java.lang.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 java.lang.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(java.lang.String... dependencies)
Add a set of dependencies this schema uses.

Specified by:
addDependencies in interface Schema

getOwner

public java.lang.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 java.lang.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 java.util.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.