Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.ui.validators
Class ValidatorConnectionName


java.lang.Object
  extended by 

org.eclipse.rse.ui.validators.ValidatorUniqueString
      extended by 
org.eclipse.rse.ui.validators.ValidatorConnectionName
All Implemented Interfaces:
IInputValidator, ICellEditorValidator, ISystemValidator, ISystemValidatorUniqueString

public class ValidatorConnectionName
extends ValidatorUniqueString
implements ISystemValidator

This class is used in dialogs that prompt for a connection alias name. Relies on Eclipse supplied method to test for folder name validity.

The IInputValidator interface is used by jface's InputDialog class and numerous other platform and system classes.


Field Summary
static int MAX_CONNECTIONNAME_LENGTH
           
 
Fields inherited from class org.eclipse.rse.ui.validators. ValidatorUniqueString
CASE_INSENSITIVE, CASE_SENSITIVE, caseSensitive, currentMessage, existingList, msg_Empty, msg_NonUnique, QUOTE, syntaxValidator, useUpperCase
 
Constructor Summary
ValidatorConnectionName ( Collection existingNameList)
          Constructor.
 
Method Summary
 int getMaximumNameLength ()
          Return the max length for connections: 100
static boolean validateNameNotInUse ( String proposedName, Shell shell)
          Validate the given connection name is not already used in any profile.
 
Methods inherited from class org.eclipse.rse.ui.validators. ValidatorUniqueString
doMessageSubstitution, getExistingNamesList, getSystemMessage, getSystemMessageText, isSyntaxOk, isValid, isValid, quotedToLowerCase, setCaseSensitive, setErrorMessages, setExistingNamesList, setExistingNamesList, setUseUpperCase, toString, validate
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.ui.validators. ISystemValidator
getSystemMessage, validate
 
Methods inherited from interface org.eclipse.jface.dialogs. IInputValidator
isValid
 
Methods inherited from interface org.eclipse.jface.viewers. ICellEditorValidator
isValid
 

Field Detail

MAX_CONNECTIONNAME_LENGTH

public static final int MAX_CONNECTIONNAME_LENGTH
See Also:
Constant Field Values
Constructor Detail

ValidatorConnectionName

public ValidatorConnectionName(
Collection existingNameList)
Constructor.

Parameters:
existingNameList - list of existing names (strings) in owning profile. Can be null if not a rename operation.
Method Detail

validateNameNotInUse

public static boolean validateNameNotInUse(
String proposedName,
                                           
Shell shell)
Validate the given connection name is not already used in any profile. This is too expensive to do per keystroke, so you should call this after as a final test. Note, this is a warning situation, not an error, as we assume we have already tested for the containing profile, and thus is a test for a match on a connection in a non-containing profile. This results in msg rseg1241 being presented to the user, and if he chooses No to not continue, we return false here. You should stop processing on false. Else, we return true meaning everything is ok.


getMaximumNameLength

public int getMaximumNameLength()
Return the max length for connections: 100

Specified by:
getMaximumNameLength in interface ISystemValidator
Overrides:
getMaximumNameLength in class ValidatorUniqueString

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire