|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.connection.XMLConfigurationBuilder
public final class XMLConfigurationBuilder
Converts XML configuration files produced by the Integration Technologies
Configuration tool (ITConfig) into a ManualConnectionFactoryConfiguration
object. ITConfig produces a server information XML file that describes
connection parameters for an IOM server or a cluster of servers.
Typically the server information XML file describes connection parameters
for a SAS Metadata Server.
The server information XML file may also describe one or more credentials that can be used to connect to the IOM server. Alternately, ITConfig can produce a user information XML file that describes one or more credentials that can be used to connect to an IOM Server. Typically, the server information XML file and user information XML file each describe no more than one credential. In all cases, no more than one credential per authentication domain is allowed.
This class extracts the connection parameters for the IOM server and, if specified, the credentials that can be used to connect to the server.
Constructor Summary | |
---|---|
XMLConfigurationBuilder(java.io.File serverInfoFile)
Construct a ConfigurationBuilder object with a server
information XML file. |
|
XMLConfigurationBuilder(java.io.File serverInfoFile,
java.io.File userInfoFile)
Construct a ConfigurationBuilder object with a server
information XML file and a user information XML file. |
Method Summary | |
---|---|
ManualConnectionFactoryConfiguration |
getConfiguration()
Get the ManualConnectionFactoryConfiguration object created from
the server information XML file. |
Credential |
getCredentialForDomain(java.lang.String domain)
Get the credential for a desired domain created from the user information XML file or from user information in the server information XML file. |
Constructor Detail |
---|
public XMLConfigurationBuilder(java.io.File serverInfoFile) throws ConnectionFactoryException
ConfigurationBuilder
object with a server
information XML file.
serverInfoFile
- a server information XML file produced by ITConfig
ConnectionFactoryException
- if there is a problem accessing or
processing the server information XML file
java.lang.NullPointerException
- if serverInfoFile is
null
public XMLConfigurationBuilder(java.io.File serverInfoFile, java.io.File userInfoFile) throws ConnectionFactoryException
ConfigurationBuilder
object with a server
information XML file and a user information XML file. If both the
server information XML file and the user information XML file contain
a credential for the same authentication domain, the one from the
user information XML file will take precedence.
serverInfoFile
- a server information XML file produced by ITConfiguserInfoFile
- a user information XML file produced by ITConfig
ConnectionFactoryException
- if there is a problem accessing or
processing the server information XML file or the user information XML file
java.lang.NullPointerException
- if serverInfoFile is
null
Method Detail |
---|
public ManualConnectionFactoryConfiguration getConfiguration()
ManualConnectionFactoryConfiguration
object created from
the server information XML file.
ManualConnectionFactoryConfiguration
object created from
the server information XML file.public Credential getCredentialForDomain(java.lang.String domain)
This code shows an example of how to determine which domain to ask for:
ConfigurationBuilder builder = new ConfigurationBuilder(...); ManualConnectionFactoryConfiguration cxfConfig = builder.getConfiguration(); Cluster[] clusterArr = cxfConfig.getClusterArray(); String domain = clusterArr[0].getDomain(); Credential cred = builder.getCredentialForDomain(domain);Here is a different example:
ConfigurationBuilder builder = new ConfigurationBuilder(...); ManualConnectionFactoryConfiguration cxfConfig = builder.getConfiguration(); ConnectionFactoryManager cxfManager = new ConnectionFactoryManager(); ConnectionFactoryInterface cxf = cxfManager.getFactory(cxfConfig); List domainLst = cxf.getDomains(); String domain = (String)domainLst.get(0); Credential cred = builder.getCredentialForDomain(domain); ConnectionInterface cx = cxf.getConnection(cred);
domain
- the desired domain for the credential
null
if no credential was specified for that domain
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |