Package org.forgerock.opendj.server.core
Interface Operation
-
- All Superinterfaces:
AttachmentHolder,org.forgerock.opendj.ldap.RequestContext
- All Known Subinterfaces:
BindRequestContext
public interface Operation extends org.forgerock.opendj.ldap.RequestContext, AttachmentHolder
The context in which a request is to be processed.Implementations may query the context in order to:
- query the schema associated with the request (attribute types, decode DNs, etc)
- perform internal operations
- query information regarding client performing the request
In addition, the context acts as a transaction manager, coordinating any resources accessed during the processing of a request and any subsequent requests forming part of the same logical transaction.
FiXME: this interface should be split up into sub-components, such as network information (protocol, addresses), client information (auth ID, SSF, privileges).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.forgerock.opendj.ldap.EntrygetAuthenticationEntry()Retrieves the entry for the user as whom the client is authenticated.org.forgerock.opendj.ldap.EntrygetAuthorizationEntry()Retrieves the entry for the user that should be considered the authorization identity for this operation.org.forgerock.opendj.ldap.requests.BindRequestgetBindRequest()Retrieves the last successful bind request from the client.org.forgerock.opendj.ldap.ConnectiongetConnection()Returns a connection for performing internal operations.longgetConnectionID()Retrieves the unique identifier that is assigned to the client connection that submitted this operation.InetSocketAddressgetLocalAddress()Returns theInetSocketAddressassociated with the local system.intgetLookthroughLimit()Retrieves the default maximum number of entries that should checked for matches during a search.longgetOperationID()Retrieves the operation ID for this operation.InetSocketAddressgetPeerAddress()Returns theInetSocketAddressassociated with the remote system.StringgetProtocol()Retrieves the protocol that the client is using to communicate with the Directory Server.intgetSecurityStrengthFactor()Returns the strongest cipher strength currently in use by the underlying connection.intgetSizeLimit()Retrieves the size limit that will be enforced for searches performed using this client connection.intgetTimeLimit()Retrieves the time limit that will be enforced for searches performed using this client connection.booleanhasAllPrivileges(Collection<Privilege> privileges)Indicates whether the authenticate client has all of the specified privileges.booleanhasPrivilege(Privilege privilege)Indicates whether the authenticated client has the specified privilege.voidsetAuthorizationEntry(org.forgerock.opendj.ldap.Entry authorizationEntry)Sets the entry for the user that should be considered the authorization identity for this operation.-
Methods inherited from interface org.forgerock.opendj.server.core.AttachmentHolder
getAttachment, getAttachmentNames, removeAttachment, setAttachment
-
-
-
-
Method Detail
-
getAuthorizationEntry
org.forgerock.opendj.ldap.Entry getAuthorizationEntry()
Retrieves the entry for the user that should be considered the authorization identity for this operation. In many cases, it will be the same as the authorization entry for the underlying client connection, ornullif no authentication has been performed on that connection. However, it may be some other value if special processing has been requested (e.g., the operation included a proxied authorization control).- Returns:
- The entry for the user that should be considered the
authorization identity for this operation, or
nullif the authorization identity should be the unauthenticated user.
-
getConnection
org.forgerock.opendj.ldap.Connection getConnection()
Returns a connection for performing internal operations.- Returns:
- A connection for performing internal operations.
-
getOperationID
long getOperationID()
Retrieves the operation ID for this operation.- Returns:
- The operation ID for this operation.
-
hasAllPrivileges
boolean hasAllPrivileges(Collection<Privilege> privileges)
Indicates whether the authenticate client has all of the specified privileges.- Parameters:
privileges- The array of privileges for which to make the determination.- Returns:
trueif the authenticated client has all of the specified privileges, orfalseif not.
-
hasPrivilege
boolean hasPrivilege(Privilege privilege)
Indicates whether the authenticated client has the specified privilege.- Parameters:
privilege- The privilege for which to make the determination.- Returns:
trueif the authenticated client has the specified privilege, orfalseif not.
-
setAuthorizationEntry
void setAuthorizationEntry(org.forgerock.opendj.ldap.Entry authorizationEntry)
Sets the entry for the user that should be considered the authorization identity for this operation.- Parameters:
authorizationEntry- The entry for the user that should be considered the authorization identity for this operation, ornullif it should be the unauthenticated user.
-
getAuthenticationEntry
org.forgerock.opendj.ldap.Entry getAuthenticationEntry()
Retrieves the entry for the user as whom the client is authenticated.- Returns:
- The entry for the user as whom the client is authenticated, or
nullif the client is unauthenticated.
-
getBindRequest
org.forgerock.opendj.ldap.requests.BindRequest getBindRequest()
Retrieves the last successful bind request from the client.- Returns:
- The last successful bind request or
nullif the client have not yet successfully bind.
-
getConnectionID
long getConnectionID()
Retrieves the unique identifier that is assigned to the client connection that submitted this operation.- Returns:
- The unique identifier that is assigned to the client connection that submitted this operation.
-
getLocalAddress
InetSocketAddress getLocalAddress()
Returns theInetSocketAddressassociated with the local system.- Returns:
- The
InetSocketAddressassociated with the local system.
-
getLookthroughLimit
int getLookthroughLimit()
Retrieves the default maximum number of entries that should checked for matches during a search.- Returns:
- The default maximum number of entries that should checked for matches during a search.
-
getPeerAddress
InetSocketAddress getPeerAddress()
Returns theInetSocketAddressassociated with the remote system.- Returns:
- The
InetSocketAddressassociated with the remote system.
-
getProtocol
String getProtocol()
Retrieves the protocol that the client is using to communicate with the Directory Server.- Returns:
- The protocol that the client is using to communicate with the Directory Server.
-
getSecurityStrengthFactor
int getSecurityStrengthFactor()
Returns the strongest cipher strength currently in use by the underlying connection.- Returns:
- The strongest cipher strength currently in use by the underlying connection.
-
getSizeLimit
int getSizeLimit()
Retrieves the size limit that will be enforced for searches performed using this client connection.- Returns:
- The size limit that will be enforced for searches performed using this client connection.
-
getTimeLimit
int getTimeLimit()
Retrieves the time limit that will be enforced for searches performed using this client connection.- Returns:
- The time limit that will be enforced for searches performed using this client connection.
-
-