com.bowstreet.methods
Interface IInputFieldFormatter

All Known Implementing Classes:
BaseInputFieldFormatter, StandardFormatter

public interface IInputFieldFormatter


Method Summary
 java.lang.String format(java.lang.String value, java.lang.String format)
          Format a value for a html display item.
 java.lang.String getErrorMessage()
          Get the message for the failed validation/translation.
 java.util.List getFormatExpressionList()
          Get a list of available format expressions.
 java.util.List getTranslateExpressionList()
          Get a list of available translate expressions.
 boolean getTranslateSuccessFlag()
          Get the translate result flag.
 java.util.List getValidateExpressionList()
          Get a list of available validate expressions.
 WebAppAccess getWebAppAccess()
          Get the webAppAccess object.
 void setErrorMessage(java.lang.String message)
          Set a message that will be stored in an error variable when a validation/translation fails.
 void setTranslateSuccessFlag(boolean translateFlag)
          Set the translation result flag.
 void setWebAppAccess(WebAppAccess webAppAccess)
          Set WebAppAccess object.
 java.lang.String translate(java.lang.String value, java.lang.String format)
          Translate a value from an html display.
 boolean validate(java.lang.String value, java.lang.String expression)
          Validate a value from a html input.
 

Method Detail

format

java.lang.String format(java.lang.String value,
                        java.lang.String format)
Format a value for a html display item.

Parameters:
value - The value that will be formatted.
format - The format expression that can be used for formatting.
Returns:
The formatted string value.

getErrorMessage

java.lang.String getErrorMessage()
Get the message for the failed validation/translation.

Returns:
The message for the failed validation/translation.

getFormatExpressionList

java.util.List getFormatExpressionList()
Get a list of available format expressions. sub class needs to implement this method to return its own availabe ones.

Returns:
The list of available format expressions.

getTranslateExpressionList

java.util.List getTranslateExpressionList()
Get a list of available translate expressions. sub class needs to implement this method to return its own availabe ones.

Returns:
The list of available translate expressions.

getTranslateSuccessFlag

boolean getTranslateSuccessFlag()
Get the translate result flag.

Returns:
The translate result flag.

getValidateExpressionList

java.util.List getValidateExpressionList()
Get a list of available validate expressions. sub class needs to implement this method to return its own availabe ones.

Returns:
The list of available validate expressions.

getWebAppAccess

WebAppAccess getWebAppAccess()
Get the webAppAccess object. Users can use this method to access the runtime model information.

Returns:
The webAppAccess object.

setErrorMessage

void setErrorMessage(java.lang.String message)
Set a message that will be stored in an error variable when a validation/translation fails.

Parameters:
message - The message for the failed validation/translation.

setTranslateSuccessFlag

void setTranslateSuccessFlag(boolean translateFlag)
Set the translation result flag.

Parameters:
translateFlag - The translate result flag.

setWebAppAccess

void setWebAppAccess(WebAppAccess webAppAccess)
Set WebAppAccess object. This method is used by the system.

Parameters:
webAppAccess - The WebAppAccess object.

translate

java.lang.String translate(java.lang.String value,
                           java.lang.String format)
Translate a value from an html display. If the translation cannot be completed according to the desired format, then the method may, at it's discretion, throw the FieldFormatterTranslationError runtime exception to signal that the provided value could not be translated correctly.

Parameters:
value - The value that will be translated.
format - The format expression that can be used for translation.
Returns:
The translated string value.
See Also:
FieldFormatterTranslationError

validate

boolean validate(java.lang.String value,
                 java.lang.String expression)
Validate a value from a html input.

Parameters:
value - The value that will be validated.
Returns:
The boolean value of the validation result.


Copyright © 2009 IBM. All Rights Reserved.