Package com.io7m.idstore.server.internal.admin

# Class IdACommandContext

java.lang.Object
com.io7m.idstore.server.internal.command_exec.IdCommandContext<IdAResponseType,IdAdminSession>
com.io7m.idstore.server.internal.admin.IdACommandContext

public final class IdACommandContext extends IdCommandContext<IdAResponseType,IdAdminSession>
The command context for public API commands.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdACommandContext(IdServiceDirectoryType inServices, IdServerStrings inStrings, UUID inRequestId, IdDatabaseTransactionType inTransaction, IdServerClock inClock, IdAdmin inAdmin, IdAdminSession 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
  `IdAdmin`
  `admin()`
  `protected IdAResponseError`
  `error(UUID id, IdErrorCode errorCode, String message)`

  ### 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

  - ### IdACommandContext

    public IdACommandContext(IdServiceDirectoryType inServices, IdServerStrings inStrings, UUID inRequestId, IdDatabaseTransactionType inTransaction, IdServerClock inClock, IdAdmin inAdmin, IdAdminSession 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
      `inSession` - The user session
      `inAdmin` - The admin executing the command
      `remoteHost` - The remote host
      `remoteUserAgent` - The remote user agent

- ## Method Details

  - ### admin

    public IdAdmin admin()
    Returns:
      The admin executing the command.

  - ### error

    protected IdAResponseError error(UUID id, IdErrorCode errorCode, String message)
    Specified by:
      `error` in class `IdCommandContext<IdAResponseType,IdAdminSession>`