org.apache.ldap.server
Class SystemPartition

java.lang.Object
  extended byorg.apache.ldap.server.AbstractContextPartition
      extended byorg.apache.ldap.server.SystemPartition
All Implemented Interfaces:
BackingStore, ContextPartition

public final class SystemPartition
extends AbstractContextPartition

A very special ContextPartition used to store system information such as users, the system catalog and other administrative information. This partition is fixed at the ou=system context.

Version:
$Rev: 159259 $
Author:
Apache Directory Project

Field Summary
static java.lang.String ADMIN_PRINCIPAL
          the default user principal or DN
static byte[] ADMIN_PW
          the initial admin passwd set on startup
static java.lang.String ADMIN_UID
          the admin super user uid
static java.lang.String GROUPS_BASE_DN
          the base dn under which all groups reside
static java.lang.String SUFFIX
          System backend suffix constant.
static java.lang.String USERS_BASE_DN
          the base dn under which all users reside
 
Fields inherited from class org.apache.ldap.server.AbstractContextPartition
ALIAS_OID, EXISTANCE_OID, HIERARCHY_OID, NDN_OID, ONEALIAS_OID, SUBALIAS_OID, UPDN_OID
 
Constructor Summary
SystemPartition(Database db, SearchEngine searchEngine, org.apache.ldap.common.schema.AttributeType[] indexAttributes)
          Creates the system partition which is used to store various peices of information critical for server operation.
 
Method Summary
static javax.naming.Name getAdminDn()
          Gets the DN for the admin user.
static javax.naming.Name getGroupsBaseDn()
          Gets the DN for the base entry under which all groups reside.
 javax.naming.Name getSuffix(boolean normalized)
          Gets the distinguished/absolute name of the suffix for all entries stored within this BackingStore.
static javax.naming.Name getUsersBaseDn()
          Gets the DN for the base entry under which all non-admin users reside.
 boolean isSuffix(javax.naming.Name dn)
          Checks to see if name is a context suffix.
 
Methods inherited from class org.apache.ldap.server.AbstractContextPartition
add, close, delete, getDb, getEngine, hasEntry, inspect, isClosed, list, lookup, lookup, modify, modify, modifyRn, move, move, search, sync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADMIN_PRINCIPAL

public static final java.lang.String ADMIN_PRINCIPAL
the default user principal or DN

See Also:
Constant Field Values

ADMIN_UID

public static final java.lang.String ADMIN_UID
the admin super user uid

See Also:
Constant Field Values

ADMIN_PW

public static final byte[] ADMIN_PW
the initial admin passwd set on startup


USERS_BASE_DN

public static final java.lang.String USERS_BASE_DN
the base dn under which all users reside

See Also:
Constant Field Values

GROUPS_BASE_DN

public static final java.lang.String GROUPS_BASE_DN
the base dn under which all groups reside

See Also:
Constant Field Values

SUFFIX

public static final java.lang.String SUFFIX
System backend suffix constant. Should be kept down to a single Dn name component or the default constructor will have to parse it instead of building the name. Note that what ever the SUFFIX equals it should be both the normalized and the user provided form.

See Also:
Constant Field Values
Constructor Detail

SystemPartition

public SystemPartition(Database db,
                       SearchEngine searchEngine,
                       org.apache.ldap.common.schema.AttributeType[] indexAttributes)
                throws javax.naming.NamingException
Creates the system partition which is used to store various peices of information critical for server operation. Things like the system catalog and other operational information like system users are maintained within the context of this partition. Unlike other ContextBackends which must have their suffix specified this one does not since it will stay fixed at the following namingContext: ou=system.

Parameters:
db - the database used for this partition
searchEngine - the search engine to conduct searches with
indexAttributes - the attributeTypes of indicies to build which must also contain all system index attribute types - if not the system will not operate correctly.
Method Detail

getUsersBaseDn

public static final javax.naming.Name getUsersBaseDn()
Gets the DN for the base entry under which all non-admin users reside. A new Name instance is created and returned every time.

Returns:
the users base DN
See Also:
USERS_BASE_DN

getGroupsBaseDn

public static final javax.naming.Name getGroupsBaseDn()
Gets the DN for the base entry under which all groups reside. A new Name instance is created and returned every time.

Returns:
the groups base DN
See Also:
GROUPS_BASE_DN

getAdminDn

public static final javax.naming.Name getAdminDn()
Gets the DN for the admin user.

Returns:
the admin user DN
See Also:
ADMIN_PRINCIPAL

getSuffix

public final javax.naming.Name getSuffix(boolean normalized)
Description copied from interface: ContextPartition
Gets the distinguished/absolute name of the suffix for all entries stored within this BackingStore.

Parameters:
normalized - boolean value used to control the normalization of the returned Name. If true the normalized Name is returned, otherwise the original user provided Name without normalization is returned.
Returns:
Name representing the distinguished/absolute name of this BackingStores root context.
See Also:
ContextPartition.getSuffix(boolean)

isSuffix

public final boolean isSuffix(javax.naming.Name dn)
Description copied from interface: BackingStore
Checks to see if name is a context suffix.

Parameters:
dn - the normalized distinguished/absolute name of the context
Returns:
true if the name is a context suffix, false if it is not.
See Also:
BackingStore.isSuffix(javax.naming.Name)


Copyright © 2002-2005 . All Rights Reserved.