org.ow2.petals.binding.soap.util
Class SUPropertiesHelper

java.lang.Object
  extended by org.ow2.petals.binding.soap.util.SUPropertiesHelper

public class SUPropertiesHelper
extends java.lang.Object

Helper for Service Unit properties values

Author:
chamerling - eBM Websourcing

Constructor Summary
protected SUPropertiesHelper()
          Creates a new instance if SUPropertiesHelper
 
Method Summary
protected static boolean checkPresent(java.lang.String parameterName, org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Check if the given parameter is present
static java.lang.String getAddress(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Deprecated. use getWSATo(ConfigurationExtensions) instead
static java.lang.String getBasicAuthPwd(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Return the Basic Authentication password
static java.lang.String getBasicAuthUser(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Return the Basic Authentication username
protected static boolean getBoolean(java.lang.String parameterName, org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the boolean value of the parameter
protected static boolean getBoolean(java.lang.String parameterName, org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions, boolean defaultValue)
           
static java.lang.String getHttpRedirection(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
           
static java.lang.String getKeystoreFile(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the keystore file location (HTTPS)
static java.lang.String getKeystorePassword(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the keystore password (HTTPS)
static java.util.List<java.lang.String> getModules(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the modules
static java.lang.String getServiceName(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the service name.
static java.lang.String getServiceParameters(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the service parameters for the associated service
protected static java.lang.String getString(java.lang.String parameterName, org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the parameter value or return null if not found
protected static java.lang.String getString(java.lang.String parameterName, java.lang.String defaultValue, org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
           
static java.lang.String getTruststoreFile(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the truststore file location (HTTPS)
static java.lang.String getTruststorePassword(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the truststore password (HTTPS)
static java.lang.String getWSAFaultTo(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
           
static java.lang.String getWSAFrom(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
           
static java.lang.String getWSAReplyTo(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
           
static java.lang.String getWSATo(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the wsa-to
static boolean isAxis1CompatibilityEnabled(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Is Axis 1 compatibility enabled
static boolean isHttpsTransportEnabled(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the flag enabling the HTTP transport layer
static boolean isHttpTransportEnabled(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the flag enabling the HTTP transport layer
static boolean isJmsTransportEnabled(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the flag enabling the JMS transport layer
static boolean isWSAEnabled(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Return if the WSA-Addressing is enabled
static java.lang.String retrieveChunkedMode(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Retrieve the chunked mode property value
static boolean retrieveCleanupTransport(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Get the cleanup-transport property value (true/false).
static java.lang.String retrieveDefaultSOAPAction(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Retrieve the default SOAP action from the extensions
static java.util.List<java.lang.String> retrieveHeaderList(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
           
static java.util.List<org.w3c.dom.DocumentFragment> retrieveHeaderToInject(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
           
static boolean retrieveInjectHeader(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          We inject the headers by default
static org.apache.axis2.transport.http.HttpTransportProperties.ProxyProperties retrieveProxySettings(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Retrieve the proxy settings from the extensions.
static java.lang.String retrieveSOAPEnvelopeNamespaceURI(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          Retrieve, in the jbi.xml descriptor, the SOAP version to use for SoapEnvelopeNamespaceURI Search a soap-version tag.
static void setBasicAuthentication(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions, org.apache.axis2.client.Options options)
          Set the basic authentication parameters for the outgoing message request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SUPropertiesHelper

protected SUPropertiesHelper()
Creates a new instance if SUPropertiesHelper

Method Detail

checkPresent

protected static final boolean checkPresent(java.lang.String parameterName,
                                            org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Check if the given parameter is present

Parameters:
parameterName - the parameter name
extensions - the SU extensions
Returns:

getAddress

@Deprecated
public static java.lang.String getAddress(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Deprecated. use getWSATo(ConfigurationExtensions) instead

Get the address

Returns:
the address

getBoolean

protected static final boolean getBoolean(java.lang.String parameterName,
                                          org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the boolean value of the parameter

Parameters:
parameterName - the parameter name
extensions - the SU extensions
Returns:
the boolean value of the parameter according to the Boolean.parseBoolean method, true if the parameter has not been found.

getBoolean

protected static final boolean getBoolean(java.lang.String parameterName,
                                          org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions,
                                          boolean defaultValue)

getHttpRedirection

public static final java.lang.String getHttpRedirection(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)

getServiceName

public static java.lang.String getServiceName(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the service name. This name will be used to create the web service

Parameters:
extensions - the SU extensions
Returns:

getString

protected static final java.lang.String getString(java.lang.String parameterName,
                                                  org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the parameter value or return null if not found

Parameters:
parameterName -
extensions - the SU extensions
Returns:

getString

protected static final java.lang.String getString(java.lang.String parameterName,
                                                  java.lang.String defaultValue,
                                                  org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Parameters:
parameterName -
defaultValue -
extensions - the SU extensions
Returns:

getWSAFaultTo

public static java.lang.String getWSAFaultTo(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Parameters:
extensions - the SU extensions
Returns:

getWSAFrom

public static java.lang.String getWSAFrom(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Parameters:
extensions - the SU extensions
Returns:

getWSAReplyTo

public static java.lang.String getWSAReplyTo(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Parameters:
extensions - the SU extensions
Returns:

getWSATo

public static java.lang.String getWSATo(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the wsa-to

Returns:
the wsa-to

isHttpsTransportEnabled

public static boolean isHttpsTransportEnabled(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the flag enabling the HTTP transport layer

Parameters:
extensions - the SU extensions
Returns:

isHttpTransportEnabled

public static boolean isHttpTransportEnabled(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the flag enabling the HTTP transport layer

Parameters:
extensions - the SU extensions
Returns:

isJmsTransportEnabled

public static boolean isJmsTransportEnabled(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the flag enabling the JMS transport layer

Parameters:
extensions - the SU extensions
Returns:

retrieveHeaderList

public static java.util.List<java.lang.String> retrieveHeaderList(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Parameters:
extensions - the SU extensions
Returns:

retrieveInjectHeader

public static boolean retrieveInjectHeader(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
We inject the headers by default

Parameters:
extensions - the SU extensions
Returns:

retrieveHeaderToInject

public static java.util.List<org.w3c.dom.DocumentFragment> retrieveHeaderToInject(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)

isAxis1CompatibilityEnabled

public static boolean isAxis1CompatibilityEnabled(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Is Axis 1 compatibility enabled

Parameters:
extensions - the SU extensions
Returns:
true if the Axis 1 compatibility is enabled, otherwise false

getKeystoreFile

public static java.lang.String getKeystoreFile(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the keystore file location (HTTPS)

Parameters:
extensions - the SU extensions
Returns:
the keystore file location

getKeystorePassword

public static java.lang.String getKeystorePassword(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the keystore password (HTTPS)

Parameters:
extensions - the SU extensions the SU extensions
Returns:
the keystore password

getTruststoreFile

public static java.lang.String getTruststoreFile(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the truststore file location (HTTPS)

Parameters:
extensions - the SU extensions
Returns:
the truststore file location

getTruststorePassword

public static java.lang.String getTruststorePassword(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the truststore password (HTTPS)

Parameters:
extensions - the SU extensions
Returns:
the truststore password

isWSAEnabled

public static boolean isWSAEnabled(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Return if the WSA-Addressing is enabled

Parameters:
extensions - the SU extensions
Returns:
true if the WSA-Addressing is enabled, otherwise false

getBasicAuthUser

public static java.lang.String getBasicAuthUser(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Return the Basic Authentication username

Parameters:
extensions - the SU parameters
Returns:
the Basic Authentication username

getBasicAuthPwd

public static java.lang.String getBasicAuthPwd(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Return the Basic Authentication password

Parameters:
extensions - the SU parameters
Returns:
the Basic Authentication password

getModules

public static final java.util.List<java.lang.String> getModules(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the modules

Parameters:
extensions - the SU parameters
Returns:
the list of modules

getServiceParameters

public static final java.lang.String getServiceParameters(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the service parameters for the associated service

Parameters:
extensions - the SU parameters
Returns:
the services parameters (XML)

retrieveSOAPEnvelopeNamespaceURI

public static final java.lang.String retrieveSOAPEnvelopeNamespaceURI(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Retrieve, in the jbi.xml descriptor, the SOAP version to use for SoapEnvelopeNamespaceURI Search a soap-version tag.
Legal values are 1.1 and 1.2. 1.1 is used if no tag is found.

Parameters:
extensions - the SU parameters
Returns:
the Axis2 soapEnvelopeNamespaceURI constant.
See Also:
org.apache.axiom.soap.SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, org.apache.axiom.soap.SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI

retrieveCleanupTransport

public static final boolean retrieveCleanupTransport(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Get the cleanup-transport property value (true/false).

Parameters:
extensions - the SU parameters
Returns:
the value of the cleanup-transport property (true if the property is not present)

retrieveChunkedMode

public static final java.lang.String retrieveChunkedMode(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Retrieve the chunked mode property value

Parameters:
extensions - the SU parameters
Returns:
the chunked mode property value

retrieveDefaultSOAPAction

public static final java.lang.String retrieveDefaultSOAPAction(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Retrieve the default SOAP action from the extensions

Parameters:
extensions - the SU parameters
Returns:
the default SOAP action

retrieveProxySettings

public static final org.apache.axis2.transport.http.HttpTransportProperties.ProxyProperties retrieveProxySettings(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
Retrieve the proxy settings from the extensions. The proxy-host value is required. The other ones will be set to default values by Axis if they have not been setted by the SU.

Parameters:
extensions - the SU parameters
Returns:
the proxy settings if they are present in the extensions, null otherwise.

setBasicAuthentication

public static final void setBasicAuthentication(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions,
                                                org.apache.axis2.client.Options options)
Set the basic authentication parameters for the outgoing message request.

Parameters:
extensions - the SU parameters
options - the Axis2 option


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.