com.ebmwebsourcing.wsstar.notification.extension.utils
Class WsnSpecificTypeHelper

java.lang.Object
  extended by com.ebmwebsourcing.wsstar.notification.extension.utils.WsnSpecificTypeHelper

public class WsnSpecificTypeHelper
extends java.lang.Object

This class provides a set of static methods that helps to use all defined specific Types with WS-Notification implementation (ws-notification-definition library). It means that each time a "AnyType" xml fragment is expected in the xml-schema files of WS-Notification specifications, then the desired specific type can be use instead. And following methods make it easier to do

Author:
Thierry Déjean - eBM Websourcing

Constructor Summary
WsnSpecificTypeHelper()
           
 
Method Summary
static org.w3c.dom.Element getContentFromMessage(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Message messageContent)
          method that get the content of a Message as a Element.
static ContextPolicyType getContextPolicyType(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionPolicyType subsPolicy)
          method that get - if the expected xml fragment exists -a ContextPolicyType object from a SubscriptionPolicyType object.
static com.ebmwebsourcing.wsstar.addressing.definition.api.EndpointReferenceType getEndpointReference(com.ebmwebsourcing.wsstar.notification.definition.brokerednotification.api.DestroyRegistration destRegObj)
          Method used to get EndpointReferenceType object from DestroyRegistration object
static com.ebmwebsourcing.wsstar.addressing.definition.api.EndpointReferenceType getEndpointReference(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Unsubscribe unsubObj)
          Method used to get EndpointReferenceType object from Unsubscribe object
static ProcessPolicyType getProcessPolicyType(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionPolicyType subsPolicy)
          method that get - if the expected xml fragment exists -a ProcessPolicyType object from a SubscriptionPolicyType object.
static ResourcesUuidType getResourcesUuidType(com.ebmwebsourcing.wsstar.notification.definition.brokerednotification.api.DestroyRegistration destRegObj)
          Method used to get ResourcesUuidType object from DestroyRegistration object
static ResourcesUuidType getResourcesUuidType(com.ebmwebsourcing.wsstar.addressing.definition.api.ReferenceParametersType refParams)
          Method used to get ResourcesUuidType object from ReferenceParametersType object
static ResourcesUuidType getResourcesUuidType(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Renew renewObj)
          Method used to get ResourcesUuidType object from Renew object
static ResourcesUuidType getResourcesUuidType(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Unsubscribe unsubsObj)
          Method used to get ResourcesUuidType object from Unsubscribe object
static SOAParameterType getSOAParameter(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.QueryExpressionType msgContent)
          Method used to get SOAParameterType object from QueryExpressionType object
static SOAParameterType getSOAParameter(com.ebmwebsourcing.wsstar.addressing.definition.api.ReferenceParametersType refParams)
          Method used to get SOAParameterType object from ReferenceParametersType object
static TerminationTimeType getTerminationTimeFromSubscription(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionManagerRP subscription)
          method that get the termination time of a SubscriptionManagerRP as a TerminationTimeType.
static java.lang.String getXpathExpression(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.QueryExpressionType messageContent)
          method that get - if the expected xml fragment exists -a String object from a QueryExpressionType object.
static XsltStyleSheetType getXsltStyleSheetType(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionPolicyType subsPolicy)
          method that get - if the expected xml fragment exists -a XsltStyleSheetType object from a SubscriptionPolicyType object.
static java.lang.Boolean isTopicSupported(com.ebmwebsourcing.wsstar.notification.definition.topics.api.TopicType topic)
          check if a given topic is a supported topic in the current context
static void setContentToMessage(org.w3c.dom.Element eltValue, com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Message content)
          Method used to set an Element object into a Message object
static void setContextPolicyType(ContextPolicyType contextPolicyObj, com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionPolicyType subsPolicy)
          Method used to set an xml fragment representation of a ContextPolicyType object into a SubscriptionPolicyType object
static void setEndpointReference(com.ebmwebsourcing.wsstar.addressing.definition.api.EndpointReferenceType epr, com.ebmwebsourcing.wsstar.notification.definition.brokerednotification.api.DestroyRegistration destRegObj)
          Method used to set an xml fragment representation of a DestroyRegistration object into a EndpointReferenceType object
