# Class CAICmdAbstract<C extends CAProtocolMessageType>

java.lang.Object
com.io7m.cardant.server.controller.inventory.CAICmdAbstract<C>

Type Parameters:
  `C` - The type of accepted commands

All Implemented Interfaces:
  `CACommandExecutorType<CAICommandContext,C,CAIResponseType>`

Direct Known Subclasses:
  `CAICmdAuditSearchBegin`, `CAICmdAuditSearchNext`, `CAICmdAuditSearchPrevious`, `CAICmdFileDelete`, `CAICmdFileGet`, `CAICmdFilePut`, `CAICmdFileSearchBegin`, `CAICmdFileSearchNext`, `CAICmdFileSearchPrevious`, `CAICmdItemAttachmentAdd`, `CAICmdItemAttachmentRemove`, `CAICmdItemCreate`, `CAICmdItemDelete`, `CAICmdItemGet`, `CAICmdItemMetadataPut`, `CAICmdItemMetadataRemove`, `CAICmdItemSearchBegin`, `CAICmdItemSearchNext`, `CAICmdItemSearchPrevious`, `CAICmdItemSetName`, `CAICmdItemTypesAssign`, `CAICmdItemTypesRevoke`, `CAICmdLocationAttachmentAdd`, `CAICmdLocationAttachmentRemove`, `CAICmdLocationDelete`, `CAICmdLocationGet`, `CAICmdLocationMetadataPut`, `CAICmdLocationMetadataRemove`, `CAICmdLocationPut`, `CAICmdLocationsList`, `CAICmdLocationTypesAssign`, `CAICmdLocationTypesRevoke`, `CAICmdRolesAssign`, `CAICmdRolesGet`, `CAICmdRolesRevoke`, `CAICmdStockCount`, `CAICmdStockReposit`, `CAICmdStockSearchBegin`, `CAICmdStockSearchNext`, `CAICmdStockSearchPrevious`, `CAICmdTypePackageGetText`, `CAICmdTypePackageInstall`, `CAICmdTypePackageSearchBegin`, `CAICmdTypePackageSearchNext`, `CAICmdTypePackageSearchPrevious`, `CAICmdTypePackageUninstall`, `CAICmdTypePackageUpgrade`

public abstract class CAICmdAbstract<C extends CAProtocolMessageType> extends Object implements CACommandExecutorType<CAICommandContext,C,CAIResponseType>
The abstract base command class.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `CAICmdAbstract()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final CAIResponseType`
  `execute(CAICommandContext context, C command)`
  Execute a command.
  `protected abstract CAIResponseType`
  `executeActual(CAICommandContext context, C command)`

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

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

- ## Constructor Details

  - ### CAICmdAbstract

    protected CAICmdAbstract()

- ## Method Details

  - ### execute

    public final CAIResponseType execute(CAICommandContext context, C command) throws CACommandExecutionFailure
    Description copied from interface: `CACommandExecutorType`
    Execute a command.
    Specified by:
      `execute` in interface `CACommandExecutorType<CAICommandContext,C extends CAProtocolMessageType,CAIResponseType>`
    Parameters:
      `context` - The execution context
      `command` - The command
    Returns:
      The result of execution
    Throws:
      `CACommandExecutionFailure` - On errors

  - ### executeActual

    protected abstract CAIResponseType executeActual(CAICommandContext context, C command) throws CAValidityException, CAException, CACommandExecutionFailure, CASecurityException, CADatabaseException
    Throws:
      `CAValidityException`
      `CAException`
      `CACommandExecutionFailure`
      `CASecurityException`
      `CADatabaseException`