public interface OperationContext
Modifier and Type | Method and Description |
---|---|
void |
addRequestControl(org.apache.directory.api.ldap.model.message.Control requestControl)
Adds a request control to this operation.
|
void |
addRequestControls(org.apache.directory.api.ldap.model.message.Control[] requestControls)
Adds many request controls to this operation.
|
void |
addResponseControl(org.apache.directory.api.ldap.model.message.Control responseControl)
Adds a response control to this operation.
|
void |
delete(org.apache.directory.api.ldap.model.name.Dn dn)
Process the delete for inner operations.
|
int |
getCurrentInterceptor() |
org.apache.directory.api.ldap.model.name.Dn |
getDn() |
LdapPrincipal |
getEffectivePrincipal()
Gets the effective principal for this operation which may not be the
same as the authenticated principal when the session for this context
has an explicit authorization id, or this operation was applied with
the proxy authorization control.
|
org.apache.directory.api.ldap.model.entry.Entry |
getEntry()
Gets the server entry associated with the target Dn of this
OperationContext.
|
String |
getName() |
String |
getNextInterceptor()
Gets the next interceptor in the list of interceptors.
|
Partition |
getPartition() |
org.apache.directory.api.ldap.model.message.Control |
getRequestControl(String numericOid)
Gets a request control if present for this request.
|
org.apache.directory.api.ldap.model.message.Control |
getResponseControl(String numericOid)
Gets a response control if present for this request.
|
int |
getResponseControlCount()
Checks the number of response controls have been generated for this operation.
|
org.apache.directory.api.ldap.model.message.Control[] |
getResponseControls()
Gets all the response controls producted during this operation.
|
CoreSession |
getSession()
Gets the session associated with this operation.
|
PartitionTxn |
getTransaction() |
boolean |
hasRequestControl(String numericOid)
Checks to see if a request control is present on this request.
|
boolean |
hasRequestControls()
Checks if any request controls exists for this operation.
|
boolean |
hasResponseControl(String numericOid)
Checks to see if a response control is present on this operation.
|
boolean |
hasResponseControls()
Checks if any response controls have been generated for this operation.
|
void |
ignoreReferral()
Set the throwReferral flag to false
|
boolean |
isReferralIgnored() |
boolean |
isReferralThrown() |
org.apache.directory.api.ldap.model.entry.Entry |
lookup(LookupOperationContext lookupContext) |
LookupOperationContext |
newLookupContext(org.apache.directory.api.ldap.model.name.Dn dn,
String... attributes) |
void |
setCurrentInterceptor(int currentInterceptor)
Sets the current interceptor number to a new value.
|
void |
setDn(org.apache.directory.api.ldap.model.name.Dn dn)
Set the context Dn
|
void |
setEntry(org.apache.directory.api.ldap.model.entry.Entry entry)
Sets the server entry associated with the target Dn of this
OperationContext.
|
void |
setInterceptors(List<String> interceptors)
Sets the list of interceptors to go through for an operation
|
void |
setPartition(Partition partition)
Set the Partition it's working on
|
void |
setTransaction(PartitionTxn transaction) |
void |
throwReferral()
Set the throwReferral flag to true
|
int getCurrentInterceptor()
void setCurrentInterceptor(int currentInterceptor)
currentInterceptor
- The new current interceptor valueLdapPrincipal getEffectivePrincipal()
CoreSession.getAuthenticatedPrincipal()
,
CoreSession.getEffectivePrincipal()
org.apache.directory.api.ldap.model.name.Dn getDn()
void setDn(org.apache.directory.api.ldap.model.name.Dn dn)
dn
- The Dn to setorg.apache.directory.api.ldap.model.entry.Entry getEntry()
ClonedServerEntry.getOriginalEntry()
. The return value may be
null in which case any lookup performed to access it may set it to
prevent the need for subsequent lookups.
Also note that during the course of handling some operations such as
those that rename, move or rename and move the entry, may alter the Dn
of this entry. Interceptor implementors should not presume the Dn or
the values contained in this entry are currently what is present in the
DIT. The original entry contained in the ClonedServerEntry shoudl be
used as the definitive source of information about the state of the
entry in the DIT before returning from the Partition subsystem.void setEntry(org.apache.directory.api.ldap.model.entry.Entry entry)
entry
- the entry whose Dn is associated with this OperationContext.void addResponseControl(org.apache.directory.api.ldap.model.message.Control responseControl)
responseControl
- the response control to add to this operationboolean hasResponseControl(String numericOid)
numericOid
- the numeric OID of the control also known as it's type OIDorg.apache.directory.api.ldap.model.message.Control getResponseControl(String numericOid)
numericOid
- the numeric OID of the control also known as it's type OIDorg.apache.directory.api.ldap.model.message.Control[] getResponseControls()
boolean hasResponseControls()
int getResponseControlCount()
void addRequestControl(org.apache.directory.api.ldap.model.message.Control requestControl)
requestControl
- the request control to add to this operationboolean hasRequestControl(String numericOid)
numericOid
- the numeric OID of the control also known as it's type OIDboolean hasRequestControls()
org.apache.directory.api.ldap.model.message.Control getRequestControl(String numericOid)
numericOid
- the numeric OID of the control also known as it's type OIDvoid addRequestControls(org.apache.directory.api.ldap.model.message.Control[] requestControls)
requestControls
- the request controls to add to this operationString getNextInterceptor()
void setInterceptors(List<String> interceptors)
interceptors
- The list of interceptorsCoreSession getSession()
LookupOperationContext newLookupContext(org.apache.directory.api.ldap.model.name.Dn dn, String... attributes)
org.apache.directory.api.ldap.model.entry.Entry lookup(LookupOperationContext lookupContext) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException
void delete(org.apache.directory.api.ldap.model.name.Dn dn) throws org.apache.directory.api.ldap.model.exception.LdapException
dn
- The Dn for the entry to deleteorg.apache.directory.api.ldap.model.exception.LdapException
- If the deletion failedvoid throwReferral()
boolean isReferralThrown()
true
if the referrals are thrownvoid ignoreReferral()
boolean isReferralIgnored()
true
if the referrals are ignoredPartitionTxn getTransaction()
void setTransaction(PartitionTxn transaction)
transaction
- the transaction to setPartition getPartition()
void setPartition(Partition partition)
partition
- The Partition this operation will be applied onCopyright © 2003–2023 The Apache Software Foundation. All rights reserved.