static void setEndpointReference(com.ebmwebsourcing.wsstar.addressing.definition.api.EndpointReferenceType epr, com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Unsubscribe unsubObj)
          Method used to set an xml fragment representation of a Unsubscribe object into a EndpointReferenceType object
static void setProcessPolicyType(ProcessPolicyType processPolicyObj, com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionPolicyType subsPolicy)
          Method used to set an xml fragment representation of a ProcessPolicyType object into a SubscriptionPolicyType object
static void setResourcesUuidType(ResourcesUuidType rUuidsObj, com.ebmwebsourcing.wsstar.notification.definition.brokerednotification.api.DestroyRegistration destRegObj)
          Method used to set an xml fragment representation of a ResourcesUuidType object into a DestroyRegistration object
static void setResourcesUuidType(ResourcesUuidType rUuidsObj, com.ebmwebsourcing.wsstar.addressing.definition.api.ReferenceParametersType refParams)
          Method used to set an xml fragment representation of a ResourcesUuidType object into a ReferenceParametersType object
static void setResourcesUuidType(ResourcesUuidType rUuidsObj, com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Renew renewObj)
          Method used to set an xml fragment representation of a ResourcesUuidType object into a Renew object
static void setResourcesUuidType(ResourcesUuidType rUuidsObj, com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Unsubscribe unsubsObj)
          Method used to set an xml fragment representation of a ResourcesUuidType object into a ReferenceParametersType object
static void setSOAParameter(SOAParameterType soaParamObj, com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.QueryExpressionType msgContent)
          Method used to set an xml fragment representation of a SOAParameterType object into a QueryExpressionType object
static void setSOAParameter(SOAParameterType soaParamObj, com.ebmwebsourcing.wsstar.addressing.definition.api.ReferenceParametersType refParams)
          Method used to set an xml fragment representation of a SOAParameterType object into a ReferenceParametersType object
static void setSupported(com.ebmwebsourcing.wsstar.notification.definition.topics.api.TopicType topic, java.lang.Boolean support)
           
static void setTerminationTimeToSubscription(TerminationTimeType termTimeValue, com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionManagerRP subscription)
          Method used to set an TerminationTimeType object into a SubscriptionManagerRP object
static void setXpathExpressionsType(java.lang.String xpathsObj, com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.QueryExpressionType messageContent)
          Method used to set an xml fragment representation of a ProcessPolicyType object into a SubscriptionPolicyType object
static void setXsltStyleSheetType(XsltStyleSheetType transformPolicyObj, com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionPolicyType subsPolicy)
          Method used to set an xml fragment representation of a XsltStyleSheetType object into a SubscriptionPolicyType object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WsnSpecificTypeHelper

public WsnSpecificTypeHelper()
Method Detail

getSOAParameter

public static SOAParameterType getSOAParameter(com.ebmwebsourcing.wsstar.addressing.definition.api.ReferenceParametersType refParams)
                                        throws WSNotificationExtensionException
Method used to get SOAParameterType object from ReferenceParametersType object

Parameters:
refParams - ReferenceParametersType object (see WS-Addressing)
Returns:
SOAParameterType object
Throws:
WSNotificationExtensionException

getSOAParameter

public static SOAParameterType getSOAParameter(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.QueryExpressionType msgContent)
                                        throws WSNotificationExtensionException
Method used to get SOAParameterType object from QueryExpressionType object

Parameters:
msgContent - QueryExpressionType object
Returns:
SOAParameterType object
Throws:
WSNotificationExtensionException

setSOAParameter

public static void setSOAParameter(SOAParameterType soaParamObj,
                                   com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.QueryExpressionType msgContent)
                            throws WSNotificationExtensionException
Method used to set an xml fragment representation of a SOAParameterType object into a QueryExpressionType object

Parameters:
soaParameter - SOAParameterType object whom the xml representation must be set
msgContent - QueryExpressionType object in which the xml representation must be set
Throws:
WSNotificationExtensionException

setSOAParameter

