Package com.sun.identity.configuration
Class FedLibSystemProperties
- java.lang.Object
-
- com.sun.identity.configuration.FedLibSystemProperties
-
- All Implemented Interfaces:
ISystemProperties
- Direct Known Subclasses:
FedSystemProperties
public class FedLibSystemProperties extends Object implements ISystemProperties
This is the adapter class for Federation Library to the shared library. Mainly to provide system configuration information.
-
-
Field Summary
Fields Modifier and Type Field Description protected static PropertiessystemConfigProps
-
Constructor Summary
Constructors Constructor Description FedLibSystemProperties()Creates a new instance ofFedLibSystemProperties
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringget(String key)Returns system properties.StringgetOrDefault(String key, String defaultValue)Returns system property or the default value if not set.CollectiongetServerList()Returns server list.CollectiongetServiceAllURLs(String serviceName)Returns service all url list.URLgetServiceURL(String serviceName, String protocol, String hostname, int port, String uri)Returns the URL of the specified service on the specified host.voidinitializeProperties(String propertyName, String propertyValue)Initializes the properties map.voidinitializeProperties(Properties properties)Initializes the properties to be used by Open Federation Library.
-
-
-
Field Detail
-
systemConfigProps
protected static Properties systemConfigProps
-
-
Method Detail
-
get
public String get(String key)
Returns system properties.- Specified by:
getin interfaceISystemProperties- Parameters:
key- Key to the properties.
-
getOrDefault
public String getOrDefault(String key, String defaultValue)
Description copied from interface:ISystemPropertiesReturns system property or the default value if not set.- Specified by:
getOrDefaultin interfaceISystemProperties- Parameters:
key- the system property to retrieve.defaultValue- the default value if the property is not set.- Returns:
- the property value or the default.
-
initializeProperties
public void initializeProperties(Properties properties)
Initializes the properties to be used by Open Federation Library. Ideally this must be called first before any other method is called within Open Federation Library. This method provides a programmatic way to set the properties, and will override similar properties if loaded for a properties file.- Specified by:
initializePropertiesin interfaceISystemProperties- Parameters:
properties- properties for Open Federation Library
-
getServerList
public Collection getServerList() throws Exception
Returns server list.- Specified by:
getServerListin interfaceISystemProperties- Returns:
- Server List.
- Throws:
Exception- if server list cannot be returned.
-
getServiceAllURLs
public Collection getServiceAllURLs(String serviceName) throws Exception
Returns service all url list.- Specified by:
getServiceAllURLsin interfaceISystemProperties- Returns:
- Server List.
- Throws:
Exception- if server list cannot be returned.
-
getServiceURL
public URL getServiceURL(String serviceName, String protocol, String hostname, int port, String uri) throws Exception
Returns the URL of the specified service on the specified host.- Specified by:
getServiceURLin interfaceISystemProperties- Parameters:
serviceName- The name of the service.protocol- The service protocol.hostname- The service host name.port- The service listening port.uri- The service URI.- Returns:
- The URL of the specified service on the specified host.
- Throws:
Exception- if the URL could not be found.
-
initializeProperties
public void initializeProperties(String propertyName, String propertyValue)
Initializes the properties map.- Specified by:
initializePropertiesin interfaceISystemProperties- Parameters:
propertyName- Name of properties.propertyValue- Value of properties.
-
-