|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.core.DefaultCoreSession
public class DefaultCoreSession
The default CoreSession implementation. TODO - has not been completed yet TODO - need to supply controls and other parameters to setup opContexts
| Constructor Summary | |
|---|---|
DefaultCoreSession(LdapPrincipal principal,
DirectoryService directoryService)
|
|
| Method Summary | |
|---|---|
void |
add(org.apache.directory.shared.ldap.message.AddRequest addRequest)
|
void |
add(ServerEntry entry)
Adds an entry into the DirectoryService associated with this CoreSession. |
boolean |
compare(org.apache.directory.shared.ldap.message.CompareRequest compareRequest)
|
void |
compare(org.apache.directory.shared.ldap.name.LdapDN dn,
java.lang.String oid,
java.lang.Object value)
Checks to see if an attribute in an entry contains a value. |
void |
delete(org.apache.directory.shared.ldap.message.DeleteRequest deleteRequest)
|
void |
delete(org.apache.directory.shared.ldap.name.LdapDN dn)
Deletes an entry in the server. |
boolean |
exists(org.apache.directory.shared.ldap.name.LdapDN dn)
Checks to see if an entry exists. |
LdapPrincipal |
getAuthenticatedPrincipal()
Gets the LDAP principal used to authenticate. |
org.apache.directory.shared.ldap.constants.AuthenticationLevel |
getAuthenticationLevel()
Gets the authentication level associated with this session. |
java.net.SocketAddress |
getClientAddress()
Gets the socket address of the LDAP client or null if there is no LDAP client associated with the session. |
java.util.Set<javax.naming.ldap.Control> |
getControls()
Gets the controls enabled for this session. |
DirectoryService |
getDirectoryService()
Gets the DirectoryService this session is bound to. |
LdapPrincipal |
getEffectivePrincipal()
Gets the LDAP principal used for the effective identity associated with this session which may not be the same as the authenticated principal. |
java.util.Set<OperationContext> |
getOutstandingOperations()
Gets all outstanding operations currently being performed that have yet to be completed. |
java.net.SocketAddress |
getServiceAddress()
Gets the socket address of the LDAP server or null if there is no LDAP service associated with the session. |
boolean |
isAdministrator()
TODO - perhaps we should just use a flag that is calculated on creation of this session |
boolean |
isAnAdministrator()
TODO - this method impl does not check to see if the principal is in the administrators group - it only returns true of the principal is the actual admin user. |
boolean |
isAnonymous()
Gets whether or not this user is anonymous. |
boolean |
isConfidential()
Gets whether or not confidentiality is enabled for this session. |
boolean |
isVirtual()
Gets whether or not this session is virtual. |
EntryFilteringCursor |
list(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode,
java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes)
An optimized search operation using one level search scope which returns all the children of an entry specified by distinguished name. |
EntryFilteringCursor |
list(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode,
java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes,
int sizeLimit,
int timeLimit)
An optimized search operation using one level search scope which applies size and time limit constraints and returns all the children of an entry specified by distinguished name if thes limits are not violated. |
ClonedServerEntry |
lookup(org.apache.directory.shared.ldap.name.LdapDN dn)
Looks up an entry in the server returning all attributes: both user and operational attributes. |
ClonedServerEntry |
lookup(org.apache.directory.shared.ldap.name.LdapDN dn,
javax.naming.ldap.Control[] requestControls,
ReferralHandlingMode refMode,
org.apache.directory.shared.ldap.name.LdapDN authorized)
|
ClonedServerEntry |
lookup(org.apache.directory.shared.ldap.name.LdapDN dn,
java.lang.String[] attrId)
|
void |
modify(org.apache.directory.shared.ldap.name.LdapDN dn,
java.util.List<org.apache.directory.shared.ldap.entry.Modification> mods)
Modifies an entry within the server by applying a list of modifications to the entry. |
void |
modify(org.apache.directory.shared.ldap.message.ModifyRequest modifyRequest)
|
void |
move(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.name.LdapDN newParent)
Moves an entry or a branch of entries at a specified distinguished name to a position under a new parent. |
void |
move(org.apache.directory.shared.ldap.message.ModifyDnRequest modifyDnRequest)
|
void |
moveAndRename(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.name.LdapDN newParent,
org.apache.directory.shared.ldap.name.Rdn newRdn,
boolean deleteOldRdn)
Moves and renames (the relative distinguished name of) an entry (or a branch if the entry has children) at a specified distinguished name to a position under a new parent. |
void |
moveAndRename(org.apache.directory.shared.ldap.message.ModifyDnRequest modifyDnRequest)
|
void |
rename(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.name.Rdn newRdn,
boolean deleteOldRdn)
Renames an entry by changing it's relative distinguished name. |
void |
rename(org.apache.directory.shared.ldap.message.ModifyDnRequest modifyDnRequest)
|
EntryFilteringCursor |
search(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.filter.SearchScope scope,
org.apache.directory.shared.ldap.filter.ExprNode filter,
org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode,
java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes)
Searches the directory using a specified search scope and filter. |
EntryFilteringCursor |
search(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.filter.SearchScope scope,
org.apache.directory.shared.ldap.filter.ExprNode filter,
org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode,
java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes,
int sizeLimit,
int timeLimit)
Searches the directory using a specified search scope and filter. |
EntryFilteringCursor |
search(org.apache.directory.shared.ldap.message.SearchRequest searchRequest)
|
void |
unbind()
|
void |
unbind(org.apache.directory.shared.ldap.message.UnbindRequest unbindRequest)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultCoreSession(LdapPrincipal principal,
DirectoryService directoryService)
| Method Detail |
|---|
public void add(ServerEntry entry)
throws java.lang.Exception
CoreSession
add in interface CoreSessionentry - the entry to add
java.lang.Exception - on failures to add the entry
public void compare(org.apache.directory.shared.ldap.name.LdapDN dn,
java.lang.String oid,
java.lang.Object value)
throws java.lang.Exception
CoreSession
compare in interface CoreSessiondn - the distinguished name of the entry to checkoid - the OID of the attribute to check for the valuevalue - the value to check for
java.lang.Exception - if there are failures while comparing
public void delete(org.apache.directory.shared.ldap.name.LdapDN dn)
throws java.lang.Exception
CoreSession
delete in interface CoreSessiondn - the distinguished name of the entry to delete
java.lang.Exception - if there are failures while deleting the entrypublic LdapPrincipal getAuthenticatedPrincipal()
CoreSession
getAuthenticatedPrincipal in interface CoreSessionpublic org.apache.directory.shared.ldap.constants.AuthenticationLevel getAuthenticationLevel()
CoreSession
getAuthenticationLevel in interface CoreSessionpublic java.net.SocketAddress getClientAddress()
CoreSession
getClientAddress in interface CoreSessionpublic java.util.Set<javax.naming.ldap.Control> getControls()
CoreSession
getControls in interface CoreSessionpublic DirectoryService getDirectoryService()
CoreSession
getDirectoryService in interface CoreSessionpublic LdapPrincipal getEffectivePrincipal()
CoreSession
getEffectivePrincipal in interface CoreSessionpublic java.util.Set<OperationContext> getOutstandingOperations()
CoreSession
getOutstandingOperations in interface CoreSessionpublic java.net.SocketAddress getServiceAddress()
CoreSession
getServiceAddress in interface CoreSessionpublic boolean isConfidential()
CoreSession
isConfidential in interface CoreSessionpublic boolean isVirtual()
CoreSession
isVirtual in interface CoreSessionpublic boolean isAdministrator()
isAdministrator in interface CoreSessionCoreSession.isAdministrator()public boolean isAnAdministrator()
isAnAdministrator in interface CoreSessionCoreSession.isAnAdministrator()
public EntryFilteringCursor list(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode,
java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes)
throws java.lang.Exception
CoreSession(objectClass=*) filter.
list in interface CoreSessiondn - the distinguished name of the entry to list the children ofaliasDerefMode - the alias dereferencing mode usedreturningAttributes - the attributes to return
java.lang.Exception - if there are failures while listing children
public EntryFilteringCursor list(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode,
java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes,
int sizeLimit,
int timeLimit)
throws java.lang.Exception
CoreSession(objectClass=*) filter.
list in interface CoreSessiondn - the distinguished name of the entry to list the children ofaliasDerefMode - the alias dereferencing mode usedreturningAttributes - the attributes to returnsizeLimit - the upper bound to the number of entries to returntimeLimit - the upper bound to the amount of time before
terminating the search
java.lang.Exception - if there are failures while listing children
public ClonedServerEntry lookup(org.apache.directory.shared.ldap.name.LdapDN dn)
throws java.lang.Exception
CoreSession
lookup in interface CoreSessiondn - the name of the entry to lookup
java.lang.Exception - if there are failures while looking up the entry
public ClonedServerEntry lookup(org.apache.directory.shared.ldap.name.LdapDN dn,
java.lang.String[] attrId)
throws java.lang.Exception
lookup in interface CoreSessionjava.lang.Exception
public void modify(org.apache.directory.shared.ldap.name.LdapDN dn,
java.util.List<org.apache.directory.shared.ldap.entry.Modification> mods)
throws java.lang.Exception
CoreSession
modify in interface CoreSessiondn - the distinguished name of the entry to modifymods - the list of modifications to apply
java.lang.Exception - if there are failures while modifying the entry
public void move(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.name.LdapDN newParent)
throws java.lang.Exception
CoreSession
move in interface CoreSessiondn - the distinguished name of the entry/branch to movenewParent - the new parent under which the entry/branch is moved
java.lang.Exception
public void moveAndRename(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.name.LdapDN newParent,
org.apache.directory.shared.ldap.name.Rdn newRdn,
boolean deleteOldRdn)
throws java.lang.Exception
CoreSession
moveAndRename in interface CoreSessiondn - the distinguished name of the entry/branch to movenewParent - the new parent under which the entry/branch is movednewRdn - the new relative distinguished name of the entry at the
root of the branch
java.lang.Exception
public void rename(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.name.Rdn newRdn,
boolean deleteOldRdn)
throws java.lang.Exception
CoreSession
rename in interface CoreSessiondn - the distinguished name of the entry to renamenewRdn - the new relative distinguished name for the entrydeleteOldRdn - whether or not the old value for the relative
distinguished name is to be deleted from the entry
java.lang.Exception - if there are failures while renaming the entry
public EntryFilteringCursor search(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.filter.SearchScope scope,
org.apache.directory.shared.ldap.filter.ExprNode filter,
org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode,
java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes)
throws java.lang.Exception
CoreSession
search in interface CoreSessiondn - the distinguished name of the entry to list the children ofscope - the search scope to applyaliasDerefMode - the alias dereferencing mode usedreturningAttributes - the attributes to return
java.lang.Exception - if there are failures while listing children
public EntryFilteringCursor search(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.filter.SearchScope scope,
org.apache.directory.shared.ldap.filter.ExprNode filter,
org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode,
java.util.Set<org.apache.directory.shared.ldap.schema.AttributeTypeOptions> returningAttributes,
int sizeLimit,
int timeLimit)
throws java.lang.Exception
CoreSession
search in interface CoreSessiondn - the distinguished name of the entry to list the children ofaliasDerefMode - the alias dereferencing mode usedreturningAttributes - the attributes to returnsizeLimit - the upper bound to the number of entries to returntimeLimit - the upper bound to the amount of time before
terminating the search
java.lang.Exception - if there are failures while listing childrenpublic boolean isAnonymous()
CoreSession
isAnonymous in interface CoreSession
public void add(org.apache.directory.shared.ldap.message.AddRequest addRequest)
throws java.lang.Exception
add in interface CoreSessionjava.lang.Exception
public boolean compare(org.apache.directory.shared.ldap.message.CompareRequest compareRequest)
throws java.lang.Exception
compare in interface CoreSessionjava.lang.Exception
public void delete(org.apache.directory.shared.ldap.message.DeleteRequest deleteRequest)
throws java.lang.Exception
delete in interface CoreSessionjava.lang.Exception
public ClonedServerEntry lookup(org.apache.directory.shared.ldap.name.LdapDN dn,
javax.naming.ldap.Control[] requestControls,
ReferralHandlingMode refMode,
org.apache.directory.shared.ldap.name.LdapDN authorized)
throws java.lang.Exception
lookup in interface CoreSessionjava.lang.Exception
public boolean exists(org.apache.directory.shared.ldap.name.LdapDN dn)
throws java.lang.Exception
CoreSession
exists in interface CoreSessionjava.lang.Exception
public void modify(org.apache.directory.shared.ldap.message.ModifyRequest modifyRequest)
throws java.lang.Exception
modify in interface CoreSessionjava.lang.Exception
public void move(org.apache.directory.shared.ldap.message.ModifyDnRequest modifyDnRequest)
throws java.lang.Exception
move in interface CoreSessionjava.lang.Exception
public void moveAndRename(org.apache.directory.shared.ldap.message.ModifyDnRequest modifyDnRequest)
throws java.lang.Exception
moveAndRename in interface CoreSessionjava.lang.Exception
public void rename(org.apache.directory.shared.ldap.message.ModifyDnRequest modifyDnRequest)
throws java.lang.Exception
rename in interface CoreSessionjava.lang.Exception
public EntryFilteringCursor search(org.apache.directory.shared.ldap.message.SearchRequest searchRequest)
throws java.lang.Exception
search in interface CoreSessionjava.lang.Exception
public void unbind()
throws java.lang.Exception
unbind in interface CoreSessionjava.lang.Exceptionpublic void unbind(org.apache.directory.shared.ldap.message.UnbindRequest unbindRequest)
unbind in interface CoreSession
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||