Object name validator component

* Moved the component from the -user package to the -naming package

* Added a separate interface to the component
This commit is contained in:
Emmanuel BENOîT 2012-02-04 15:26:53 +01:00
parent 35d8891fe3
commit b4903d78e4
14 changed files with 483 additions and 104 deletions
legacyworlds-session/src/main/java/com/deepclone/lw/cmd

View file

@ -1,11 +1,27 @@
package com.deepclone.lw.cmd;
/**
* The results of a name validation operation
*
* @author <a href="mailto:tseeker@legacyworlds.com">E. Benoît</a>
*
*/
public enum ObjectNameError {
/** The name is empty */
EMPTY ,
/** The name is used by another object (e.g. duplicate empire name) */
UNAVAILABLE ,
/** The name has been banned from being used again */
BANNED ,
/**
* The name is invalid (too short, too long, sequences of white space, invalid characters, does
* not start with a letter)
*/
INVALID
}