public static void setSOAParameter(SOAParameterType soaParamObj,
                                   com.ebmwebsourcing.wsstar.addressing.definition.api.ReferenceParametersType refParams)
                            throws WSNotificationExtensionException
Method used to set an xml fragment representation of a SOAParameterType object into a ReferenceParametersType object

Parameters:
soaParameter - SOAParameterType object whom the xml representation must be set
msgContent - ReferenceParametersType object in which the xml representation must be set
Throws:
WSNotificationExtensionException

getEndpointReference

public static com.ebmwebsourcing.wsstar.addressing.definition.api.EndpointReferenceType getEndpointReference(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Unsubscribe unsubObj)
                                                                                                      throws com.ebmwebsourcing.wsstar.addressing.definition.api.WSAddressingException
Method used to get EndpointReferenceType object from Unsubscribe object

Parameters:
unsubObj - Unsubscribe object
Returns:
EndpointReferenceType object
Throws:
WSNotificationExtensionException
com.ebmwebsourcing.wsstar.addressing.definition.api.WSAddressingException

getEndpointReference

public static com.ebmwebsourcing.wsstar.addressing.definition.api.EndpointReferenceType getEndpointReference(com.ebmwebsourcing.wsstar.notification.definition.brokerednotification.api.DestroyRegistration destRegObj)
                                                                                                      throws com.ebmwebsourcing.wsstar.addressing.definition.api.WSAddressingException
Method used to get EndpointReferenceType object from DestroyRegistration object

Parameters:
unsubObj - DestroyRegistration object
Returns:
EndpointReferenceType object
Throws:
WSNotificationExtensionException
com.ebmwebsourcing.wsstar.addressing.definition.api.WSAddressingException

setEndpointReference

public static void setEndpointReference(com.ebmwebsourcing.wsstar.addressing.definition.api.EndpointReferenceType epr,
                                        com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Unsubscribe unsubObj)
                                 throws com.ebmwebsourcing.wsstar.addressing.definition.api.WSAddressingException
Method used to set an xml fragment representation of a Unsubscribe object into a EndpointReferenceType object

Parameters:
epr - EndpointReferenceType object whom the xml representation must be set
unsubObj - Unsubscribe object in which the xml representation must be set
Throws:
WSNotificationExtensionException
com.ebmwebsourcing.wsstar.addressing.definition.api.WSAddressingException

setEndpointReference

public static void setEndpointReference(com.ebmwebsourcing.wsstar.addressing.definition.api.EndpointReferenceType epr,
                                        com.ebmwebsourcing.wsstar.notification.definition.brokerednotification.api.DestroyRegistration destRegObj)
                                 throws com.ebmwebsourcing.wsstar.addressing.definition.api.WSAddressingException
Method used to set an xml fragment representation of a DestroyRegistration object into a EndpointReferenceType object

Parameters:
epr - EndpointReferenceType object whom the xml representation must be set
destRegObj - DestroyRegistration object in which the xml representation must be set
Throws:
WSNotificationExtensionException
com.ebmwebsourcing.wsstar.addressing.definition.api.WSAddressingException

getResourcesUuidType

public static ResourcesUuidType getResourcesUuidType(com.ebmwebsourcing.wsstar.addressing.definition.api.ReferenceParametersType refParams)
                                              throws WSNotificationExtensionException
Method used to get ResourcesUuidType object from ReferenceParametersType object

Parameters:
refParams - ReferenceParametersType object
Returns:
ResourcesUuidType object
Throws:
WSNotificationExtensionException

getResourcesUuidType

public static ResourcesUuidType getResourcesUuidType(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Unsubscribe unsubsObj)
                                              throws WSNotificationExtensionException
Method used to get ResourcesUuidType object from Unsubscribe object

Parameters:
unsubsObj - Unsubscribe object
Returns:
ResourcesUuidType object
Throws:
WSNotificationExtensionException

getResourcesUuidType

public static ResourcesUuidType getResourcesUuidType(com.ebmwebsourcing.wsstar.notification.definition.brokerednotification.api.DestroyRegistration destRegObj)
                                              throws WSNotificationExtensionException
Method used to get ResourcesUuidType object from DestroyRegistration object

