Class CommandRegistration.BaseBuilder
java.lang.Object
org.springframework.shell.command.CommandRegistration.BaseBuilder
- All Implemented Interfaces:
- CommandRegistration.Builder
- Direct Known Subclasses:
- CommandRegistration.DefaultBuilder
- Enclosing interface:
- CommandRegistration
public abstract static class CommandRegistration.BaseBuilder
extends Object
implements CommandRegistration.Builder
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionavailability(Supplier<Availability> availability) Define anAvailabilitysuppliear for a command.build()Builds aCommandRegistration.Define commands this registration uses.defaultOptionNameModifier(Function<String, String> modifier) Provides a global option name modifier.description(String description) Define a description text for a command.Define a group for a command.hidden()Define a command to be hidden.hidden(boolean hidden) Define a command to be hidden by a given flag.DefineInteractionModefor a command.Define an alias what this command should executeDefine an error handling what this command should useDefine an exit code what this command should executeDefine help options what this command should use.Define an option what this command should user for.Define a target what this command should execute
- 
Constructor Details- 
BaseBuilderpublic BaseBuilder()
 
- 
- 
Method Details- 
commandDescription copied from interface:CommandRegistration.BuilderDefine commands this registration uses. Essentially defines a full set of main and sub commands. It doesn't matter if full command is defined in one string or multiple strings as "words" are splitted and trimmed with whitespaces. You will get result ofcommand subcommand1 subcommand2, ....- Specified by:
- commandin interface- CommandRegistration.Builder
- Parameters:
- commands- the commands
- Returns:
- builder for chaining
 
- 
interactionModeDescription copied from interface:CommandRegistration.BuilderDefineInteractionModefor a command.- Specified by:
- interactionModein interface- CommandRegistration.Builder
- Parameters:
- mode- the interaction mode
- Returns:
- builder for chaining
 
- 
descriptionDescription copied from interface:CommandRegistration.BuilderDefine a description text for a command.- Specified by:
- descriptionin interface- CommandRegistration.Builder
- Parameters:
- description- the description text
- Returns:
- builder for chaining
 
- 
groupDescription copied from interface:CommandRegistration.BuilderDefine a group for a command.- Specified by:
- groupin interface- CommandRegistration.Builder
- Parameters:
- group- the group
- Returns:
- builder for chaining
 
- 
availabilityDescription copied from interface:CommandRegistration.BuilderDefine anAvailabilitysuppliear for a command.- Specified by:
- availabilityin interface- CommandRegistration.Builder
- Parameters:
- availability- the availability
- Returns:
- builder for chaining
 
- 
defaultOptionNameModifierDescription copied from interface:CommandRegistration.BuilderProvides a global option name modifier. Will be used with all options to modify long names. Usual use case is to enforce naming convention i.e. to havesnake-casefor all names.- Specified by:
- defaultOptionNameModifierin interface- CommandRegistration.Builder
- Parameters:
- modifier- to modifier to change option name
- Returns:
- builder for chaining
 
- 
withOptionDescription copied from interface:CommandRegistration.BuilderDefine an option what this command should user for. Can be used multiple times.- Specified by:
- withOptionin interface- CommandRegistration.Builder
- Returns:
- option spec for chaining
 
- 
withTargetDescription copied from interface:CommandRegistration.BuilderDefine a target what this command should execute- Specified by:
- withTargetin interface- CommandRegistration.Builder
- Returns:
- target spec for chaining
 
- 
withAliasDescription copied from interface:CommandRegistration.BuilderDefine an alias what this command should execute- Specified by:
- withAliasin interface- CommandRegistration.Builder
- Returns:
- alias spec for chaining
 
- 
withExitCodeDescription copied from interface:CommandRegistration.BuilderDefine an exit code what this command should execute- Specified by:
- withExitCodein interface- CommandRegistration.Builder
- Returns:
- exit code spec for chaining
 
- 
withErrorHandlingDescription copied from interface:CommandRegistration.BuilderDefine an error handling what this command should use- Specified by:
- withErrorHandlingin interface- CommandRegistration.Builder
- Returns:
- error handling spec for chaining
 
- 
withHelpOptionsDescription copied from interface:CommandRegistration.BuilderDefine help options what this command should use.- Specified by:
- withHelpOptionsin interface- CommandRegistration.Builder
- Returns:
- help options spec for chaining
 
- 
buildDescription copied from interface:CommandRegistration.BuilderBuilds aCommandRegistration.- Specified by:
- buildin interface- CommandRegistration.Builder
- Returns:
- a command registration
 
 
-