psdi.app.eventresponse

Class ERUtility

  • java.lang.Object
    • psdi.app.eventresponse.ERUtility


  • public class ERUtility
    extends java.lang.Object
    This is a collection of utility functions to use when dealing with event names and topics. All the methods are static.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ERUtility() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String getTopicBase(java.lang.String eventTopic)
      Gets the base part of a eventTopic.
      static java.lang.String getTopicNode(java.lang.String eventTopic)
      Gets the node part of a eventTopic.
      static boolean hasWildcard(java.lang.String eventName)
      Determines whether the event name uses a wild card
      static java.lang.String wildcardEventMatch(java.lang.String eventName)
      Returns the wild card eventName that covers this eventName.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ERUtility

        public ERUtility()
    • Method Detail

      • getTopicBase

        public static java.lang.String getTopicBase(java.lang.String eventTopic)
        Gets the base part of a eventTopic. Of "maximo.workorder.update", "maximo.workorder." is the base part. The base part including the last dot.
        Parameters:
        eventTopic -
        Returns:
        The topic base. Returns the passed string if the topic has no dot.
      • getTopicNode

        public static java.lang.String getTopicNode(java.lang.String eventTopic)
        Gets the node part of a eventTopic. Of "maximo.workorder.update", "update" is the node part. The node part has no dot.
        Parameters:
        eventTopic -
        Returns:
        The topic node. Returns the empty string if the topic has no dot.
      • hasWildcard

        public static boolean hasWildcard(java.lang.String eventName)
        Determines whether the event name uses a wild card
        Parameters:
        eventName - the event name
        Returns:
        true if the event name ends with a wildcard
      • wildcardEventMatch

        public static java.lang.String wildcardEventMatch(java.lang.String eventName)
        Returns the wild card eventName that covers this eventName.
        Parameters:
        eventName - The specific event name
        Returns:
        The wildcard event name