Package com.io7m.idstore.server.internal.user

# Class IdUCommandContext

java.lang.Object
com.io7m.idstore.server.internal.command_exec.IdCommandContext<IdUResponseType,IdUserSession>
com.io7m.idstore.server.internal.user.IdUCommandContext

public final class IdUCommandContext extends IdCommandContext<IdUResponseType,IdUserSession>
The command context for user API commands.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdUCommandContext(IdServiceDirectoryType inServices, IdServerStrings inStrings, UUID inRequestId, IdDatabaseTransactionType inTransaction, IdServerClock inClock, IdUser inUser, IdUserSession inSession, String remoteHost, String remoteUserAgent)`
  The context for execution of a command (or set of commands in a transaction).

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static IdUCommandContext`
  `create(IdServiceDirectoryType services, IdDatabaseTransactionType transaction, jakarta.servlet.http.HttpServletRequest request, IdUser user, IdUserSession inSession)`
  Create a new command context from the given objects.
  `protected IdUResponseError`
  `error(UUID id, IdErrorCode errorCode, String message)`
  `IdUser`
  `user()`

  ### Methods inherited from class com.io7m.idstore.server.internal.command_exec.IdCommandContext

  `fail, failDatabase, failFormatted, failMail, failPassword, failProtocol, failSecurity, failValidity, now, remoteHost, remoteUserAgent, requestId, securityCheck, services, session, tracer, transaction`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### IdUCommandContext

    public IdUCommandContext(IdServiceDirectoryType inServices, IdServerStrings inStrings, UUID inRequestId, IdDatabaseTransactionType inTransaction, IdServerClock inClock, IdUser inUser, IdUserSession inSession, String remoteHost, String remoteUserAgent)
    The context for execution of a command (or set of commands in a transaction).
    Parameters:
      `inServices` - The service directory
      `inStrings` - The string resources
      `inRequestId` - The request ID
      `inTransaction` - The transaction
      `inClock` - The clock
      `inUser` - The user executing the command
      `inSession` - The user session
      `remoteHost` - The remote host
      `remoteUserAgent` - The remote user agent

- ## Method Details

  - ### user

    public IdUser user()
    Returns:
      The user executing the command.

  - ### create

    public static IdUCommandContext create(IdServiceDirectoryType services, IdDatabaseTransactionType transaction, jakarta.servlet.http.HttpServletRequest request, IdUser user, IdUserSession inSession)
    Create a new command context from the given objects.
    Parameters:
      `services` - The service directory
      `transaction` - The database transaction
      `request` - The request
      `user` - The current user
      `inSession` - The user session
    Returns:
      A context

  - ### error

    protected IdUResponseError error(UUID id, IdErrorCode errorCode, String message)
    Specified by:
      `error` in class `IdCommandContext<IdUResponseType,IdUserSession>`