class InputValidator {

    public static void validateNameNotNull(String className,
                                           String actionDescription,
                                           String name,
                                           String nameParameter
                                          ) throws InvalidParameterException {
        if (name == null) {

            ExceptionMessageDefinition messageDefinition = SubjectAreaErrorCode.NULL_NAME.getMessageDefinition();

            messageDefinition.setMessageParameters(nameParameter, null);
            throw new InvalidParameterException(messageDefinition,
                                                className,
                                                actionDescription,
                                                nameParameter,
                                                null);
        }
    }

}