Package com.io7m.idstore.shell.admin.internal

# Class IdAShellCmdAbstract<C extends IdACommandType<R>,R extends IdAResponseType>

java.lang.Object
com.io7m.idstore.shell.admin.internal.IdAShellCmdAbstract<C,R>

Type Parameters:
  `C` - The command type
  `R` - The response type

All Implemented Interfaces:
  `IdAShellCmdType`, `com.io7m.quarrel.core.QCommandOrGroupType`, `com.io7m.quarrel.core.QCommandType`

Direct Known Subclasses:
  `IdAShellCmdAdminBanCreate`, `IdAShellCmdAdminBanDelete`, `IdAShellCmdAdminBanGet`, `IdAShellCmdAdminCreate`, `IdAShellCmdAdminEmailAdd`, `IdAShellCmdAdminEmailRemove`, `IdAShellCmdAdminGet`, `IdAShellCmdAdminGetByEmail`, `IdAShellCmdAdminSearchBegin`, `IdAShellCmdAdminSearchByEmailBegin`, `IdAShellCmdAdminSearchByEmailNext`, `IdAShellCmdAdminSearchByEmailPrevious`, `IdAShellCmdAdminSearchNext`, `IdAShellCmdAdminSearchPrevious`, `IdAShellCmdAuditSearchBegin`, `IdAShellCmdAuditSearchNext`, `IdAShellCmdAuditSearchPrevious`, `IdAShellCmdSelf`, `IdAShellCmdUserBanCreate`, `IdAShellCmdUserBanDelete`, `IdAShellCmdUserBanGet`, `IdAShellCmdUserCreate`, `IdAShellCmdUserEmailAdd`, `IdAShellCmdUserEmailRemove`, `IdAShellCmdUserGet`, `IdAShellCmdUserGetByEmail`, `IdAShellCmdUserLoginHistory`, `IdAShellCmdUserSearchBegin`, `IdAShellCmdUserSearchByEmailBegin`, `IdAShellCmdUserSearchByEmailNext`, `IdAShellCmdUserSearchByEmailPrevious`, `IdAShellCmdUserSearchNext`, `IdAShellCmdUserSearchPrevious`

public abstract class IdAShellCmdAbstract<C extends IdACommandType<R>,R extends IdAResponseType> extends Object implements IdAShellCmdType
The abstract command implementation.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `IdAShellCmdAbstract(IdAClientSynchronousType inClient, com.io7m.quarrel.core.QCommandMetadata inMetadata, Class<C> inCommandClass, Class<R> inResponseClass)`
  Construct a command.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final org.jline.reader.Completer`
  `completer()`
  `final com.io7m.quarrel.core.QCommandMetadata`
  `metadata()`
  `protected abstract C`
  `onCreateCommand(com.io7m.quarrel.core.QCommandContextType context)`
  `final com.io7m.quarrel.core.QCommandStatus`
  `onExecute(com.io7m.quarrel.core.QCommandContextType context)`
  `protected abstract void`
  `onFormatResponse(com.io7m.quarrel.core.QCommandContextType context, R response)`
  `final String`
  `toString()`

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

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

  ### Methods inherited from interface com.io7m.quarrel.core.QCommandOrGroupType

  `isHidden`

  ### Methods inherited from interface com.io7m.quarrel.core.QCommandType

  `onListNamedParameters, onListPositionalParameters`

- ## Constructor Details

  - ### IdAShellCmdAbstract

    protected IdAShellCmdAbstract(IdAClientSynchronousType inClient, com.io7m.quarrel.core.QCommandMetadata inMetadata, Class<C> inCommandClass, Class<R> inResponseClass)
    Construct a command.
    Parameters:
      `inMetadata` - The metadata
      `inCommandClass` - The command class
      `inResponseClass` - The response class
      `inClient` - The client

- ## Method Details

  - ### onCreateCommand

    protected abstract C onCreateCommand(com.io7m.quarrel.core.QCommandContextType context) throws IdPasswordException, Exception
    Throws:
      `IdPasswordException`
      `Exception`

  - ### onFormatResponse

    protected abstract void onFormatResponse(com.io7m.quarrel.core.QCommandContextType context, R response) throws com.io7m.quarrel.core.QException
    Throws:
      `com.io7m.quarrel.core.QException`

  - ### onExecute

    public final com.io7m.quarrel.core.QCommandStatus onExecute(com.io7m.quarrel.core.QCommandContextType context) throws Exception
    Specified by:
      `onExecute` in interface `com.io7m.quarrel.core.QCommandType`
    Throws:
      `Exception`

  - ### completer

    public final org.jline.reader.Completer completer()
    Specified by:
      `completer` in interface `IdAShellCmdType`
    Returns:
      A shell command completer for the command

  - ### toString

    public final String toString()
    Overrides:
      `toString` in class `Object`

  - ### metadata

    public final com.io7m.quarrel.core.QCommandMetadata metadata()
    Specified by:
      `metadata` in interface `com.io7m.quarrel.core.QCommandOrGroupType`