Class TagSpecDispatch


  • public class TagSpecDispatch
    extends Object
    This class stores the dispatch rules for all TagSpecs with the same tag name.
    Author:
    nhant01, GeorgeLuo
    • Constructor Detail

      • TagSpecDispatch

        public TagSpecDispatch()
        Constructor.
    • Method Detail

      • registerDispatchKey

        public void registerDispatchKey​(@Nonnull
                                        String dispatchKey,
                                        int tagSpecId)
        Registers a new dispatch key to match a tagspec id
        Parameters:
        dispatchKey - the dispatch key.
        tagSpecId - tag spec id.
      • matchingDispatchKey

        public List<Integer> matchingDispatchKey​(@Nonnull
                                                 String attrName,
                                                 @Nonnull
                                                 String attrValue,
                                                 @Nonnull
                                                 String mandatoryParent)
        Looks up a dispatch key as previously registered, returning the corresponding tagSpecIds which are ordered by their specificity of match (e.g. Name/Value/Parent, then Name/Value, and then Name).
        Parameters:
        attrName - attribute name.
        attrValue - attribute value.
        mandatoryParent - mandatory parent.
        Returns:
        returns the list of tag spec ids.
      • registerTagSpec

        public void registerTagSpec​(int tagSpecId)
        Registers a new non dispatch key tagspec id.
        Parameters:
        tagSpecId - tag spec id.
      • empty

        public boolean empty()
        Returns true if dispatch key is not null and tag specs is not empty.
        Returns:
        returns true if dispatch key is not null and tag specs is not empty.
      • hasDispatchKeys

        public boolean hasDispatchKeys()
        Returns true if tag spec key by dispatch not null.
        Returns:
        returns true if tag spec key by dispatch not null.
      • hasTagSpecs

        public boolean hasTagSpecs()
        Return true if tag specs not empty.
        Returns:
        returns true if tag specs not empty.
      • allTagSpecs

        public List<Integer> allTagSpecs()
        Returns the tag specs.
        Returns:
        returns the tag specs.