org.apache.directory.server.core.schema
Class DefaultSchemaService

java.lang.Object
  extended by org.apache.directory.server.core.schema.DefaultSchemaService
All Implemented Interfaces:
SchemaService

public class DefaultSchemaService
extends java.lang.Object
implements SchemaService

This class manage the Schema's operations.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
DefaultSchemaService()
           
 
Method Summary
 org.apache.directory.shared.ldap.schema.SchemaManager getSchemaManager()
           
 SchemaPartition getSchemaPartition()
           
 org.apache.directory.shared.ldap.entry.ServerEntry getSubschemaEntry(java.lang.String[] ids)
          Gets the schemaSubentry based on specific search id parameters which include the special '*' and '+' operators.
 org.apache.directory.shared.ldap.entry.ServerEntry getSubschemaEntryCloned()
          A seriously unsafe (unsynchronized) means to access the schemaSubentry.
 org.apache.directory.shared.ldap.entry.ServerEntry getSubschemaEntryImmutable()
          A seriously unsafe (unsynchronized) means to access the schemaSubentry.
 void initialize()
          Initializes the SchemaService
 boolean isSchemaSubentry(java.lang.String dnString)
          Tells if the given DN is the schemaSubentry DN
 void setSchemaPartition(SchemaPartition schemaPartition)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSchemaService

public DefaultSchemaService()
                     throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

isSchemaSubentry

public boolean isSchemaSubentry(java.lang.String dnString)
                         throws org.apache.directory.shared.ldap.exception.LdapException
Description copied from interface: SchemaService
Tells if the given DN is the schemaSubentry DN

Specified by:
isSchemaSubentry in interface SchemaService
Parameters:
dnString - The DN we want to check
Returns:
true if the given DN is the Schema subentry DN
Throws:
org.apache.directory.shared.ldap.exception.LdapException - If the given DN is not valid

getSchemaManager

public final org.apache.directory.shared.ldap.schema.SchemaManager getSchemaManager()
Specified by:
getSchemaManager in interface SchemaService
Returns:
the schemaManager loaded from schemaPartition

getSchemaPartition

public SchemaPartition getSchemaPartition()
Specified by:
getSchemaPartition in interface SchemaService

setSchemaPartition

public void setSchemaPartition(SchemaPartition schemaPartition)
Specified by:
setSchemaPartition in interface SchemaService

getSubschemaEntryImmutable

public org.apache.directory.shared.ldap.entry.ServerEntry getSubschemaEntryImmutable()
                                                                              throws java.lang.Exception
A seriously unsafe (unsynchronized) means to access the schemaSubentry.

Specified by:
getSubschemaEntryImmutable in interface SchemaService
Returns:
the schemaSubentry
Throws:
java.lang.Exception - if there is a failure to access schema timestamps

initialize

public void initialize()
                throws java.lang.Exception
Initializes the SchemaService

Specified by:
initialize in interface SchemaService
Throws:
java.lang.Exception - If the initializaion fails

getSubschemaEntryCloned

public org.apache.directory.shared.ldap.entry.ServerEntry getSubschemaEntryCloned()
                                                                           throws java.lang.Exception
Description copied from interface: SchemaService
A seriously unsafe (unsynchronized) means to access the schemaSubentry.

Specified by:
getSubschemaEntryCloned in interface SchemaService
Returns:
the schemaSubentry
Throws:
java.lang.Exception - if there is a failure to access schema timestamps

getSubschemaEntry

public org.apache.directory.shared.ldap.entry.ServerEntry getSubschemaEntry(java.lang.String[] ids)
                                                                     throws java.lang.Exception
Gets the schemaSubentry based on specific search id parameters which include the special '*' and '+' operators.

Specified by:
getSubschemaEntry in interface SchemaService
Parameters:
ids - the ids of the attributes that should be returned from a search
Returns:
the subschema entry with the ids provided
Throws:
java.lang.Exception - if there are failures during schema info access


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