Package com.io7m.cardant.server.controller.inventory

# 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`, `CAICmdFileGet`, `CAICmdFilePut`, `CAICmdFileRemove`, `CAICmdFileSearchBegin`, `CAICmdFileSearchNext`, `CAICmdFileSearchPrevious`, `CAICmdItemAttachmentAdd`, `CAICmdItemAttachmentRemove`, `CAICmdItemCreate`, `CAICmdItemGet`, `CAICmdItemLocationsList`, `CAICmdItemMetadataPut`, `CAICmdItemMetadataRemove`, `CAICmdItemReposit`, `CAICmdItemSearchBegin`, `CAICmdItemSearchNext`, `CAICmdItemSearchPrevious`, `CAICmdItemSetName`, `CAICmdItemsRemove`, `CAICmdItemTypesAssign`, `CAICmdItemTypesRevoke`, `CAICmdLocationAttachmentAdd`, `CAICmdLocationAttachmentRemove`, `CAICmdLocationGet`, `CAICmdLocationMetadataPut`, `CAICmdLocationMetadataRemove`, `CAICmdLocationPut`, `CAICmdLocationsList`, `CAICmdLocationTypesAssign`, `CAICmdLocationTypesRevoke`, `CAICmdRolesAssign`, `CAICmdRolesGet`, `CAICmdRolesRevoke`, `CAICmdTypeDeclarationGet`, `CAICmdTypeDeclarationPut`, `CAICmdTypeDeclarationRemove`, `CAICmdTypeDeclarationSearchBegin`, `CAICmdTypeDeclarationSearchNext`, `CAICmdTypeDeclarationSearchPrevious`, `CAICmdTypeScalarGet`, `CAICmdTypeScalarPut`, `CAICmdTypeScalarRemove`, `CAICmdTypeScalarSearchBegin`, `CAICmdTypeScalarSearchNext`, `CAICmdTypeScalarSearchPrevious`

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`