package org.academiadecodigo.enuminatti.helloworldspringmvc.utils;

/**
 * MIT License
 * (c) 2017 Ricardo Constantino
 */

public class Routes {
    public static final String ROOT = "/";

    public static final String LOGIN = "/login";
    public static final String LOGOUT = "/logout";

    public static final String BOOTCAMPS = "/bootcamp";
    public static final String USERS = "/user";

    public static final String ADD = "/add";
    public static final String LIST = "/list";
    public static final String EDIT = "/edit";
    public static final String DELETE = "/delete";

    public static String redirect(String... route) {
        StringBuilder sb = new StringBuilder("redirect:");
        for (String part : route) {
            sb.append(part);
        }
        return sb.toString();
    }
}
