public class DefaultCoreSession extends Object implements CoreSession
Modifier and Type | Field and Description |
---|---|
protected org.apache.directory.api.ldap.model.schema.AttributeType |
objectClassAT
A reference to the ObjectClass AT
|
Constructor and Description |
---|
DefaultCoreSession(LdapPrincipal principal,
DirectoryService directoryService)
Creates a new instance of a DefaultCoreSession
|
Modifier and Type | Method and Description |
---|---|
void |
add(org.apache.directory.api.ldap.model.message.AddRequest addRequest)
Adds an entry into the DirectoryService associated with this CoreSession.
|
void |
add(org.apache.directory.api.ldap.model.message.AddRequest addRequest,
LogChange log)
Adds an entry into the DirectoryService associated with this CoreSession.
|
void |
add(org.apache.directory.api.ldap.model.entry.Entry entry)
Adds an entry into the DirectoryService associated with this CoreSession.
|
void |
add(org.apache.directory.api.ldap.model.entry.Entry entry,
boolean ignoreReferral)
Adds an entry into the DirectoryService associated with this CoreSession.
|
void |
add(org.apache.directory.api.ldap.model.entry.Entry entry,
boolean ignoreReferral,
LogChange log)
Adds an entry into the DirectoryService associated with this CoreSession.
|
void |
add(org.apache.directory.api.ldap.model.entry.Entry entry,
LogChange log)
Adds an entry into the DirectoryService associated with this CoreSession.
|
void |
addTransaction(Partition partition,
PartitionTxn transaction)
Add a transaction associated with a partition if it's not already stored in teh
transaction map.
|
long |
beginSessionTransaction()
Set the flag indicating we have received the startTransaction extended operation
|
boolean |
compare(org.apache.directory.api.ldap.model.message.CompareRequest compareRequest)
Checks to see if an attribute in an entry contains a value.
|
boolean |
compare(org.apache.directory.api.ldap.model.name.Dn dn,
String oid,
Object value)
Checks to see if an attribute in an entry contains a value.
|
boolean |
compare(org.apache.directory.api.ldap.model.name.Dn dn,
String oid,
Object value,
boolean ignoreReferral)
Checks to see if an attribute in an entry contains a value.
|
void |
delete(org.apache.directory.api.ldap.model.message.DeleteRequest deleteRequest)
Deletes an entry in the server.
|
void |
delete(org.apache.directory.api.ldap.model.message.DeleteRequest deleteRequest,
LogChange log)
Deletes an entry in the server.
|
void |
delete(org.apache.directory.api.ldap.model.name.Dn dn)
Deletes an entry in the server.
|
void |
delete(org.apache.directory.api.ldap.model.name.Dn dn,
boolean ignoreReferral)
Deletes an entry in the server.
|
void |
delete(org.apache.directory.api.ldap.model.name.Dn dn,
boolean ignoreReferral,
LogChange log)
Deletes an entry in the server.
|
void |
delete(org.apache.directory.api.ldap.model.name.Dn dn,
LogChange log)
Deletes an entry in the server.
|
void |
endSessionTransaction(boolean commit)
Set the flag indicating we have received the sendTransaction extended operation
|
boolean |
exists(org.apache.directory.api.ldap.model.name.Dn dn)
Checks to see if an entry exists.
|
boolean |
exists(String dn)
Checks to see if an entry exists.
|
LdapPrincipal |
getAnonymousPrincipal()
Gets the anonymous LDAP principal used to authenticate.
|
LdapPrincipal |
getAuthenticatedPrincipal()
Gets the LDAP principal used to authenticate.
|
org.apache.directory.api.ldap.model.constants.AuthenticationLevel |
getAuthenticationLevel()
Gets the authentication level associated with this session.
|
SocketAddress |
getClientAddress()
Gets the socket address of the LDAP client or null if there is no LDAP
client associated with the session.
|
Set<org.apache.directory.api.ldap.model.message.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.
|
org.apache.mina.core.session.IoSession |
getIoSession()
Gets the IoSession from the CoreSession.
|
Set<OperationContext> |
getOutstandingOperations()
Gets all outstanding operations currently being performed that have yet
to be completed.
|
SocketAddress |
getServiceAddress()
Gets the socket address of the LDAP server or null if there is no LDAP
service associated with the session.
|
PartitionTxn |
getTransaction(Partition partition)
Retrieve a transaction associated with a partition, if we have one.
|
boolean |
hasSessionTransaction() |
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 |
isPwdMustChange() |
boolean |
isVirtual()
Gets whether or not this session is virtual.
|
org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> |
list(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.message.AliasDerefMode aliasDerefMode,
String... returningAttributes)
An optimized search operation using one level search scope which
returns all the children of an entry specified by distinguished name.
|
org.apache.directory.api.ldap.model.entry.Entry |
lookup(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.message.Control[] controls,
String... attrIds)
Looks up an entry in the server returning all attributes: both user and
operational attributes.
|
org.apache.directory.api.ldap.model.entry.Entry |
lookup(org.apache.directory.api.ldap.model.name.Dn dn,
String... attrIds)
Looks up an entry in the server returning all attributes: both user and
operational attributes.
|
void |
modify(org.apache.directory.api.ldap.model.name.Dn dn,
List<org.apache.directory.api.ldap.model.entry.Modification> mods)
Modifies an entry within the server by applying a list of modifications
to the entry.
|
void |
modify(org.apache.directory.api.ldap.model.name.Dn dn,
List<org.apache.directory.api.ldap.model.entry.Modification> mods,
boolean ignoreReferral)
Modifies an entry within the server by applying a list of modifications
to the entry.
|
void |
modify(org.apache.directory.api.ldap.model.name.Dn dn,
List<org.apache.directory.api.ldap.model.entry.Modification> mods,
boolean ignoreReferral,
LogChange log)
Modifies an entry within the server by applying a list of modifications
to the entry.
|
void |
modify(org.apache.directory.api.ldap.model.name.Dn dn,
List<org.apache.directory.api.ldap.model.entry.Modification> mods,
LogChange log)
Modifies an entry within the server by applying a list of modifications
to the entry.
|
void |
modify(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.entry.Modification... mods)
Modifies an entry within the server by applying a list of modifications
to the entry.
|
void |
modify(org.apache.directory.api.ldap.model.message.ModifyRequest modifyRequest) |
void |
modify(org.apache.directory.api.ldap.model.message.ModifyRequest modifyRequest,
LogChange log) |
void |
move(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Dn 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.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Dn newParent,
boolean ignoreReferral)
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.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Dn newParent,
boolean ignoreReferral,
LogChange log)
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.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Dn newParent,
LogChange log)
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.api.ldap.model.message.ModifyDnRequest modifyDnRequest)
Move an entry by changing its superior.
|
void |
move(org.apache.directory.api.ldap.model.message.ModifyDnRequest modifyDnRequest,
LogChange log)
Move an entry by changing its superior.
|
void |
moveAndRename(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Dn newParent,
org.apache.directory.api.ldap.model.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.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Dn newParent,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn,
boolean ignoreReferral)
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.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Dn newParent,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn,
boolean ignoreReferral,
LogChange log)
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.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Dn newSuperiorDn,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn,
LogChange log)
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.api.ldap.model.message.ModifyDnRequest modifyDnRequest)
Move and rename an entry.
|
void |
moveAndRename(org.apache.directory.api.ldap.model.message.ModifyDnRequest modifyDnRequest,
LogChange log)
Move and rename an entry.
|
void |
rename(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn)
Renames an entry by changing it's relative distinguished name.
|
void |
rename(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn,
boolean ignoreReferral)
Renames an entry by changing it's relative distinguished name.
|
void |
rename(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn,
boolean ignoreReferral,
LogChange log)
Renames an entry by changing it's relative distinguished name.
|
void |
rename(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn,
LogChange log)
Renames an entry by changing it's relative distinguished name.
|
void |
rename(org.apache.directory.api.ldap.model.message.ModifyDnRequest modifyDnRequest)
Rename an entry applying the ModifyDN request
|
void |
rename(org.apache.directory.api.ldap.model.message.ModifyDnRequest modifyDnRequest,
LogChange log)
Rename an entry applying the ModifyDN request
|
org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> |
search(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.message.SearchScope scope,
org.apache.directory.api.ldap.model.filter.ExprNode filter,
org.apache.directory.api.ldap.model.message.AliasDerefMode aliasDerefMode,
String... returningAttributes)
Searches the directory using a specified search scope and filter.
|
org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> |
search(org.apache.directory.api.ldap.model.name.Dn dn,
String filter)
Searches the directory using a specified filter.
|
org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> |
search(org.apache.directory.api.ldap.model.name.Dn dn,
String filter,
boolean ignoreReferrals)
Searches the directory using a specified filter.
|
org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> |
search(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest) |
void |
setIoSession(org.apache.mina.core.session.IoSession ioSession)
Stores the IoSession into the CoreSession.
|
void |
setPwdMustChange(boolean pwdMustChange)
Sets if the passwords must be changed.
|
void |
unbind()
Unbind from the current LdapSession.
|
void |
unbind(org.apache.directory.api.ldap.model.message.UnbindRequest unbindRequest)
Unbind from the current LdapSession.
|
protected org.apache.directory.api.ldap.model.schema.AttributeType objectClassAT
public DefaultCoreSession(LdapPrincipal principal, DirectoryService directoryService)
principal
- The principal to use to process operation for this sessiondirectoryService
- The DirectoryService to which we will send requestspublic org.apache.mina.core.session.IoSession getIoSession()
public void setIoSession(org.apache.mina.core.session.IoSession ioSession)
ioSession
- The IoSession for this CoreSessionpublic void add(org.apache.directory.api.ldap.model.entry.Entry entry) throws org.apache.directory.api.ldap.model.exception.LdapException
add
in interface CoreSession
entry
- the entry to addorg.apache.directory.api.ldap.model.exception.LdapException
- on failures to add the entrypublic void add(org.apache.directory.api.ldap.model.entry.Entry entry, boolean ignoreReferral) throws org.apache.directory.api.ldap.model.exception.LdapException
add
in interface CoreSession
entry
- the entry to addignoreReferral
- a flag to tell the server to ignore referralsorg.apache.directory.api.ldap.model.exception.LdapException
- on failures to add the entrypublic void add(org.apache.directory.api.ldap.model.entry.Entry entry, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
add
in interface CoreSession
entry
- the entry to addlog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- on failures to add the entrypublic void add(org.apache.directory.api.ldap.model.entry.Entry entry, boolean ignoreReferral, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
add
in interface CoreSession
entry
- the entry to addignoreReferral
- a flag to tell the server to ignore referralslog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- on failures to add the entrypublic void add(org.apache.directory.api.ldap.model.message.AddRequest addRequest) throws org.apache.directory.api.ldap.model.exception.LdapException
add
in interface CoreSession
addRequest
- the request to executeorg.apache.directory.api.ldap.model.exception.LdapException
- on failures to add the entrypublic void add(org.apache.directory.api.ldap.model.message.AddRequest addRequest, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
add
in interface CoreSession
addRequest
- the request to executelog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- on failures to add the entrypublic boolean compare(org.apache.directory.api.ldap.model.name.Dn dn, String oid, Object value) throws org.apache.directory.api.ldap.model.exception.LdapException
compare
in interface CoreSession
dn
- the distinguished name of the entry to checkoid
- the OID of the attribute to check for the valuevalue
- the value to check fororg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while comparingpublic boolean compare(org.apache.directory.api.ldap.model.name.Dn dn, String oid, Object value, boolean ignoreReferral) throws org.apache.directory.api.ldap.model.exception.LdapException
compare
in interface CoreSession
dn
- the distinguished name of the entry to checkoid
- the OID of the attribute to check for the valuevalue
- the value to check forignoreReferral
- a flag to tell the server to ignore referralsorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while comparingpublic void delete(org.apache.directory.api.ldap.model.name.Dn dn) throws org.apache.directory.api.ldap.model.exception.LdapException
delete
in interface CoreSession
dn
- the distinguished name of the entry to deleteorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while deleting the entrypublic void delete(org.apache.directory.api.ldap.model.name.Dn dn, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
delete
in interface CoreSession
dn
- the distinguished name of the entry to deletelog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while deleting the entrypublic void delete(org.apache.directory.api.ldap.model.name.Dn dn, boolean ignoreReferral) throws org.apache.directory.api.ldap.model.exception.LdapException
delete
in interface CoreSession
dn
- the distinguished name of the entry to deleteignoreReferral
- a flag to tell the server to ignore referralsorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while deleting the entrypublic void delete(org.apache.directory.api.ldap.model.name.Dn dn, boolean ignoreReferral, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
delete
in interface CoreSession
dn
- the distinguished name of the entry to deleteignoreReferral
- a flag to tell the server to ignore referralslog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while deleting the entrypublic LdapPrincipal getAnonymousPrincipal()
getAnonymousPrincipal
in interface CoreSession
public LdapPrincipal getAuthenticatedPrincipal()
getAuthenticatedPrincipal
in interface CoreSession
public org.apache.directory.api.ldap.model.constants.AuthenticationLevel getAuthenticationLevel()
getAuthenticationLevel
in interface CoreSession
public SocketAddress getClientAddress()
getClientAddress
in interface CoreSession
public Set<org.apache.directory.api.ldap.model.message.Control> getControls()
getControls
in interface CoreSession
public DirectoryService getDirectoryService()
getDirectoryService
in interface CoreSession
public LdapPrincipal getEffectivePrincipal()
getEffectivePrincipal
in interface CoreSession
public Set<OperationContext> getOutstandingOperations()
getOutstandingOperations
in interface CoreSession
public SocketAddress getServiceAddress()
getServiceAddress
in interface CoreSession
public boolean isConfidential()
isConfidential
in interface CoreSession
public boolean isVirtual()
isVirtual
in interface CoreSession
public boolean isAdministrator()
isAdministrator
in interface CoreSession
CoreSession.isAdministrator()
public boolean isAnAdministrator()
isAnAdministrator
in interface CoreSession
CoreSession.isAnAdministrator()
public org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> list(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.message.AliasDerefMode aliasDerefMode, String... returningAttributes) throws org.apache.directory.api.ldap.model.exception.LdapException
(objectClass=*)
filter.list
in interface CoreSession
dn
- the distinguished name of the entry to list the children ofaliasDerefMode
- the alias dereferencing mode usedreturningAttributes
- the attributes to returnorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while listing childrenpublic org.apache.directory.api.ldap.model.entry.Entry lookup(org.apache.directory.api.ldap.model.name.Dn dn, String... attrIds) throws org.apache.directory.api.ldap.model.exception.LdapException
lookup
in interface CoreSession
dn
- the name of the entry to lookupattrIds
- The list of attributes to returnorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while looking up the entrypublic org.apache.directory.api.ldap.model.entry.Entry lookup(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.message.Control[] controls, String... attrIds) throws org.apache.directory.api.ldap.model.exception.LdapException
lookup
in interface CoreSession
dn
- the name of the entry to lookupcontrols
- the Controls to useattrIds
- The list of attributes to returnorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while looking up the entrypublic void modify(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.entry.Modification... mods) throws org.apache.directory.api.ldap.model.exception.LdapException
modify
in interface CoreSession
dn
- the distinguished name of the entry to modifymods
- the list of modifications to applyorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while modifying the entrypublic void modify(org.apache.directory.api.ldap.model.name.Dn dn, List<org.apache.directory.api.ldap.model.entry.Modification> mods) throws org.apache.directory.api.ldap.model.exception.LdapException
modify
in interface CoreSession
dn
- the distinguished name of the entry to modifymods
- the list of modifications to applyorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while modifying the entrypublic void modify(org.apache.directory.api.ldap.model.name.Dn dn, List<org.apache.directory.api.ldap.model.entry.Modification> mods, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
modify
in interface CoreSession
dn
- the distinguished name of the entry to modifymods
- the list of modifications to applylog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while modifying the entrypublic void modify(org.apache.directory.api.ldap.model.name.Dn dn, List<org.apache.directory.api.ldap.model.entry.Modification> mods, boolean ignoreReferral) throws org.apache.directory.api.ldap.model.exception.LdapException
modify
in interface CoreSession
dn
- the distinguished name of the entry to modifymods
- the list of modifications to applyignoreReferral
- a flag to tell the server to ignore referralsorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while modifying the entrypublic void modify(org.apache.directory.api.ldap.model.name.Dn dn, List<org.apache.directory.api.ldap.model.entry.Modification> mods, boolean ignoreReferral, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
modify
in interface CoreSession
dn
- the distinguished name of the entry to modifymods
- the list of modifications to applyignoreReferral
- a flag to tell the server to ignore referralslog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while modifying the entrypublic void move(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.name.Dn newParent) throws org.apache.directory.api.ldap.model.exception.LdapException
move
in interface CoreSession
dn
- the distinguished name of the entry/branch to movenewParent
- the new parent under which the entry/branch is movedorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while moving the entry/branchpublic void move(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.name.Dn newParent, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
move
in interface CoreSession
dn
- the distinguished name of the entry/branch to movenewParent
- the new parent under which the entry/branch is movedlog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while moving the entry/branchpublic void move(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.name.Dn newParent, boolean ignoreReferral) throws Exception
move
in interface CoreSession
dn
- the distinguished name of the entry/branch to movenewParent
- the new parent under which the entry/branch is movedignoreReferral
- a flag to tell the server to ignore referralsorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while moving the entry/branchException
public void move(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.name.Dn newParent, boolean ignoreReferral, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
move
in interface CoreSession
dn
- the distinguished name of the entry/branch to movenewParent
- the new parent under which the entry/branch is movedignoreReferral
- a flag to tell the server to ignore referralslog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while moving the entry/branchpublic void moveAndRename(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.name.Dn newParent, org.apache.directory.api.ldap.model.name.Rdn newRdn, boolean deleteOldRdn) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRename
in interface CoreSession
dn
- 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 branchdeleteOldRdn
- If the old Rdn must be deletedorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while moving and renaming the entry
or branchpublic void moveAndRename(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.name.Dn newSuperiorDn, org.apache.directory.api.ldap.model.name.Rdn newRdn, boolean deleteOldRdn, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRename
in interface CoreSession
dn
- the distinguished name of the entry/branch to movenewSuperiorDn
- the new parent under which the entry/branch is movednewRdn
- the new relative distinguished name of the entry at the
root of the branchdeleteOldRdn
- If the old Rdn must be deletedlog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while moving and renaming the entry
or branchpublic void moveAndRename(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.name.Dn newParent, org.apache.directory.api.ldap.model.name.Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRename
in interface CoreSession
dn
- 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 branchdeleteOldRdn
- If the old Rdn must be deletedignoreReferral
- a flag to tell the server to ignore referralsorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while moving and renaming the entry
or branchpublic void moveAndRename(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.name.Dn newParent, org.apache.directory.api.ldap.model.name.Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRename
in interface CoreSession
dn
- 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 branchdeleteOldRdn
- If the old Rdn must be deletedignoreReferral
- a flag to tell the server to ignore referralslog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while moving and renaming the entry
or branchpublic void rename(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.name.Rdn newRdn, boolean deleteOldRdn) throws org.apache.directory.api.ldap.model.exception.LdapException
rename
in interface CoreSession
dn
- 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 entryorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while renaming the entrypublic void rename(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.name.Rdn newRdn, boolean deleteOldRdn, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
rename
in interface CoreSession
dn
- 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 entrylog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while renaming the entrypublic void rename(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.name.Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral) throws org.apache.directory.api.ldap.model.exception.LdapException
rename
in interface CoreSession
dn
- 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 entryignoreReferral
- a flag to tell the server to ignore referralsorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while renaming the entrypublic void rename(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.name.Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
rename
in interface CoreSession
dn
- 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 entryignoreReferral
- a flag to tell the server to ignore referralslog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while renaming the entrypublic org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> search(org.apache.directory.api.ldap.model.name.Dn dn, String filter) throws org.apache.directory.api.ldap.model.exception.LdapException
search
in interface CoreSession
dn
- the distinguished name of the entry to list the children offilter
- the search filterorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while listing childrenpublic org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> search(org.apache.directory.api.ldap.model.name.Dn dn, String filter, boolean ignoreReferrals) throws org.apache.directory.api.ldap.model.exception.LdapException
search
in interface CoreSession
dn
- the distinguished name of the entry to list the children offilter
- the search filterignoreReferrals
- a flag to tell the server to ignore referralsorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while listing childrenpublic org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> search(org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.message.SearchScope scope, org.apache.directory.api.ldap.model.filter.ExprNode filter, org.apache.directory.api.ldap.model.message.AliasDerefMode aliasDerefMode, String... returningAttributes) throws org.apache.directory.api.ldap.model.exception.LdapException
search
in interface CoreSession
dn
- the distinguished name of the entry to list the children ofscope
- the search scope to applyfilter
- the search filteraliasDerefMode
- the alias dereferencing mode usedreturningAttributes
- the attributes to returnorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while listing childrenpublic boolean isAnonymous()
isAnonymous
in interface CoreSession
public boolean compare(org.apache.directory.api.ldap.model.message.CompareRequest compareRequest) throws org.apache.directory.api.ldap.model.exception.LdapException
compare
in interface CoreSession
compareRequest
- the received requestorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while comparingpublic void delete(org.apache.directory.api.ldap.model.message.DeleteRequest deleteRequest) throws org.apache.directory.api.ldap.model.exception.LdapException
delete
in interface CoreSession
deleteRequest
- the delete request containing all the informations
necessary to delete the entryorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while deleting the entrypublic void delete(org.apache.directory.api.ldap.model.message.DeleteRequest deleteRequest, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
delete
in interface CoreSession
deleteRequest
- the delete request containing all the informations
necessary to delete the entrylog
- Tells if we should log the deletion in the ChangeLog interceptororg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while deleting the entrypublic boolean exists(String dn) throws org.apache.directory.api.ldap.model.exception.LdapException
exists
in interface CoreSession
dn
- The Dn for the entry to findorg.apache.directory.api.ldap.model.exception.LdapException
- If we weren't able to fetch the entrypublic boolean exists(org.apache.directory.api.ldap.model.name.Dn dn) throws org.apache.directory.api.ldap.model.exception.LdapException
exists
in interface CoreSession
dn
- The Dn for the entry to findorg.apache.directory.api.ldap.model.exception.LdapException
- If we weren't able to fetch the entrypublic void modify(org.apache.directory.api.ldap.model.message.ModifyRequest modifyRequest) throws org.apache.directory.api.ldap.model.exception.LdapException
modify
in interface CoreSession
org.apache.directory.api.ldap.model.exception.LdapException
public void modify(org.apache.directory.api.ldap.model.message.ModifyRequest modifyRequest, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
modify
in interface CoreSession
org.apache.directory.api.ldap.model.exception.LdapException
public void move(org.apache.directory.api.ldap.model.message.ModifyDnRequest modifyDnRequest) throws org.apache.directory.api.ldap.model.exception.LdapException
move
in interface CoreSession
modifyDnRequest
- The ModifyDN requestorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while moving the entry/branchpublic void move(org.apache.directory.api.ldap.model.message.ModifyDnRequest modifyDnRequest, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
move
in interface CoreSession
modifyDnRequest
- The ModifyDN requestlog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while moving the entry/branchpublic void moveAndRename(org.apache.directory.api.ldap.model.message.ModifyDnRequest modifyDnRequest) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRename
in interface CoreSession
modifyDnRequest
- The move and rename requestorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while moving and renaming the entry
or branchpublic void moveAndRename(org.apache.directory.api.ldap.model.message.ModifyDnRequest modifyDnRequest, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRename
in interface CoreSession
modifyDnRequest
- The move and rename requestlog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while moving and renaming the entry
or branchpublic void rename(org.apache.directory.api.ldap.model.message.ModifyDnRequest modifyDnRequest) throws org.apache.directory.api.ldap.model.exception.LdapException
rename
in interface CoreSession
modifyDnRequest
- The requested modificationorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while renaming the entrypublic void rename(org.apache.directory.api.ldap.model.message.ModifyDnRequest modifyDnRequest, LogChange log) throws org.apache.directory.api.ldap.model.exception.LdapException
rename
in interface CoreSession
modifyDnRequest
- The requested modificationlog
- a flag set if the added entry should be stored in the changeLogorg.apache.directory.api.ldap.model.exception.LdapException
- if there are failures while renaming the entrypublic org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.entry.Entry> search(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest) throws org.apache.directory.api.ldap.model.exception.LdapException
search
in interface CoreSession
org.apache.directory.api.ldap.model.exception.LdapException
public void unbind() throws org.apache.directory.api.ldap.model.exception.LdapException
unbind
in interface CoreSession
org.apache.directory.api.ldap.model.exception.LdapException
- If the operation failedpublic void unbind(org.apache.directory.api.ldap.model.message.UnbindRequest unbindRequest) throws org.apache.directory.api.ldap.model.exception.LdapException
unbind
in interface CoreSession
unbindRequest
- The Unbind requst, potentially containing some controlsorg.apache.directory.api.ldap.model.exception.LdapException
- If the operation failedpublic boolean isPwdMustChange()
isPwdMustChange
in interface CoreSession
public void setPwdMustChange(boolean pwdMustChange)
setPwdMustChange
in interface CoreSession
pwdMustChange
- If the password must change or notpublic boolean hasSessionTransaction()
hasSessionTransaction
in interface CoreSession
public long beginSessionTransaction()
beginSessionTransaction
in interface CoreSession
public void endSessionTransaction(boolean commit) throws IOException
endSessionTransaction
in interface CoreSession
commit
- If we have to commit or rollback the transactionIOException
- If one of the transaction cannot be closedpublic PartitionTxn getTransaction(Partition partition)
getTransaction
in interface CoreSession
partition
- The Partitionpublic void addTransaction(Partition partition, PartitionTxn transaction)
addTransaction
in interface CoreSession
partition
- The Partition which will be associated with the transactiontransaction
- The transaction to setCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.