class ApplicationUrlHelper {

    public static Optional<String> getQuestionUrl(QuestionSetupType questionType, long questionId, long applicationId) {
        if (questionType != null) {
            switch (questionType) {
                case APPLICATION_DETAILS:
                    return Optional.of(format("/application/%d/form/question/%d/application-details", applicationId, questionId));
                case GRANT_AGREEMENT:
                    return Optional.of(format("/application/%d/form/question/%d/grant-agreement", applicationId, questionId));
                case GRANT_TRANSFER_DETAILS:
                    return Optional.of(format("/application/%d/form/question/%d/grant-transfer-details", applicationId, questionId));
                case APPLICATION_TEAM:
                    return Optional.of(format("/application/%d/form/question/%d/team", applicationId, questionId));
                case TERMS_AND_CONDITIONS:
                    return Optional.of(format("/application/%d/form/question/%d/terms-and-conditions", applicationId, questionId));
                case RESEARCH_CATEGORY:
                    return Optional.of(format("/application/%d/form/question/%d/research-category", applicationId, questionId));
            }
            if (questionType.hasFormInputResponses()) {
                return Optional.of(format("/application/%d/form/question/%d/generic", applicationId, questionId));
            }
        }
        return Optional.empty();
    }

}