# Class CAICommandContext

java.lang.Object
com.io7m.cardant.server.controller.command_exec.CACommandContext<CAIResponseType>
com.io7m.cardant.server.controller.inventory.CAICommandContext

public final class CAICommandContext extends CACommandContext<CAIResponseType>
The command context for inventory API commands.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CAICommandContext(com.io7m.repetoir.core.RPServiceDirectoryType inServices, UUID inRequestId, CADatabaseTransactionType inTransaction, CASession inSession, String inRemoteHost, String inRemoteUserAgent)`
  The context for execution of a command (or set of commands in a transaction).

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `securityCheck(com.io7m.medrina.api.MObject object, com.io7m.medrina.api.MActionName action)`
  Perform a security check for the given action.

  ### Methods inherited from class CACommandContext

  `attributes, fail, failDatabase, failFormatted, failFormatted, failProtocol, failSecurity, failValidity, failWithCause, local, now, remoteHost, remoteUserAgent, requestId, services, session, setAttribute, tracer, transaction`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### CAICommandContext

    public CAICommandContext(com.io7m.repetoir.core.RPServiceDirectoryType inServices, UUID inRequestId, CADatabaseTransactionType inTransaction, CASession inSession, String inRemoteHost, String inRemoteUserAgent)
    The context for execution of a command (or set of commands in a transaction).
    Parameters:
      `inServices` - The service directory
      `inRequestId` - The request ID
      `inTransaction` - The transaction
      `inSession` - The user session
      `inRemoteHost` - The remote host
      `inRemoteUserAgent` - The remote user agent

- ## Method Details

  - ### securityCheck

    public void securityCheck(com.io7m.medrina.api.MObject object, com.io7m.medrina.api.MActionName action) throws CASecurityException
    Perform a security check for the given action.
    Parameters:
      `object` - The object
      `action` - The action
    Throws:
      `CASecurityException` - On security policy denials