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 typeR- 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,IdAShellCmdAdminUpdatePasswordExpiration,IdAShellCmdAuditSearchBegin,IdAShellCmdAuditSearchNext,IdAShellCmdAuditSearchPrevious,IdAShellCmdMailTest,IdAShellCmdSelf,IdAShellCmdUserBanCreate,IdAShellCmdUserBanDelete,IdAShellCmdUserBanGet,IdAShellCmdUserCreate,IdAShellCmdUserEmailAdd,IdAShellCmdUserEmailRemove,IdAShellCmdUserGet,IdAShellCmdUserGetByEmail,IdAShellCmdUserLoginHistory,IdAShellCmdUserSearchBegin,IdAShellCmdUserSearchByEmailBegin,IdAShellCmdUserSearchByEmailNext,IdAShellCmdUserSearchByEmailPrevious,IdAShellCmdUserSearchNext,IdAShellCmdUserSearchPrevious,IdAShellCmdUserUpdatePasswordExpiration
public abstract class IdAShellCmdAbstract<C extends IdACommandType<R>,R extends IdAResponseType>
extends Object
implements IdAShellCmdType
The abstract command implementation.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIdAShellCmdAbstract(IdAClientSynchronousType inClient, com.io7m.quarrel.core.QCommandMetadata inMetadata, Class<C> inCommandClass, Class<R> inResponseClass) Construct a command. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.jline.reader.Completerfinal com.io7m.quarrel.core.QCommandMetadatametadata()protected abstract ConCreateCommand(com.io7m.quarrel.core.QCommandContextType context) final com.io7m.quarrel.core.QCommandStatusonExecute(com.io7m.quarrel.core.QCommandContextType context) protected abstract voidonFormatResponse(com.io7m.quarrel.core.QCommandContextType context, R response) final StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.quarrel.core.QCommandOrGroupType
isHiddenMethods 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 metadatainCommandClass- The command classinResponseClass- The response classinClient- The client
-
-
Method Details
-
onCreateCommand
protected abstract C onCreateCommand(com.io7m.quarrel.core.QCommandContextType context) throws IdPasswordException, Exception - Throws:
IdPasswordExceptionException
-
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:
onExecutein interfacecom.io7m.quarrel.core.QCommandType- Throws:
Exception
-
completer
public final org.jline.reader.Completer completer()- Specified by:
completerin interfaceIdAShellCmdType- Returns:
- A shell command completer for the command
-
toString
-
metadata
public final com.io7m.quarrel.core.QCommandMetadata metadata()- Specified by:
metadatain interfacecom.io7m.quarrel.core.QCommandOrGroupType
-