All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.boot.autoconfigure.web.ControllerProperties Maven / Gradle / Ivy

package org.springframework.boot.autoconfigure.web;

import java.util.Map;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.http.HttpStatus;
import org.springframework.util.LinkedCaseInsensitiveMap;

@ConfigurationProperties(prefix = "spring.mvc.controller")
public class ControllerProperties {
  private boolean enabled;
  private Integer order;
  private Map redirectView = new LinkedCaseInsensitiveMap();
  private Map view = new LinkedCaseInsensitiveMap();
  private Map status = new LinkedCaseInsensitiveMap();

  public Integer getOrder() {
    return this.order;
  }

  public boolean isEnabled() {
    return enabled;
  }

  public void setEnabled(boolean enabled) {
    this.enabled = enabled;
  }

  public Map getRedirectView() {
    return redirectView;
  }

  public void setRedirectView(Map redirectView) {
    this.redirectView = redirectView;
  }

  public Map getView() {
    return view;
  }

  public void setView(Map view) {
    this.view = view;
  }

  public Map getStatus() {
    return status;
  }

  public void setStatus(Map status) {
    this.status = status;
  }

  public void setOrder(Integer order) {
    this.order = order;
  }

  public static class ViewProperties {
    private String viewName;
    private HttpStatus httpStatus;

    public String getViewName() {
      return viewName;
    }

    public void setViewName(String viewName) {
      this.viewName = viewName;
    }

    public HttpStatus getHttpStatus() {
      return httpStatus;
    }

    public void setHttpStatus(HttpStatus httpStatus) {
      this.httpStatus = httpStatus;
    }
  }

  public static class RedirectViewProperties {
    private String redirectUrl;
    private Boolean contextRelative;
    private Boolean keepQueryParams;
    private HttpStatus httpStatus;

    public String getRedirectUrl() {
      return redirectUrl;
    }

    public void setRedirectUrl(String redirectUrl) {
      this.redirectUrl = redirectUrl;
    }

    public Boolean getContextRelative() {
      return contextRelative;
    }

    public void setContextRelative(Boolean contextRelative) {
      this.contextRelative = contextRelative;
    }

    public Boolean getKeepQueryParams() {
      return keepQueryParams;
    }

    public void setKeepQueryParams(Boolean keepQueryParams) {
      this.keepQueryParams = keepQueryParams;
    }

    public HttpStatus getHttpStatus() {
      return httpStatus;
    }

    public void setHttpStatus(HttpStatus httpStatus) {
      this.httpStatus = httpStatus;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy