@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
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 .
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
Modifier and Type | Method and 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
|
void execute(AdminCommandContext context)
context
- informationCopyright © 2020. All rights reserved.