com.endeca.portal.mdex
Class MDEXStateUtil

java.lang.Object
  extended by com.endeca.portal.mdex.MDEXStateUtil

public class MDEXStateUtil
extends java.lang.Object


Constructor Summary
MDEXStateUtil()
           
 
Method Summary
static boolean checkAPICompatibility(MDEXState state)
           
static boolean checkWebService(java.lang.String url, SSLConfig sslConfig)
          Returns true if we are able to successfully make a request
static void configureSSL(java.net.HttpURLConnection connection, SSLConfig sslConfig)
          Configure the given HttpURLConnection with the provided SSL Config Generally, portlet developers will not need to use this method.
static java.lang.String getAdminUrl(java.lang.String op, java.lang.String server, java.lang.String port, java.lang.String databaseName, SSLConfig sslConfig)
           
protected static java.security.KeyStore getKeyStore(SSLConfig sslConfig)
           
static java.lang.String getServiceURL(java.lang.String service, java.lang.String server, java.lang.String port, java.lang.String databaseName, SSLConfig sslConfig)
          This method is used to generate URLs for the specified service.
protected static java.security.KeyStore getTrustStore(SSLConfig sslConfig)
           
protected static void initSSL()
           
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> ping(java.lang.String server, java.lang.String port, java.lang.String databaseName, SSLConfig sslConfig)
          Pings passed URL information, throws Exception if fails, returns the connection Header fields on success.
static boolean stats(java.lang.String server, java.lang.String port, java.lang.String databaseName, SSLConfig sslConfig)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MDEXStateUtil

public MDEXStateUtil()
Method Detail

ping

public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> ping(java.lang.String server,
                                                                                    java.lang.String port,
                                                                                    java.lang.String databaseName,
                                                                                    SSLConfig sslConfig)
                                                                             throws java.lang.Exception
Pings passed URL information, throws Exception if fails, returns the connection Header fields on success.

Parameters:
server -
port -
databaseName -
sslConfig -
Returns:
Map>
Throws:
java.lang.Exception

checkWebService

public static boolean checkWebService(java.lang.String url,
                                      SSLConfig sslConfig)
                               throws java.lang.Exception
Returns true if we are able to successfully make a request

Parameters:
url -
sslConfig -
Returns:
boolean
Throws:
java.lang.Exception

stats

public static boolean stats(java.lang.String server,
                            java.lang.String port,
                            java.lang.String databaseName,
                            SSLConfig sslConfig)
                     throws java.lang.Exception
Deprecated. 

This method attempts to connect to server port and returns true if it can, throws exception if not. not used anywhere, leaving in for now as removal is invasive during RC this was discovered during. Should be removed at next opportunity.

Parameters:
server -
port -
databaseName -
sslConfig -
Returns:
boolean
Throws:
java.lang.Exception

getServiceURL

public static java.lang.String getServiceURL(java.lang.String service,
                                             java.lang.String server,
                                             java.lang.String port,
                                             java.lang.String databaseName,
                                             SSLConfig sslConfig)
This method is used to generate URLs for the specified service.

Returns:
the URL of the Conversation Service associated with this data source.

getAdminUrl

public static java.lang.String getAdminUrl(java.lang.String op,
                                           java.lang.String server,
                                           java.lang.String port,
                                           java.lang.String databaseName,
                                           SSLConfig sslConfig)

checkAPICompatibility

public static boolean checkAPICompatibility(MDEXState state)

configureSSL

public static void configureSSL(java.net.HttpURLConnection connection,
                                SSLConfig sslConfig)
                         throws java.lang.Exception
Configure the given HttpURLConnection with the provided SSL Config Generally, portlet developers will not need to use this method. Instead, use DataSource.execute(Request), which will manage any SSL-related configuration applicable to the datasource. This method is useful when a portlet needs to manage query sending/response processing directly, and needs to configure SSL on the HTTPURLConnection directly. This method will configure SSL on the connection in the same way SSL is generally applied to connections made to the MDEX. If the SSLConfig is null, the connection will be unchanged.

Parameters:
connection -
sslConfig -
Throws:
java.lang.Exception

getTrustStore

protected static java.security.KeyStore getTrustStore(SSLConfig sslConfig)

getKeyStore

protected static java.security.KeyStore getKeyStore(SSLConfig sslConfig)

initSSL

protected static void initSSL()