Class ListAllowedValuesCommand

java.lang.Object
dev.metaschema.cli.processor.command.AbstractTerminalCommand
dev.metaschema.cli.commands.ListAllowedValuesCommand
All Implemented Interfaces:
dev.metaschema.cli.processor.command.ICommand

public class ListAllowedValuesCommand extends dev.metaschema.cli.processor.command.AbstractTerminalCommand
A CLI command that lists allowed-values constraints for a Metaschema module, organized by the target node they apply to.

The output is produced in YAML format, showing each target location and the allowed-values constraints that apply to it, including constraint identifiers, allowed values, and source information.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    executeCommand(dev.metaschema.cli.processor.CallingContext callingContext, org.apache.commons.cli.CommandLine cmdLine)
    Execute the list allowed values command.
    Collection<? extends org.apache.commons.cli.Option>
     
     
    List<dev.metaschema.cli.processor.command.ExtraArgument>
     
     
    dev.metaschema.cli.processor.command.ICommandExecutor
    newExecutor(dev.metaschema.cli.processor.CallingContext callingContext, org.apache.commons.cli.CommandLine cmdLine)
     

    Methods inherited from class dev.metaschema.cli.processor.command.AbstractTerminalCommand

    getCurrentWorkingDirectory, resolveAgainstCWD, resolveAgainstCWD, resolveAgainstCWD

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface dev.metaschema.cli.processor.command.ICommand

    getSubCommandByName, getSubCommands, isSubCommandRequired, validateExtraArguments, validateOptions
  • Constructor Details

  • Method Details

    • getName

      public String getName()
    • getDescription

    • gatherOptions

      public Collection<? extends org.apache.commons.cli.Option> gatherOptions()
    • getExtraArguments

      public List<dev.metaschema.cli.processor.command.ExtraArgument> getExtraArguments()
    • newExecutor

      public dev.metaschema.cli.processor.command.ICommandExecutor newExecutor(dev.metaschema.cli.processor.CallingContext callingContext, org.apache.commons.cli.CommandLine cmdLine)
    • executeCommand

      protected void executeCommand(@NonNull dev.metaschema.cli.processor.CallingContext callingContext, @NonNull org.apache.commons.cli.CommandLine cmdLine) throws dev.metaschema.cli.processor.command.CommandExecutionException
      Execute the list allowed values command.
      Parameters:
      callingContext - information about the calling context
      cmdLine - the parsed command line details
      Throws:
      dev.metaschema.cli.processor.command.CommandExecutionException - if an error occurred while executing the command