public final class SystemConfigurationUtil extends Object implements ConfigurationListener
SystemConfigurationUtil
class provides methods to get
attributes defined in "systemConfig" configuration. It also has a method
getProperty to get properties in "FederationConfig.properties".Modifier and Type | Field and Description |
---|---|
static String |
PROP_SERVER_MODE |
Modifier and Type | Method and Description |
---|---|
void |
configChanged(ConfigurationActionEvent event)
This method will be invoked when a component's
configuration data has been changed.
|
static String |
getAuthenticationURL()
Returns authentication URL.
|
static Set<String> |
getCookieDomainsForRequest(javax.servlet.http.HttpServletRequest request)
Returns list of cookie domains.
|
static String |
getProperty(String propertyName)
Returns property value corresponding to the property name.
|
static String |
getProperty(String propertyName,
String defaultValue)
Returns property value corresponding to the property name.
|
static String |
getServerFromID(String id)
Returns the server instance corresponding to the server id.
|
static String |
getServerID(String protocol,
String hostname,
int port,
String uri)
Returns the server id corresponding to a server instance.
|
static List |
getServerList()
Returns all the instances in the server cluster this instance belongs to.
|
static Collection |
getServiceAllURLs(String serviceName)
Returns all service urls.
|
static URL |
getServiceURL(String serviceName,
String protocol,
String hostname,
int port,
String uri)
Returns the URL of the specified service on the specified host.
|
static List |
getSiteList()
Returns all the sites instance.
|
static void |
initializeProperties(Properties properties)
Initializes the properties map.
|
static void |
initializeProperties(String propertyName,
String propertyValue)
Initializes the properties map.
|
static boolean |
isServerMode()
Returns
true if this is running on server mode. |
static boolean |
isSiteId(String siteID)
Check whether the given id is a siteId.
|
static boolean |
isValidServerId(String serverID)
Checks whether the given serverID is a really existing serverid in the
current configuration.
|
public static final String PROP_SERVER_MODE
public static String getAuthenticationURL() throws SystemConfigurationException
SystemConfigurationException
public static Set<String> getCookieDomainsForRequest(javax.servlet.http.HttpServletRequest request)
public static List getServerList() throws SystemConfigurationException
SystemConfigurationException
- if unable to get the server list.public static Collection getServiceAllURLs(String serviceName) throws SystemConfigurationException
SystemConfigurationException
- if unable to get the server list.public static List getSiteList() throws SystemConfigurationException
SystemConfigurationException
- if unable to get the server list.public static boolean isServerMode()
true
if this is running on server mode.true
if this is running on server mode.public static URL getServiceURL(String serviceName, String protocol, String hostname, int port, String uri) throws SystemConfigurationException
serviceName
- The name of the service.protocol
- The service protocol.hostname
- The service host name.port
- The service listening port.uri
- The service URI.SystemConfigurationException
- if the URL could not be found.public static String getServerID(String protocol, String hostname, int port, String uri) throws SystemConfigurationException
protocol
- The service protocol of the server instance.hostname
- The service host name of the server instance.port
- The service listening port of the server instance.uri
- The service URI of the server instance.SystemConfigurationException
- if the server id corresponding to
the server instance could not be found.public static String getServerFromID(String id) throws SystemConfigurationException
id
- server idSystemConfigurationException
- if the server name corresponding
to the server id does not exist.public static boolean isSiteId(String siteID)
siteID
- The site id to check.public static void initializeProperties(Properties properties)
properties
- Map of new properties.public static void initializeProperties(String propertyName, String propertyValue)
propertyName
- Name of properties.propertyValue
- Value of properties.public static String getProperty(String propertyName)
propertyName
- name of the property whose value to be returned.public static String getProperty(String propertyName, String defaultValue)
propertyName
- name of the property whose value to be returned.defaultValue
- the default value.public void configChanged(ConfigurationActionEvent event)
configChanged
in interface ConfigurationListener
event
- Configuration action event, like ADDED, DELETED, MODIFIED
etc.public static boolean isValidServerId(String serverID)
serverID
- true if the given serverID is a valid serverID.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.