Package com.sun.identity.configuration
Class SystemProperties
- java.lang.Object
-
- com.sun.identity.configuration.SystemProperties
-
- All Implemented Interfaces:
ISystemProperties
public class SystemProperties extends Object implements ISystemProperties
This is the adapter class foramserverto the shared library. Mainly to provide system configuration information.
-
-
Constructor Summary
Constructors Constructor Description SystemProperties()Creates a new instance ofSystemProperties
-
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 server all urls.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 map.
-
-
-
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.
-
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 server all urls.- 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 deployment 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(Properties properties)
Initializes the properties map.- Specified by:
initializePropertiesin interfaceISystemProperties- Parameters:
properties- Map of new properties.
-
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.
-
-