protected void validateName ( String name , String typeDescription ) { if ( ! APPLICATION_NAME_PATTERN . matcher ( name ) . matches ( ) ) { throw new DiscoveryException ( typeDescription + " [" + name + "] must start with a letter, end with a letter or digit and contain only letters, digits or hyphens. Example: foo-bar" ) ; } }
Validate the given application name .