com.ibm.cics.core.connections
Class ConfigurationUtils

java.lang.Object
  extended by com.ibm.cics.core.connections.ConfigurationUtils

public class ConfigurationUtils
extends java.lang.Object

A collection of utility methods for dealing with ConnectionParameters and ConnectionProfiles


Constructor Summary
ConfigurationUtils()
           
 
Method Summary
static java.lang.String getHost(IConnectionParameters config)
          Returns the host of the supplied connection parameters
static java.lang.String getInternalId(java.lang.String id)
          Strips a connection provider ID from the supplied ID, if one is found
static int getPort(IConnectionParameters config)
          Returns the port of the supplied connection parameters
static java.util.List<java.lang.String> getPotentialExternalIds(java.lang.String legacyInternalId, java.lang.String connectionTypeId)
          Return the potential external IDs for a legacy internalID
static java.lang.String getProviderId(java.lang.String id)
          Returns the connection provider ID component for an external ID
static boolean isExternalId(java.lang.String id)
          Returns whether or not the supplied ID is an internal or external one
static boolean isLocalProviderExternalId(java.lang.String id)
          Determines whether or not an ID is an external ID for the local connection provider
static boolean isSecureConfirmed(IConnectionParameters config)
          Returns whether the supplied config has secure confirmed set.
static boolean isSecureHint(IConnectionParameters config)
          Returns whether the supplied config has the secure hint set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationUtils

public ConfigurationUtils()
Method Detail

isSecureHint

public static boolean isSecureHint(IConnectionParameters config)
Returns whether the supplied config has the secure hint set.

Parameters:
parameters - the parameters to test
Returns:
whether or not it has the secure hint set

isSecureConfirmed

public static boolean isSecureConfirmed(IConnectionParameters config)
Returns whether the supplied config has secure confirmed set.

Parameters:
parameters - the parameters to test
Returns:
whether or not is has security confirmed

getHost

public static java.lang.String getHost(IConnectionParameters config)
Returns the host of the supplied connection parameters

Parameters:
parameters - the parameters to test
Returns:
the host

getPort

public static int getPort(IConnectionParameters config)
Returns the port of the supplied connection parameters

Parameters:
parameters - the parameters to test
Returns:
the port

getPotentialExternalIds

public static java.util.List<java.lang.String> getPotentialExternalIds(java.lang.String legacyInternalId,
                                                                       java.lang.String connectionTypeId)
Return the potential external IDs for a legacy internalID

Parameters:
legacyInternalId - legacy ID to use
connectionTypeId - connection type ID to use
Returns:
a List of the potential IDs to use

isExternalId

public static boolean isExternalId(java.lang.String id)
Returns whether or not the supplied ID is an internal or external one

Parameters:
id - the ID to test
Returns:
whether or not it represents an internal or external ID.

getProviderId

public static java.lang.String getProviderId(java.lang.String id)
Returns the connection provider ID component for an external ID

Parameters:
id - an external ID
Returns:
the connection provider ID component of the external ID
Throws:
java.lang.IllegalArgumentException - if the supplied ID is not a external ID

isLocalProviderExternalId

public static boolean isLocalProviderExternalId(java.lang.String id)
Determines whether or not an ID is an external ID for the local connection provider

Parameters:
id - the ID to analyse
Returns:
true if the ID is an external ID, where the provider ID component corresponds to the local connection provider ID or false if not.

getInternalId

public static java.lang.String getInternalId(java.lang.String id)
Strips a connection provider ID from the supplied ID, if one is found

Parameters:
externalId -
Returns:


Copyright © 2013 IBM Corp. All Rights Reserved.