Parameters:
destRegObj - DestroyRegistration object
Returns:
ResourcesUuidType object
Throws:
WSNotificationExtensionException

getResourcesUuidType

public static ResourcesUuidType getResourcesUuidType(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Renew renewObj)
                                              throws WSNotificationExtensionException
Method used to get ResourcesUuidType object from Renew object

Parameters:
unsubsObj - Renew object
Returns:
ResourcesUuidType object
Throws:
WSNotificationExtensionException

setResourcesUuidType

public static void setResourcesUuidType(ResourcesUuidType rUuidsObj,
                                        com.ebmwebsourcing.wsstar.addressing.definition.api.ReferenceParametersType refParams)
                                 throws WSNotificationExtensionException
Method used to set an xml fragment representation of a ResourcesUuidType object into a ReferenceParametersType object

Parameters:
rUuidsObj - ResourcesUuidType object whom the xml representation must be set
refParams - ReferenceParametersType object in which the xml representation must be set
Throws:
WSNotificationExtensionException

setResourcesUuidType

public static void setResourcesUuidType(ResourcesUuidType rUuidsObj,
                                        com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Unsubscribe unsubsObj)
                                 throws WSNotificationExtensionException
Method used to set an xml fragment representation of a ResourcesUuidType object into a ReferenceParametersType object

Parameters:
rUuidsObj - ResourcesUuidType object whom the xml representation must be set
unsubsObj - Unsubscribe object in which the xml representation must be set
Throws:
WSNotificationExtensionException

setResourcesUuidType

public static void setResourcesUuidType(ResourcesUuidType rUuidsObj,
                                        com.ebmwebsourcing.wsstar.notification.definition.brokerednotification.api.DestroyRegistration destRegObj)
                                 throws WSNotificationExtensionException
Method used to set an xml fragment representation of a ResourcesUuidType object into a DestroyRegistration object

Parameters:
rUuidsObj - ResourcesUuidType object whom the xml representation must be set
destRegObj - DestroyRegistration object in which the xml representation must be set
Throws:
WSNotificationExtensionException

setResourcesUuidType

public static void setResourcesUuidType(ResourcesUuidType rUuidsObj,
                                        com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Renew renewObj)
                                 throws WSNotificationExtensionException
Method used to set an xml fragment representation of a ResourcesUuidType object into a Renew object

Parameters:
rUuidsObj - ResourcesUuidType object whom the xml representation must be set
renewObj - Renew object in which the xml representation must be set
Throws:
WSNotificationExtensionException

getProcessPolicyType

public static ProcessPolicyType getProcessPolicyType(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionPolicyType subsPolicy)
                                              throws WSNotificationExtensionException
method that get - if the expected xml fragment exists -a ProcessPolicyType object from a SubscriptionPolicyType object.

Parameters:
subsPolicy - SubscriptionPolicyType object from which the xml representation is supposed to be found
Returns:
a ProcessPolicyType object
Throws:
WSNotificationExtensionException

setProcessPolicyType

public static void setProcessPolicyType(ProcessPolicyType processPolicyObj,
                                        com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionPolicyType subsPolicy)
                                 throws WSNotificationExtensionException
Method used to set an xml fragment representation of a ProcessPolicyType object into a SubscriptionPolicyType object

Parameters:
rUuidsObj - ProcessPolicyType object whom the xml representation must be set
destRegObj - SubscriptionPolicyType object in which the xml representation must be set
Throws:
WSNotificationExtensionException

getContextPolicyType

public static ContextPolicyType getContextPolicyType(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionPolicyType subsPolicy)
                                              throws WSNotificationExtensionException
method that get - if the expected xml fragment exists -a ContextPolicyType object from a SubscriptionPolicyType object.

Parameters:
subsPolicy - SubscriptionPolicyType object from which the xml representation is supposed to be found
Returns:
a ContextPolicyType object
Throws:
WSNotificationExtensionException

setContextPolicyType

public static void setContextPolicyType(ContextPolicyType contextPolicyObj,
                                        com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionPolicyType subsPolicy)
                                 throws WSNotificationExtensionException
