iSeries Remote Systems
v6.0.1

com.ibm.etools.iseries.editor.preferences
Class ValidatorCobolIntegerInput

java.lang.Object
  extended bycom.ibm.etools.iseries.editor.preferences.ValidatorCobolIntegerInput
All Implemented Interfaces:
ICellEditorValidator, IInputValidator, com.ibm.etools.systems.core.ui.validators.ISystemValidator

public class ValidatorCobolIntegerInput
extends Object
implements com.ibm.etools.systems.core.ui.validators.ISystemValidator

For editable numeric properties. Ensures only digits are entered.


Field Summary
static String copyright
           
protected  com.ibm.etools.systems.core.messages.SystemMessage currentMessage
           
protected  com.ibm.etools.systems.core.messages.SystemMessage emptyMsg
           
protected  com.ibm.etools.systems.core.messages.SystemMessage invalidMsg
           
protected  int number
           
 
Fields inherited from interface com.ibm.etools.systems.core.ui.validators.ISystemValidator
Copyright
 
Constructor Summary
ValidatorCobolIntegerInput()
          Constructor to use when the default error messages are ok
ValidatorCobolIntegerInput(com.ibm.etools.systems.core.messages.SystemMessage emptyMsg)
          Constructor to use when wanting to specify the "value required" error message, but use the default for the "Value not valid" error message
ValidatorCobolIntegerInput(com.ibm.etools.systems.core.messages.SystemMessage emptyMsg, com.ibm.etools.systems.core.messages.SystemMessage invalidMsg)
          Constructor to use when wanting to specify both error messages
 
Method Summary
 int getMaximumNameLength()
          Return the max length for this name, or -1 if no max
 int getNumber()
          If validation is true, you can call this to get the input as a number
 com.ibm.etools.systems.core.messages.SystemMessage getSystemMessage()
          When isValid returns non-null, call this to get the SystemMessage object for the error versus the simple string message.
 String isValid(Object input)
           
 String isValid(String input)
           
 void setErrorMessages(com.ibm.etools.systems.core.messages.SystemMessage emptyMsg, com.ibm.etools.systems.core.messages.SystemMessage invalidMsg)
          Set the error messages, overriding the defaults
 com.ibm.etools.systems.core.messages.SystemMessage validate(String text)
          For convenience, this is a shortcut to calling:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

number

protected int number

emptyMsg

protected com.ibm.etools.systems.core.messages.SystemMessage emptyMsg

invalidMsg

protected com.ibm.etools.systems.core.messages.SystemMessage invalidMsg

currentMessage

protected com.ibm.etools.systems.core.messages.SystemMessage currentMessage
Constructor Detail

ValidatorCobolIntegerInput

public ValidatorCobolIntegerInput()
Constructor to use when the default error messages are ok


ValidatorCobolIntegerInput

public ValidatorCobolIntegerInput(com.ibm.etools.systems.core.messages.SystemMessage emptyMsg)
Constructor to use when wanting to specify the "value required" error message, but use the default for the "Value not valid" error message


ValidatorCobolIntegerInput

public ValidatorCobolIntegerInput(com.ibm.etools.systems.core.messages.SystemMessage emptyMsg,
                                  com.ibm.etools.systems.core.messages.SystemMessage invalidMsg)
Constructor to use when wanting to specify both error messages

Method Detail

setErrorMessages

public void setErrorMessages(com.ibm.etools.systems.core.messages.SystemMessage emptyMsg,
                             com.ibm.etools.systems.core.messages.SystemMessage invalidMsg)
Set the error messages, overriding the defaults


isValid

public String isValid(Object input)
Specified by:
isValid in interface ICellEditorValidator
See Also:
ICellEditorValidator.isValid(java.lang.Object)

isValid

public String isValid(String input)
Specified by:
isValid in interface IInputValidator
See Also:
IInputValidator.isValid(java.lang.String), getSystemMessage()

getSystemMessage

public com.ibm.etools.systems.core.messages.SystemMessage getSystemMessage()
When isValid returns non-null, call this to get the SystemMessage object for the error versus the simple string message.

Specified by:
getSystemMessage in interface com.ibm.etools.systems.core.ui.validators.ISystemValidator

getMaximumNameLength

public int getMaximumNameLength()
Return the max length for this name, or -1 if no max

Specified by:
getMaximumNameLength in interface com.ibm.etools.systems.core.ui.validators.ISystemValidator

validate

public com.ibm.etools.systems.core.messages.SystemMessage validate(String text)
For convenience, this is a shortcut to calling:

  if (isValid(text) != null)
    msg = getSystemMessage();
 

Specified by:
validate in interface com.ibm.etools.systems.core.ui.validators.ISystemValidator

getNumber

public int getNumber()
If validation is true, you can call this to get the input as a number


iSeries Remote Systems
v6.0.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.