package com.yunfeiyun.agmp.common.core.domain.model;

import com.yunfeiyun.agmp.common.constant.Constants;

/**
 * 服务器相关信息
 *
 */
public class PortalInfo
{
    private String ssoEnabled = "0";
    private String appName;
    private String ssoLoginUrl;
    private String ssoTokenUrl;
    private String ssoSessionUrl;
    private String ssoLogoutUrl;
    private String appLogoutUrl;
    private String syncEnabled;
    private String orgEnabled;

    public String getSsoLogoutUrl() {
        return ssoLogoutUrl;
    }

    public void setSsoLogoutUrl(String ssoLogoutUrl) {
        this.ssoLogoutUrl = ssoLogoutUrl;
    }

    public String getSsoSessionUrl() {
        return ssoSessionUrl;
    }

    public void setSsoSessionUrl(String ssoSessionUrl) {
        this.ssoSessionUrl = ssoSessionUrl;
    }

    public String getAppLogoutUrl() {
        return appLogoutUrl;
    }

    public void setAppLogoutUrl(String appLogoutUrl) {
        this.appLogoutUrl = appLogoutUrl;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public String getSsoEnabled() {
        return ssoEnabled;
    }

    public void setSsoEnabled(String ssoEnabled) {
        this.ssoEnabled = ssoEnabled;
    }

    public String getSsoLoginUrl() {
        return ssoLoginUrl;
    }

    public void setSsoLoginUrl(String ssoLoginUrl) {
        this.ssoLoginUrl = ssoLoginUrl;
    }

    public String getSsoTokenUrl() {
        return ssoTokenUrl;
    }

    public void setSsoTokenUrl(String ssoTokenUrl) {
        this.ssoTokenUrl = ssoTokenUrl;
    }

    public String getSyncEnabled() {
        return syncEnabled;
    }

    public void setSyncEnabled(String syncEnabled) {
        this.syncEnabled = syncEnabled;
    }

    public boolean isSync() {
        return "1".equalsIgnoreCase(getSyncEnabled());
    }

    public boolean isSsoSys() {
        return "1".equalsIgnoreCase(getSsoEnabled()) && !getAppName().toUpperCase().contains(Constants.PTS);
    }
    public boolean isSys() {
        return  !getAppName().toUpperCase().contains(Constants.PTS);
    }

    public boolean isPts() {
        return  getAppName().toUpperCase().contains(Constants.PTS);
    }

    public boolean isOrgEnabled() {
        return "1".equalsIgnoreCase(getOrgEnabled());
    }

    public String getOrgEnabled() {
        return orgEnabled;
    }

    public void setOrgEnabled(String orgEnabled) {
        this.orgEnabled = orgEnabled;
    }

}
