Class OutputTypeAwareHrefEvaluator

    • Constructor Detail

      • OutputTypeAwareHrefEvaluator

        public OutputTypeAwareHrefEvaluator​(Map<String,​HrefEvaluator> outputTypeEvaluators,
                                            HrefEvaluator defaultEvaluator)
        outputTypeEvaluators - a Map where the key is a ConversionContextOutputType and the value is the HrefEvaluator to use for that output type
        defaultEvaluator - the HrefEvaluator to use if no specific one is found
    • Method Detail

      • createHref

        public String createHref​(ConversionContext context,
                                 Object entity,
                                 String anchor)
        Description copied from interface: HrefEvaluator
        Create the appropriate href attribute value for the supplied ConversionContext.
        Specified by:
        createHref in interface HrefEvaluator
        context - the ConversionContext providing information about the conversion being performed, including the target output type e.g. display, pdf
        entity - the object
        anchor - an option parameter specifying an anchor component for the href attribute. This may be null if there is no destination anchor.
        the attribute value appropriate for the outputType specified.