Class UsedProductsPlaceholderPopulator

  • All Implemented Interfaces:
    IPlaceholderPopulator

    class UsedProductsPlaceholderPopulator
    extends AbstractFormattedPlaceholderPopulator
    Class is used to populate usedProducts placeholder. Placeholder should be configured with parameter defining the format of output. Within format strings, unquoted letters from A to Z and from a to z are process as pattern letters representing appropriate component of usedProducts format. There are three letters which are allowed in the outputformat:

    • P stands for product name
    • V stands for version of the product
    • T is for usage type of the product

    Text can be quoted using single quotes (') to avoid interpretation. All other characters are not interpreted and just copied into the output string. String may contain escaped apostrophes \' which processed as characters. Backslash is used for escaping so you need double backslash to print it \\. All the rest backslashes (not followed by apostrophe or one more backslash) are simply ignored.

    The result of the processing is the list of all products mentioned among events as a comma-separated list. The order of the elements is defined by the order of products mentioning in the events. Equal strings are skipped even if they were generated for different products (i. e. format P stands for product name only: if several version of the same product are used, it will be the only mentioning of that product).

    • Constructor Detail

      • UsedProductsPlaceholderPopulator

        public UsedProductsPlaceholderPopulator()
    • Method Detail

      • populate

        public java.lang.String populate​(java.util.List<ConfirmedEventWrapper> events,
                                         java.lang.String parameter)
        Builds a replacement for a placeholder usedProducts in accordance with the registered events and provided format.
        Parameters:
        events - is a list of event involved into document processing
        parameter - defines output format in accordance with the for description
        Returns:
        populated comma-separated list of used products in accordance with the format
        Throws:
        java.lang.IllegalArgumentException - if format of the pattern is invalid