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
    Context implementations take care of correctly routing internal requests.

    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.Entry getAuthenticationEntry()
      Retrieves the entry for the user as whom the client is authenticated.
      org.forgerock.opendj.ldap.Entry getAuthorizationEntry()
      Retrieves the entry for the user that should be considered the authorization identity for this operation.
      org.forgerock.opendj.ldap.requests.BindRequest getBindRequest()
      Retrieves the last successful bind request from the client.
      org.forgerock.opendj.ldap.Connection getConnection()
      Returns a connection for performing internal operations.
      long getConnectionID()
      Retrieves the unique identifier that is assigned to the client connection that submitted this operation.
      InetSocketAddress getLocalAddress()
      Returns the InetSocketAddress associated with the local system.
      int getLookthroughLimit()
      Retrieves the default maximum number of entries that should checked for matches during a search.
      long getOperationID()
      Retrieves the operation ID for this operation.
      InetSocketAddress getPeerAddress()
      Returns the InetSocketAddress associated with the remote system.
      String getProtocol()
      Retrieves the protocol that the client is using to communicate with the Directory Server.
      int getSecurityStrengthFactor()
      Returns the strongest cipher strength currently in use by the underlying connection.
      int getSizeLimit()
      Retrieves the size limit that will be enforced for searches performed using this client connection.
      int getTimeLimit()
      Retrieves the time limit that will be enforced for searches performed using this client connection.
      boolean hasAllPrivileges​(Collection<Privilege> privileges)
      Indicates whether the authenticate client has all of the specified privileges.
      boolean hasPrivilege​(Privilege privilege)
      Indicates whether the authenticated client has the specified privilege.
      void setAuthorizationEntry​(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.ldap.RequestContext

        addCancelRequestListener, checkIfCancelled, getMessageID, removeCancelRequestListener
    • 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, or null if 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 null if 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:
        true if the authenticated client has all of the specified privileges, or false if 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:
        true if the authenticated client has the specified privilege, or false if 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, or null if 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 null if 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 null if 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 the InetSocketAddress associated with the local system.
        Returns:
        The InetSocketAddress associated 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 the InetSocketAddress associated with the remote system.
        Returns:
        The InetSocketAddress associated 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.