You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.4 KiB
73 lines
2.4 KiB
/* |
|
* Copyright (C), 2018-2021 |
|
* Project: starter |
|
* FileName: IhcaConfig |
|
* Author: xx |
|
* Date: 2021/3/30 9:38 |
|
*/ |
|
package com.fr.plugin.ihsf.config; |
|
|
|
import com.fanruan.api.util.StringKit; |
|
import com.fr.config.*; |
|
import com.fr.config.holder.Conf; |
|
import com.fr.config.holder.factory.Holders; |
|
|
|
/** |
|
* <Function Description><br> |
|
* <IhcaConfig> |
|
* |
|
* @author xx |
|
* @since 1.0.0 |
|
*/ |
|
@Visualization(category = "Plugin-ihsf_Group") |
|
public class IhsfConfig extends DefaultConfiguration { |
|
public static final String AUTH_URI = "http://xx/sso/oauth/token"; |
|
private static volatile IhsfConfig config = null; |
|
@Identifier(value = "uriBase", name = "Plugin-ihsf_Config_UriBase", description = "Plugin-ihsf_Config_UriBase_Description", status = Status.SHOW) |
|
private final Conf<String> uriBase = Holders.simple(AUTH_URI); |
|
@Identifier(value = "clientId", name = "Plugin-ihsf_Config_ClientId", description = "Plugin-ihsf_Config_ClientId_Description", status = Status.SHOW) |
|
private final Conf<String> clientId = Holders.simple(StringKit.EMPTY); |
|
@Identifier(value = "clientSecret", name = "Plugin-ihsf_Config_ClientSecret", description = "Plugin-ihsf_Config_ClientSecret_Description", status = Status.SHOW) |
|
private final Conf<String> clientSecret = Holders.simple(StringKit.EMPTY); |
|
@Identifier(value = "grantType", name = "Plugin-ihsf_Config_GrantType", description = "Plugin-ihsf_Config_GrantType_Description", status = Status.SHOW) |
|
private final Conf<String> grantType = Holders.simple("password"); |
|
|
|
public static IhsfConfig getInstance() { |
|
if (config == null) { |
|
config = ConfigContext.getConfigInstance(IhsfConfig.class); |
|
} |
|
return config; |
|
} |
|
|
|
public String getUriBase() { |
|
return uriBase.get(); |
|
} |
|
|
|
public void setUriBase(String uriBase) { |
|
this.uriBase.set(uriBase); |
|
} |
|
|
|
public String getClientId() { |
|
return clientId.get(); |
|
} |
|
|
|
public void setClientId(String clientId) { |
|
this.clientId.set(clientId); |
|
} |
|
|
|
public String getClientSecret() { |
|
return clientSecret.get(); |
|
} |
|
|
|
public void setClientSecret(String clientSecret) { |
|
this.clientSecret.set(clientSecret); |
|
} |
|
|
|
public String getGrantType() { |
|
return grantType.get(); |
|
} |
|
|
|
public void setGrantType(String grantType) { |
|
this.grantType.set(grantType); |
|
} |
|
} |