com.ebmwebsourcing.wsstar.notification.service.topic
Class WstopTopicManager

java.lang.Object
  extended by com.ebmwebsourcing.wsstar.notification.service.topic.WstopTopicManager

public class WstopTopicManager
extends java.lang.Object

This class must implement the singleton pattern (solution chosen : see http://en.wikipedia.org/wiki/Singleton_pattern)

Author:
tdejean - eBM WebSourcing

Constructor Summary
WstopTopicManager(java.io.InputStream supportedTopicSetConfig)
          SingletonHolder is loaded on the first execution of Singleton.getInstance() or the first access to SingletonHolder.INSTANCE, not before.
WstopTopicManager(java.io.InputStream topicNamespaceStream, java.util.List<java.lang.String> supportedTopics)
           
 
Method Summary
 boolean acceptSubscribeOrRegisterTopicExpression(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topicExprToCheck, boolean isSubscribeRequest)
          Check if the topic expression contains in a "Subscribe" or "RegisterPublisher" request is allowed (Is Dialect supported ?
 void addSupportedDialect(java.lang.String dialactURI)
           
 com.ebmwebsourcing.wsstar.notification.definition.topics.api.TopicSetType createTopicSetFromSupportedTopicNamespace(com.ebmwebsourcing.wsstar.notification.definition.topics.api.TopicNamespaceType topicns)
           
 com.ebmwebsourcing.wsstar.notification.definition.topics.api.TopicSetType createTopicSetFromTopicNamespace(com.ebmwebsourcing.wsstar.notification.definition.topics.api.TopicNamespaceType topicns, java.util.List<java.lang.String> topics)
           
 java.lang.String getNotifContentUuid(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topic, java.lang.Boolean isSetRequest)
          Return the Uuid associated to the last Notification message content sent on a given Topic
 java.util.List<java.lang.String> getRegistrationIdsFromTopicsSet(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topic)
           
 java.util.List<java.lang.String> getSubscriptionIdsFromTopicsSet(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topic, boolean isNotification)
           
 java.util.List<java.lang.String> getSupportedDialectForSetOfTopics()
           
 org.jdom.Document getSupportedTopics()
           
 java.util.List<com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType> getTopicSetPath(java.lang.String subscriptionId)
           
 void RAZSupportedTopicSet(java.io.InputStream defaultConfig)
          Use specifically for test Unit (called in setUp() method)
 void removeExistingRegistration(java.lang.String registrationId)
           
 void removeExistingSubscription(java.lang.String subscriptionId)
           
 void setLogger(java.util.logging.Logger logger)
           
 void storeNewRegistration(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topicExprToCheck, java.lang.String registrationId)
           
 void storeNewSubscription(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topicExprToCheck, java.lang.String subscriptionId)
           
 void storeNotifContentUuid(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topic, java.lang.String currentMessageContentUuid)
          Store uuid corresponding to a notification message content on a specific topic Update existing previous uuid (only one notification message content uuid allowed per topic)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WstopTopicManager

public WstopTopicManager(java.io.InputStream supportedTopicSetConfig)
SingletonHolder is loaded on the first execution of Singleton.getInstance() or the first access to SingletonHolder.INSTANCE, not before.


WstopTopicManager

public WstopTopicManager(java.io.InputStream topicNamespaceStream,
                         java.util.List<java.lang.String> supportedTopics)
                  throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
Method Detail

setLogger

public void setLogger(java.util.logging.Logger logger)

addSupportedDialect

public void addSupportedDialect(java.lang.String dialactURI)

getSupportedDialectForSetOfTopics

public java.util.List<java.lang.String> getSupportedDialectForSetOfTopics()

getSupportedTopics

public org.jdom.Document getSupportedTopics()

RAZSupportedTopicSet

public void RAZSupportedTopicSet(java.io.InputStream defaultConfig)
Use specifically for test Unit (called in setUp() method)


acceptSubscribeOrRegisterTopicExpression

public boolean acceptSubscribeOrRegisterTopicExpression(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topicExprToCheck,
                                                        boolean isSubscribeRequest)
                                                 throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException,
                                                        WSNotificationFault
Check if the topic expression contains in a "Subscribe" or "RegisterPublisher" request is allowed (Is Dialect supported ? Is Expression Well formed ? , does the topic expression describe a sub-set of supported topics ? ...) according to TopicNamesapceType

Parameters:
expression - The topic expression contains in the request payload
topics - Supported topics organized as a tree (see TopicNamespaceType)
isSubscribeRequest - boolean is to build fault
Returns:
true if the expression is accepted, false if it is not
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
WSNotificationFault

storeNewRegistration

public void storeNewRegistration(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topicExprToCheck,
                                 java.lang.String registrationId)
                          throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException,
                                 WSNotificationFault
Parameters:
topicExpr -
registrationId -
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
WSNotificationFault

removeExistingRegistration

public void removeExistingRegistration(java.lang.String registrationId)
                                throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException,
                                       WSNotificationFault
Parameters:
registrationId -
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
WSNotificationFault

storeNewSubscription

public void storeNewSubscription(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topicExprToCheck,
                                 java.lang.String subscriptionId)
                          throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException,
                                 WSNotificationFault
Parameters:
topicExpr -
subscriptionId -
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
WSNotificationFault

removeExistingSubscription

public void removeExistingSubscription(java.lang.String subscriptionId)
                                throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException,
                                       WSNotificationFault
Parameters:
subscriptionId -
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
WSNotificationFault

storeNotifContentUuid

public void storeNotifContentUuid(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topic,
                                  java.lang.String currentMessageContentUuid)
                           throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException,
                                  WSNotificationFault
Store uuid corresponding to a notification message content on a specific topic Update existing previous uuid (only one notification message content uuid allowed per topic)

Parameters:
topic -
notifContentUuiId -
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
WSNotificationFault

getNotifContentUuid

public java.lang.String getNotifContentUuid(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topic,
                                            java.lang.Boolean isSetRequest)
                                     throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException,
                                            WSNotificationFault
Return the Uuid associated to the last Notification message content sent on a given Topic

Parameters:
topic -
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
WSNotificationFault

getSubscriptionIdsFromTopicsSet

public java.util.List<java.lang.String> getSubscriptionIdsFromTopicsSet(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topic,
                                                                        boolean isNotification)
                                                                 throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
Parameters:
topic -
isNotification -
Returns:
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException

getRegistrationIdsFromTopicsSet

public java.util.List<java.lang.String> getRegistrationIdsFromTopicsSet(com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType topic)
                                                                 throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException

getTopicSetPath

public java.util.List<com.ebmwebsourcing.wsstar.notification.definition.basenotification.api.TopicExpressionType> getTopicSetPath(java.lang.String subscriptionId)
                                                                                                                           throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException

createTopicSetFromTopicNamespace

public com.ebmwebsourcing.wsstar.notification.definition.topics.api.TopicSetType createTopicSetFromTopicNamespace(com.ebmwebsourcing.wsstar.notification.definition.topics.api.TopicNamespaceType topicns,
                                                                                                                  java.util.List<java.lang.String> topics)
                                                                                                           throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException

createTopicSetFromSupportedTopicNamespace

public com.ebmwebsourcing.wsstar.notification.definition.topics.api.TopicSetType createTopicSetFromSupportedTopicNamespace(com.ebmwebsourcing.wsstar.notification.definition.topics.api.TopicNamespaceType topicns)
                                                                                                                    throws com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException
Throws:
com.ebmwebsourcing.wsstar.notification.definition.utils.WSNotificationException


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