Project: stp

com.ibm.rational.wvcm.stp.cc
Interface CcClearPromptCallback


public interface CcClearPromptCallback

Interface for handling ClearPrompt user interaction requests.

ClearCase trigger scripts may use ClearPrompt to interactively prompt the user for various kinds of input or responses. CM API applications that wish to handle these ClearPrompt requests must implement this interface and register the implementation object with the ClearCase provider via CcProvider.registerClearPromptCallback.

See the clearprompt manual page - cleartool man clearprompt - for more information.


Nested Class Summary
static class CcClearPromptCallback.AbortException
          Callback methods may throw this exception to indicate that the user wishes to abort the current ClearCase operation - the operation that caused the trigger to fire.
static class CcClearPromptCallback.MsgType
          ClearPrompt message type.
static class CcClearPromptCallback.ProceedOrAbort
          Possible responses for promptForProceed(String, ProceedOrAbort, List, MsgType) method.
static class CcClearPromptCallback.YesOrNo
          Possible responses for promptForYesOrNo(String, YesOrNo, List, MsgType) method.
 
Method Summary
 String promptForChoice(String promptMsg, List<String> choices)
          Ask the user to select a single item from a list of choices.
 List<String> promptForMultiChoice(String promptMsg, List<String> choices)
          Ask the user to select zero or more items from a list of choices.
 CcClearPromptCallback.ProceedOrAbort promptForProceed(String promptMsg, CcClearPromptCallback.ProceedOrAbort defaultChoice, List<CcClearPromptCallback.ProceedOrAbort> choices, CcClearPromptCallback.MsgType msgType)
          Ask the user whether to proceed with the current ClearCase operation or abort it.
 String promptForText(String promptMsg, String defaultResponse, boolean multiLineOk, boolean maskInput)
          Prompt the user for one or more lines of text.
 CcClearPromptCallback.YesOrNo promptForYesOrNo(String promptMsg, CcClearPromptCallback.YesOrNo defaultChoice, List<CcClearPromptCallback.YesOrNo> choices, CcClearPromptCallback.MsgType msgType)
          Ask the user for a "yes" or "no" response to a question.
 

Method Detail

promptForChoice

String promptForChoice(String promptMsg,
                       List<String> choices)
                       throws CcClearPromptCallback.AbortException
Ask the user to select a single item from a list of choices.

Parameters:
promptMsg - Prompt message to display
choices - Possible choices
Returns:
user's selection from list of possible choices
Throws:
CcClearPromptCallback.AbortException - to indicate the user wants to abort the current ClearCase operation

promptForMultiChoice

List<String> promptForMultiChoice(String promptMsg,
                                  List<String> choices)
                                  throws CcClearPromptCallback.AbortException
Ask the user to select zero or more items from a list of choices.

Parameters:
promptMsg - Prompt message to display
choices - Possible choices
Returns:
user's selection(s) from list of possible choices
Throws:
CcClearPromptCallback.AbortException - to indicate the user wants to abort the current ClearCase operation

promptForProceed

CcClearPromptCallback.ProceedOrAbort promptForProceed(String promptMsg,
                                                      CcClearPromptCallback.ProceedOrAbort defaultChoice,
                                                      List<CcClearPromptCallback.ProceedOrAbort> choices,
                                                      CcClearPromptCallback.MsgType msgType)
Ask the user whether to proceed with the current ClearCase operation or abort it.

Parameters:
promptMsg - Prompt message to display
defaultChoice - Default response to display
choices - Optional subset of responses to display
msgType - message type: OK, WARNING, ERROR, BOX
Returns:
user's response: PROCEED or ABORT

promptForText

String promptForText(String promptMsg,
                     String defaultResponse,
                     boolean multiLineOk,
                     boolean maskInput)
                     throws CcClearPromptCallback.AbortException
Prompt the user for one or more lines of text.

Parameters:
promptMsg - Prompt message to display
defaultResponse - Default response to display
multiLineOk - Allow user to enter multiple lines
maskInput - Mask user input for password entry
Returns:
user's response string
Throws:
CcClearPromptCallback.AbortException - to indicate the user wants to abort the current ClearCase operation

promptForYesOrNo

CcClearPromptCallback.YesOrNo promptForYesOrNo(String promptMsg,
                                               CcClearPromptCallback.YesOrNo defaultChoice,
                                               List<CcClearPromptCallback.YesOrNo> choices,
                                               CcClearPromptCallback.MsgType msgType)
Ask the user for a "yes" or "no" response to a question.

Parameters:
promptMsg - Prompt message to display
defaultChoice - Default response to display
choices - Optional subset of responses to display
msgType - message type: OK, WARNING, ERROR, BOX
Returns:
user's response: YES, NO, or ABORT

Generated Fri 13-Jun-2014 11:11 PM

Copyright © IBM 2014. All rights reserved.