Class TopicInterpolator


  • public class TopicInterpolator
    extends Object
    An utility class to interpolate subscription, channel templates.

    An input string can contains any combination of: - %{db} - %{table} - %{type}

    • Constructor Detail

      • TopicInterpolator

        public TopicInterpolator​(String templateString)
    • Method Detail

      • generateFromRowIdentity

        public String generateFromRowIdentity​(RowIdentity pk)
        Interpolate the input string based on {{RowIdentity}}

        If your inputString contains a %{type} it will not be interpolated because we can't get type from RowIdentity.

        Parameters:
        pk - the rowIdentity
        Returns:
        the interpollated string
      • generateFromRowMap

        public String generateFromRowMap​(RowMap r)
        Interpolate the input string based on {{RowMap}}
        Parameters:
        r - the rowMap
        Returns:
        the interpollated string
      • generateFromRowMapAndCleanUpIllegalCharacters

        public String generateFromRowMapAndCleanUpIllegalCharacters​(RowMap r)
        Interpolate the input string based on {{RowMap}} and clean up all non alpha-numeric characters
        Parameters:
        r - the rowMap
        Returns:
        the interpollated string