Interface AdminCommand

  • All Known Implementing Classes:
    WrappedAdminCommand

    @Contract
    public interface AdminCommand

    This is an admin command interface, command implementations have to be stateless and should also have a org.jvnet.hk2.component.Scope value of PerLookup

    Command implementations should use the Param annotation to annotate the command parameters. Command implementations are normal services and are therefore following the normal hk2 service lifecycle and injection features.

    Internationalization can be provided by using the I18n} annotation. Each parameter declaration can also be annotated with an I18n annotation to point to the parameter .

    By default, if an I18n is used to annotate implementations, the value of the annotation will be used as follow to lookup strings in the module's local strings properties files. key provide a short description of the command role and expected output key.usagetext [optional] if not provided, usage text will be calculated based on parameters declaration key.paramName [optional] provide a description for the parameter "paramName", it can be overriden by annotating the @Param annotated field/method with a I18n
    Author:
    Jerome Dochez
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void execute​(AdminCommandContext context)
      Executes the command with the command parameters passed as Properties where the keys are the parameter names and the values are the parameter values
    • Method Detail

      • execute

        void execute​(AdminCommandContext context)
        Executes the command with the command parameters passed as Properties where the keys are the parameter names and the values are the parameter values
        Parameters:
        context - information