public abstract class UserDataInteraction extends BaseInteraction implements InteractionConstants
LOC_IN_ERR_FAILED_TO_CREATE_INTER, LOC_IN_ERR_INTERACTION_RUN, LOC_IN_ERR_INVALID_USER_INPUT, LOC_IN_ERR_SILENT_INST_FAILED, LOC_IN_MESS_SUMMARY_DESC_FORMAT, LOC_IN_MSG_OPTION_BACK, LOC_IN_MSG_OPTION_CLR_DEF, LOC_IN_MSG_OPTION_EXIT, LOC_IN_MSG_OPTION_HELP, LOC_IN_WRN_INVALID_USER_INPUT, LOC_VA_WRN_VAL_INSTALL_LOG, LOC_VA_WRN_VAL_MESSAGE, STR_IN_COLON, STR_IN_DESCRIPTION_SUFFIX, STR_IN_EMPTY_STRING, STR_IN_ERROR_SUFFIX, STR_IN_HELP_SUFFIX, STR_IN_INSTALL_INTER_TYPE, STR_IN_MSG_OPTION_BACK, STR_IN_MSG_OPTION_CLR_DEF, STR_IN_MSG_OPTION_EXIT, STR_IN_MSG_OPTION_HELP, STR_IN_PROMPT_SUFFIX, STR_IN_SUMMARY_DESCRIPTION_SUFFIX, STR_IN_WARNING_SUFFIX
Constructor and Description |
---|
UserDataInteraction(InteractionInfo info)
Constructor for abstract clas
|
Modifier and Type | Method and Description |
---|---|
void |
clearValueInState(IStateAccess state)
Clear value from state for this interaction since user entered empty
input
|
protected InteractionResult |
confirmOnExitStatus(InteractionResult result,
IStateAccess state)
Method to check for exit condition @param result InteractionResult
object
|
DefaultValueFinderInfo |
getDefaultValueFinderInfo() |
LocalizedMessage |
getDescription() |
LocalizedMessage |
getError() |
LocalizedMessage |
getHelp() |
InteractionInfo |
getInteractionInfo() |
String |
getKey() |
LocalizedMessage |
getMessage(String suffix) |
protected String |
getNormalizedValue(String input) |
LocalizedMessage |
getPromptSuffix() |
LocalizedMessage |
getSummaryDesc() |
LocalizedMessage |
getSummaryDescription() |
LocalizedMessage |
getWarning() |
InteractionResult |
interact(IStateAccess state)
Method that interacts with user in interactive mode.
|
InteractionResult |
interactSilent(IStateAccess state,
Map map) |
boolean |
isFirst() |
boolean |
isPersistent() |
String |
preProcessSilentInput(Map userResponseMap)
Function to pre-process user input passed from state file during silent
install
|
String |
preProcessUserInput(String userInput,
IStateAccess state,
boolean isReq)
Helper function to pre-process user input
|
abstract InteractionResult |
processData(String userInput,
IStateAccess state)
An abstract method to be implemented by child class to process user data
for interactive input
|
String |
processDefaultValFromAllSources(IStateAccess state)
Calculate default value for the interaction.
|
String |
processDefaultValFromStateOnly(IStateAccess state)
Calculate default value for the interaction from state only.
|
abstract InteractionResult |
processOption(UserOptionItem option,
IStateAccess state)
abstract method to be implemented by child class to process user options
for interactive input
|
CumulativeValResult |
processValidators(String procInput,
IStateAccess state,
boolean isInter)
Validate user input
|
void |
setInteractionInfo(InteractionInfo info) |
void |
setIsFirstFlag(boolean flag) |
displayMessages, displayOptionsHelp, displayPromptMessage, getDisplayMessages, getPromptMessage, getPromptValue, getUserOptions
public UserDataInteraction(InteractionInfo info) throws InstallException
info
- InteractionInfoInstallException
public abstract InteractionResult processData(String userInput, IStateAccess state) throws InstallException
state
- IStateAccess stateInstallException
public abstract InteractionResult processOption(UserOptionItem option, IStateAccess state) throws InstallException
state
- IStateAccess stateInstallException
public InteractionResult interactSilent(IStateAccess state, Map map) throws InstallException
InstallException
public String preProcessSilentInput(Map userResponseMap) throws InstallException
userResponseMap
- MapInstallException
public InteractionResult interact(IStateAccess state) throws InstallException
state
- IStateAccessInstallException
protected InteractionResult confirmOnExitStatus(InteractionResult result, IStateAccess state) throws InstallException
state
- IStateAccessInstallException
public String preProcessUserInput(String userInput, IStateAccess state, boolean isReq) throws InstallException
userInput
- User Inputstate
- IStateAccess ObjectisReq
- Is required flag @return String Processed input result stringInstallException
public CumulativeValResult processValidators(String procInput, IStateAccess state, boolean isInter) throws InstallException
procInput
- processed user inputstate
- IStateAccess interfaceisInter
- is interactive modeInstallException
public String processDefaultValFromAllSources(IStateAccess state) throws InstallException
state
- IStateAccess interfaceInstallException
public String processDefaultValFromStateOnly(IStateAccess state) throws InstallException
state
- IStateAccess interfaceInstallException
public void clearValueInState(IStateAccess state) throws InstallException
state
- IStateAccess interface @return booleanInstallException
public LocalizedMessage getSummaryDescription()
public String getKey()
public DefaultValueFinderInfo getDefaultValueFinderInfo()
public LocalizedMessage getHelp()
public LocalizedMessage getPromptSuffix()
public LocalizedMessage getDescription()
public LocalizedMessage getSummaryDesc()
public LocalizedMessage getError()
public LocalizedMessage getWarning()
public LocalizedMessage getMessage(String suffix)
public boolean isFirst()
public boolean isPersistent()
public void setIsFirstFlag(boolean flag)
public InteractionInfo getInteractionInfo()
public void setInteractionInfo(InteractionInfo info) throws InstallException
InstallException
protected String getNormalizedValue(String input) throws InstallException
InstallException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.