public class CliUserInteraction extends com.forgerock.opendj.cli.ConsoleApplication implements UserInteraction
com.forgerock.opendj.cli.ConsoleApplication.Style
UserInteraction.MessageType
Constructor and Description |
---|
CliUserInteraction(UserData ud)
Creates an instance that will use standard streams for interaction and with
the provided CLI arguments.
|
Modifier and Type | Method and Description |
---|---|
Object |
confirm(LocalizableMessage summary,
LocalizableMessage details,
LocalizableMessage fineDetails,
LocalizableMessage title,
UserInteraction.MessageType type,
LocalizableMessage[] options,
LocalizableMessage def,
LocalizableMessage viewDetailsOption)
Present a list of choices to the user and wait for them to select one
of them.
|
Object |
confirm(LocalizableMessage summary,
LocalizableMessage details,
LocalizableMessage title,
UserInteraction.MessageType type,
LocalizableMessage[] options,
LocalizableMessage def)
Present a list of choices to the user and wait for them to select one
of them.
|
String |
createUnorderedList(List<?> list)
Creates a list appropriate for the presentation implementation.
|
boolean |
isAdvancedMode() |
boolean |
isCLI()
Tells whether the interaction is command-line based.
|
boolean |
isForceOnError()
Indicates whether or not the CLI based user has requested to continue when
a non critical error occurs.
|
boolean |
isInteractive()
Indicates whether or not the CLI user has requested interactive behavior.
|
boolean |
isMenuDrivenMode() |
boolean |
isQuiet() |
boolean |
isScriptFriendly() |
boolean |
isVerbose() |
askConfirmation, askPort, confirmAction, errPrint, errPrintln, errPrintln, errPrintln, errPrintVerboseMessage, getErrorStream, getErrStream, getInputStream, getOutputStream, pressReturnToContinue, print, println, println, println, println, printProgressBar, printVerboseMessage, readInput, readInput, readLineOfInput, readPassword, readPassword, readPort, readValidatedInput, readValidatedInput
public CliUserInteraction(UserData ud)
ud
- The CLI arguments.public Object confirm(LocalizableMessage summary, LocalizableMessage details, LocalizableMessage title, UserInteraction.MessageType type, LocalizableMessage[] options, LocalizableMessage def)
confirm
in interface UserInteraction
summary
- text to present to the user. This is usually just a
string bug For GUI applications can be a component that will appear
inside a dialogdetails
- more details of the messagetitle
- of the prompt if anytype
- of messageoptions
- set of options to give the userdef
- the default option from options
options
parameter.public Object confirm(LocalizableMessage summary, LocalizableMessage details, LocalizableMessage fineDetails, LocalizableMessage title, UserInteraction.MessageType type, LocalizableMessage[] options, LocalizableMessage def, LocalizableMessage viewDetailsOption)
confirm
in interface UserInteraction
summary
- text to present to the user. This is usually just a
string bug For GUI applications can be a component that will appear
inside a dialogdetails
- more details of the messagefineDetails
- even finer details. This text may be rendered in
such a way that the user needs to take some sort of action to
see this texttitle
- of the prompt if anytype
- of messageoptions
- set of options to give the userdef
- the default option from options
viewDetailsOption
- name of the option to be used for showing the
details. If null a default will be used.options
parameter.public String createUnorderedList(List<?> list)
createUnorderedList
in interface UserInteraction
list
- to formatpublic boolean isAdvancedMode()
isAdvancedMode
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isInteractive()
isInteractive
in interface UserInteraction
isInteractive
in class com.forgerock.opendj.cli.ConsoleApplication
true
if the CLI user has requested interactive
behavior.public boolean isMenuDrivenMode()
isMenuDrivenMode
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isQuiet()
isQuiet
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isScriptFriendly()
isScriptFriendly
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isVerbose()
isVerbose
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isCLI()
isCLI
in interface UserInteraction
true
if the user interaction is command-line based and
false
otherwise.public boolean isForceOnError()
isForceOnError
in interface UserInteraction
Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.