package ink.wgink.properties.oauth2.client;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: ClientServerProperties
 * @Description: OAuth2客户端服务配置
 * @Author: WangGeng
 * @Date: 2019/9/3 10:14 上午
 * @Version: 1.0
 **/
@Component
@ConfigurationProperties(prefix = "server")
public class OAuth2ClientServerProperties {

    /**
     * 服务端口
     */
    private Integer port;
    /**
     * 访问地址
     */
    private String url;
    /**
     * 系统主标题
     */
    private String systemTitle;
    /**
     * 导航页面
     */
    private String navPage;
    /**
     * 默认 index 页面
     */
    private String defaultIndexPage;
    /**
     * 默认 home 页面
     */
    private String defaultHomePage;

    public Integer getPort() {
        return port == null ? 0 : port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getUrl() {
        return url == null ? "" : url.trim();
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getNavPage() {
        return navPage == null ? "" : navPage.trim();
    }

    public void setNavPage(String navPage) {
        this.navPage = navPage;
    }

    public String getSystemTitle() {
        return systemTitle == null ? "" : systemTitle.trim();
    }

    public void setSystemTitle(String systemTitle) {
        this.systemTitle = systemTitle;
    }

    public String getDefaultIndexPage() {
        return defaultIndexPage == null ? "" : defaultIndexPage.trim();
    }

    public void setDefaultIndexPage(String defaultIndexPage) {
        this.defaultIndexPage = defaultIndexPage;
    }

    public String getDefaultHomePage() {
        return defaultHomePage == null ? "" : defaultHomePage.trim();
    }

    public void setDefaultHomePage(String defaultHomePage) {
        this.defaultHomePage = defaultHomePage;
    }
}
