public static void validateTableName ( String tableName ) { if ( Utility . isNullOrEmptyOrWhitespace ( tableName ) ) { throw new IllegalArgumentException ( String . format ( Utility . LOCALE_US , SR . RESOURCE_NAME_EMPTY , SR . TABLE ) ) ; } if ( tableName . length ( ) < NameValidator . CONTAINER_SHARE_QUEUE_TABLE_MIN_LENGTH || tableName . length ( ) > NameValidator . CONTAINER_SHARE_QUEUE_TABLE_MAX_LENGTH ) { throw new IllegalArgumentException ( String . format ( Utility . LOCALE_US , SR . INVALID_RESOURCE_NAME_LENGTH , SR . TABLE , NameValidator . CONTAINER_SHARE_QUEUE_TABLE_MIN_LENGTH , NameValidator . CONTAINER_SHARE_QUEUE_TABLE_MAX_LENGTH ) ) ; } if ( ! ( NameValidator . TABLE_REGEX . matcher ( tableName ) . matches ( ) || NameValidator . METRICS_TABLE_REGEX . matcher ( tableName ) . matches ( ) || tableName . equalsIgnoreCase ( "$MetricsCapacityBlob" ) ) ) { throw new IllegalArgumentException ( String . format ( Utility . LOCALE_US , SR . INVALID_RESOURCE_NAME , SR . TABLE ) ) ; } }
Checks if a table name is valid .