Interface PrintMediaService

All Known Implementing Classes:
DefaultPrintMediaService

public interface PrintMediaService
Interface defining how to generate the labels. Also, provides api to convert the MediaModel into popup script
  • Method Details

    • getMediaForTemplate

      MediaModel getMediaForTemplate(String frontendTemplateName, BusinessProcessModel businessProcessModel)
      Generates the MediaModel for the given ConsignmentModel
      Parameters:
      frontendTemplateName - the templateName to generate the MediaModel
      businessProcessModel - the BusinessProcessModel for which media needs to be generated
      Returns:
      the generated MediaModel
    • generatePopupScriptForMedia

      String generatePopupScriptForMedia(MediaModel mediaModel, String width, String height, String blockedPopupMessage)
      Generates the popup script for the given MediaModel.
      Parameters:
      mediaModel - the MediaModel to be rendered as html in popup
      width - the width of the popup window
      height - the height of the popup height
      blockedPopupMessage - the localised error message if popups are not allowed to be open
      Returns:
      the popup script to open a popup window with the rendered html equivalent of the given media object
    • generateHtmlMediaTemplate

      String generateHtmlMediaTemplate(MediaModel mediaModel)
      Generates an HTML page for the given MediaModel
      Parameters:
      mediaModel - the MediaModel to be rendered as an HTML page
      Returns:
      the generated HTML page