Class XSAbstractCommand

java.lang.Object
com.io7m.xstructural.cmdline.internal.XSAbstractCommand
All Implemented Interfaces:
com.io7m.quarrel.core.QCommandOrGroupType, com.io7m.quarrel.core.QCommandType
Direct Known Subclasses:
XSCommandFormatXML, XSCommandSchema, XSCommandTransformEPUB, XSCommandTransformMarkdown, XSCommandTransformXHTML, XSCommandValidate, XSCommandValidateXHTML

public abstract class XSAbstractCommand extends Object implements com.io7m.quarrel.core.QCommandType
A base class for command implementations, adding the standard verbose parameter and configuring the log level prior to execution.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    XSAbstractCommand(com.io7m.quarrel.core.QCommandMetadata inMetadata)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract com.io7m.quarrel.core.QCommandStatus
    execute(com.io7m.quarrel.core.QCommandContextType context)
    Execute the command.
    final com.io7m.quarrel.core.QCommandMetadata
     
    final com.io7m.quarrel.core.QCommandStatus
    onExecute(com.io7m.quarrel.core.QCommandContextType context)
     
    final List<com.io7m.quarrel.core.QParameterNamedType<?>>
     
    protected abstract List<com.io7m.quarrel.core.QParameterNamedType<?>>
     

    Methods inherited from class Object

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

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

    isHidden

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

    onListPositionalParameters
  • Constructor Details

    • XSAbstractCommand

      protected XSAbstractCommand(com.io7m.quarrel.core.QCommandMetadata inMetadata)
  • Method Details

    • onListNamedParametersActual

      protected abstract List<com.io7m.quarrel.core.QParameterNamedType<?>> onListNamedParametersActual()
      Returns:
      The named parameters specific to this command, not including the standard verbose parameter
    • onListNamedParameters

      public final List<com.io7m.quarrel.core.QParameterNamedType<?>> onListNamedParameters()
      Specified by:
      onListNamedParameters in interface com.io7m.quarrel.core.QCommandType
    • metadata

      public final com.io7m.quarrel.core.QCommandMetadata metadata()
      Specified by:
      metadata in interface com.io7m.quarrel.core.QCommandOrGroupType
    • 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
    • execute

      protected abstract com.io7m.quarrel.core.QCommandStatus execute(com.io7m.quarrel.core.QCommandContextType context) throws Exception
      Execute the command.
      Parameters:
      context - The context
      Returns:
      The command status
      Throws:
      Exception