Method used to set an xml fragment representation of a ContextPolicyType object into a SubscriptionPolicyType object

Parameters:
contextPolicyObj - ContextPolicyType object whom the xml representation must be set
destRegObj - SubscriptionPolicyType object in which the xml representation must be set
Throws:
WSNotificationExtensionException

getXpathExpression

public static java.lang.String getXpathExpression(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.QueryExpressionType messageContent)
                                           throws WSNotificationExtensionException
method that get - if the expected xml fragment exists -a String object from a QueryExpressionType object.

Parameters:
listOfObj - from which the xml representation is supposed to be found
Returns:
a String object
Throws:
WSNotificationExtensionException

setXpathExpressionsType

public static void setXpathExpressionsType(java.lang.String xpathsObj,
                                           com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.QueryExpressionType messageContent)
                                    throws WSNotificationExtensionException
Method used to set an xml fragment representation of a ProcessPolicyType object into a SubscriptionPolicyType object

Parameters:
xpathsObj - String object whom the xml representation must be set
messageContent - QueryExpressionType object in which the xml representation must be set
Throws:
WSNotificationExtensionException

getXsltStyleSheetType

public static XsltStyleSheetType getXsltStyleSheetType(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionPolicyType subsPolicy)
                                                throws WSNotificationExtensionException
method that get - if the expected xml fragment exists -a XsltStyleSheetType object from a SubscriptionPolicyType object.

Parameters:
subsPolicy - SubscriptionPolicyType object from which the xml representation is supposed to be found
Returns:
a XsltStyleSheetType object
Throws:
WSNotificationExtensionException

setXsltStyleSheetType

public static void setXsltStyleSheetType(XsltStyleSheetType transformPolicyObj,
                                         com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionPolicyType subsPolicy)
                                  throws WSNotificationExtensionException
Method used to set an xml fragment representation of a XsltStyleSheetType object into a SubscriptionPolicyType object

Parameters:
transformPolicyObj - XsltStyleSheetType object whom the xml representation must be set
subsPolicy - SubscriptionPolicyType object in which the xml representation must be set
Throws:
WSNotificationExtensionException

getContentFromMessage

public static org.w3c.dom.Element getContentFromMessage(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Message messageContent)
method that get the content of a Message as a Element.

Parameters:
messageContent - from which the xml representation is supposed to be found
Returns:
a Element object
Throws:
WSNotificationExtensionException

setContentToMessage

public static void setContentToMessage(org.w3c.dom.Element eltValue,
                                       com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.Message content)
Method used to set an Element object into a Message object

Parameters:
eltValue - Element object whom the xml representation must be set
content - Message object in which the xml representation must be set
Throws:
WSNotificationExtensionException

getTerminationTimeFromSubscription

public static TerminationTimeType getTerminationTimeFromSubscription(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionManagerRP subscription)
                                                              throws WSNotificationExtensionException
method that get the termination time of a SubscriptionManagerRP as a TerminationTimeType.

Parameters:
subscription - from which the xml representation is supposed to be found
Returns:
subscription a XsltStyleSheetType object
Throws:
WSNotificationExtensionException

setTerminationTimeToSubscription

public static void setTerminationTimeToSubscription(TerminationTimeType termTimeValue,
                                                    com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.SubscriptionManagerRP subscription)
                                             throws WSNotificationExtensionException
Method used to set an TerminationTimeType object into a SubscriptionManagerRP object

Parameters:
termTimeValue - TerminationTimeType object whom the xml representation must be set
subscription - SubscriptionManagerRP object which the xml representation must be set in
Throws:
WSNotificationExtensionException

isTopicSupported

public static java.lang.Boolean isTopicSupported(com.ebmwebsourcing.wsstar.notification.definition.topics.api.TopicType topic)
check if a given topic is a supported topic in the current context

Parameters:
topic - TopicType object to check
Returns:
true if supported , false if not

setSupported

public static void setSupported(com.ebmwebsourcing.wsstar.notification.definition.topics.api.TopicType topic,
                                java.lang.Boolean support)
Parameters:
topic -
support -


Copyright © 2009-2010 eBM Websourcing. All Rights Reserved.