public class ServerConfiguration extends ConfigurationBase
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SERVER_CONFIG
Default server configuration.
|
static String |
DEFAULT_SERVER_ID |
static String |
SERVER_DEFAULTS |
ATTR_PRIMARY_SITE_ID, ATTR_PRIMARY_SITE_URL, ATTR_SEC_ID, ATTR_SERVER_ID, CONFIG_SERVERS, CONFIG_SITES, OLD_ATTR_SERVER_LIST, OLD_ATTR_SITE_LIST, SUBCONFIG_ACCESS_URL, SUBCONFIG_SEC_URLS, SUBSCHEMA_SERVER, SUBSCHEMA_SITE
Modifier and Type | Method and Description |
---|---|
static void |
addToSite(SSOToken ssoToken,
String instanceName,
String siteId)
Adds server to a site.
|
static boolean |
belongToSite(SSOToken ssoToken,
String instanceName,
String siteId)
Returns
true if a server belongs to a site. |
static void |
cloneServerInstance(SSOToken token,
String serverName,
String cloneName)
Clones an existing server using the new cloned server name.
|
static void |
cloneServerInstance(SSOToken ssoToken,
String serverName,
String cloneName,
String cloneId)
Clones a server instance.
|
static void |
createDefaults(SSOToken ssoToken) |
static void |
createServerInstance(SSOToken ssoToken,
String instanceName,
Map values,
String serverConfigXML)
Creates a server instance.
|
static void |
createServerInstance(SSOToken ssoToken,
String instanceName,
Set values,
String serverConfigXML)
Creates a server instance.
|
static boolean |
createServerInstance(SSOToken ssoToken,
String instanceName,
String instanceId,
Set values,
String serverConfigXML)
Creates a server instance.
|
static boolean |
deleteServerInstance(SSOToken ssoToken,
String instanceName)
Deletes a server instance.
|
static String |
exportServerInstance(SSOToken ssoToken,
String serverName)
Exports a server instance.
|
static Map |
getDefaultProperties() |
static Properties |
getDefaults(SSOToken ssoToken)
Returns the default server properties.
|
static Map |
getLBCookieValues(SSOToken ssoToken)
Returns a map of server name to its load balancer cookie value.
|
static Map<String,String> |
getNewServerDefaults(SSOToken ssoToken) |
static Properties |
getProperties(Set set)
Returns properties object.
|
static Properties |
getProperties(String str)
Returns properties object.
|
static Set |
getPropertiesSet(String str)
Returns set of string with this format, key=value.
|
static String |
getServerConfigXML(SSOToken ssoToken,
String instanceName)
Returns server configuration XML.
|
static String |
getServerID(SSOToken ssoToken,
String instanceName)
Returns server Identifier.
|
static Set |
getServerInfo(SSOToken ssoToken)
Returns a set of server information where each entry in a set is
a string of this format
server-instance-name|serverId|siteId1|siteId2|... |
static Properties |
getServerInstance(SSOToken ssoToken,
String instanceName)
Returns the configuration of a server instance.
|
static Set<String> |
getServers(SSOToken ssoToken)
Returns a set of server instance name (String).
|
static String |
getServerSite(SSOToken ssoToken,
String instanceName)
Returns a site name of which server belongs to.
|
static String |
getWarFileVersion() |
static boolean |
hasServerOrSiteId(SSOToken ssoToken,
String serverId)
Returns
true if server or site id exists. |
static void |
importServerInstance(SSOToken ssoToken,
String serverName,
String xmlFile)
Imports a server instance.
|
static boolean |
isServerInstanceExist(SSOToken ssoToken,
String instanceName)
Returns
true if server instance exists. |
static void |
removeFromSite(SSOToken ssoToken,
String instanceName,
String siteId)
Removes server from a site.
|
static void |
removeServerConfiguration(SSOToken ssoToken,
String instanceName,
Collection propertyNames)
Removes server configuration.
|
static void |
setServerConfigXML(SSOToken ssoToken,
String instanceName,
String xml)
Sets server configuration XML.
|
static void |
setServerInstance(SSOToken ssoToken,
String instanceName,
Map newValues)
Sets configuration to a server instance.
|
static void |
setServerSite(SSOToken ssoToken,
String instanceName,
String siteName)
Sets site name of which server belongs to.
|
static void |
upgradeServerInstance(SSOToken ssoToken,
String instanceName,
String instanceId,
Map<String,String> upgradedValues)
Upgrades a server instance.
|
getNextId, getNextId, getRootServerConfig, getRootServerConfigWithRetry, getRootSiteConfig, getServerConfig, getServerConfigurationId, getSiteConfigurationId, getSiteConfigurationIds, updateOrganizationAlias
public static final String SERVER_DEFAULTS
public static final String DEFAULT_SERVER_ID
public static final String DEFAULT_SERVER_CONFIG
public static Set getServerInfo(SSOToken ssoToken) throws SMSException, SSOException
server-instance-name|serverId|siteId1|siteId2|...|siteIdn
.ssoToken
- Single Sign-On Token which is used to query the service
management datastore.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.public static Map getLBCookieValues(SSOToken ssoToken) throws SMSException, SSOException, IOException
ssoToken
- Single Sign-On Token which is used to query the service
management datastore.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.IOException
public static Set<String> getServers(SSOToken ssoToken) throws SMSException, SSOException
ssoToken
- Single Sign-On Token which is used to query the service
management datastore.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.public static void createServerInstance(SSOToken ssoToken, String instanceName, Map values, String serverConfigXML) throws SMSException, SSOException, IOException, ConfigurationException, UnknownPropertyNameException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.values
- Map of string to set of (String) values.serverConfigXML
- Server configuration XML.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.IOException
- if IO operation fails.UnknownPropertyNameException
- if property names are unknown.ConfigurationException
- if property names or values are not
valid.public static void createServerInstance(SSOToken ssoToken, String instanceName, Set values, String serverConfigXML) throws SMSException, SSOException, ConfigurationException, UnknownPropertyNameException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.values
- Set of string with this format key=value
.serverConfigXML
- Server configuration XML.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.UnknownPropertyNameException
- if property names are unknown.ConfigurationException
- if property names or values are not
valid.public static void createDefaults(SSOToken ssoToken) throws SSOException, SMSException, UnknownPropertyNameException
public static String getWarFileVersion()
public static Map<String,String> getNewServerDefaults(SSOToken ssoToken) throws SMSException, SSOException
SMSException
SSOException
public static Map getDefaultProperties()
public static String getServerID(SSOToken ssoToken, String instanceName) throws SMSException, SSOException
SMSException
SSOException
public static String getServerConfigXML(SSOToken ssoToken, String instanceName) throws SMSException, SSOException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.public static void setServerConfigXML(SSOToken ssoToken, String instanceName, String xml) throws SMSException, SSOException, ConfigurationException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.xml
- Server configuration XML.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.ConfigurationException
public static Properties getServerInstance(SSOToken ssoToken, String instanceName) throws SMSException, SSOException, IOException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.IOException
- if IO operation fails.public static boolean isServerInstanceExist(SSOToken ssoToken, String instanceName) throws SMSException, SSOException
true
if server instance exists.ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.true
if server instance exists.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.public static boolean hasServerOrSiteId(SSOToken ssoToken, String serverId) throws SMSException, SSOException
true
if server or site id exists.ssoToken
- Single Sign-On Token which is used to access to the service management datastore.serverId
- Id of the server instance.true
if server id exists.SMSException
- if errors access in the service management datastore.SSOException
- if the ssoToken
is not valid.public static void setServerInstance(SSOToken ssoToken, String instanceName, Map newValues) throws SMSException, SSOException, IOException, ConfigurationException, UnknownPropertyNameException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.newValues
- Map of string to Set of string.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.UnknownPropertyNameException
- if property names are unknown.ConfigurationException
- if property names or values are not
valid.IOException
public static void removeServerConfiguration(SSOToken ssoToken, String instanceName, Collection propertyNames) throws SMSException, SSOException, IOException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.propertyNames
- Collection of property names to be removed.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.IOException
public static boolean deleteServerInstance(SSOToken ssoToken, String instanceName) throws SMSException, SSOException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.public static boolean createServerInstance(SSOToken ssoToken, String instanceName, String instanceId, Set values, String serverConfigXML) throws SMSException, SSOException, ConfigurationException, UnknownPropertyNameException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.instanceId
- Identifier of the server instance.values
- Set of string with this format key=value
.serverConfigXML
- Service configuration XML.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.UnknownPropertyNameException
- if property names are unknown.ConfigurationException
- if the property name and values are not
valid.public static void upgradeServerInstance(SSOToken ssoToken, String instanceName, String instanceId, Map<String,String> upgradedValues) throws SMSException, SSOException, ConfigurationException, IOException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.instanceId
- Identifier of the server instance.upgradedValues
- Map of new values for the default server configSMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.UnknownPropertyNameException
- if property names are unknown.ConfigurationException
- if the property name and values are not
valid.IOException
public static Properties getDefaults(SSOToken ssoToken)
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.public static Properties getProperties(String str) throws IOException
str
- String of this format key1=value1\nkey2=value2\n...keyN=valueNIOException
- if str
contains incorrect format.public static Properties getProperties(Set set) throws IOException
set
- Set of string of this format key=value.IOException
- if str
contains incorrect format.public static Set getPropertiesSet(String str) throws IOException
str
- String of this format key1=value1\nkey2=value2\n...keyN=valueNIOException
- if str
contains incorrect format.public static void addToSite(SSOToken ssoToken, String instanceName, String siteId) throws SMSException, SSOException, ConfigurationException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.siteId
- Identifier of the site.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.ConfigurationException
- if server instance is not found.public static String getServerSite(SSOToken ssoToken, String instanceName) throws SMSException, SSOException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.public static void setServerSite(SSOToken ssoToken, String instanceName, String siteName) throws SMSException, SSOException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.siteName
- Site name.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.public static void removeFromSite(SSOToken ssoToken, String instanceName, String siteId) throws SMSException, SSOException
ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.siteId
- Identifier of the site.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.public static boolean belongToSite(SSOToken ssoToken, String instanceName, String siteId) throws SMSException, SSOException
true
if a server belongs to a site.ssoToken
- Single Sign-On Token which is used to access to the
service management datastore.instanceName
- Name of the server instance.siteId
- Identifier of the site.SMSException
- if errors access in the service management
datastore.SSOException
- if the ssoToken
is not valid.public static void cloneServerInstance(SSOToken ssoToken, String serverName, String cloneName, String cloneId) throws SMSException, SSOException, ConfigurationException
serverName
- Server name to clone.cloneName
- server name.cloneId
- new server idSMSException
SSOException
ConfigurationException
public static void cloneServerInstance(SSOToken token, String serverName, String cloneName) throws SSOException, SMSException, ConfigurationException
token
- SSO tokenserverName
- name of existing servercloneName
- name of new cloned serverSSOException
- should there be some issue with the passed tokenSMSException
- should some SMS error occurConfigurationException
- should some issue occur within configuration handlingpublic static String exportServerInstance(SSOToken ssoToken, String serverName) throws SMSException, SSOException
serverName
- Server name to clone.SMSException
SSOException
public static void importServerInstance(SSOToken ssoToken, String serverName, String xmlFile) throws SMSException, SSOException, IOException, SAXException, ParserConfigurationException, ConfigurationException
serverName
- Server name to clone.xmlFile
- File that contains XML representation of server instance.SMSException
SSOException
IOException
SAXException
ParserConfigurationException
ConfigurationException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.