Interface PrintService


public interface PrintService
  • Method Details

    • createExportJob

      Job createExportJob(Asset master, List<PrintFormat> formats) throws PersistenceException
      Creates a sling job for exporting pdf and indd rendition of asset if the print rendition exists
      Parameters:
      master - asset for which print mapping is already defined as a rendition
      formats - list of export formats
      Returns:
      Instance of the created sling job
      Throws:
      PersistenceException - - If there's an error persisting the job
    • createExportPagesJob

      Job createExportPagesJob(Asset master) throws PersistenceException
      Creates a sling job for exporting jpg renditions of pages of template if the print rendition exists
      Parameters:
      master - asset for which print mapping is not yet defined
      Returns:
      Instance of the created sling job
      Throws:
      PersistenceException - - If there's an error persisting the job
    • createPages

      List<Asset> createPages(List<String> products, Asset master, Resource parent) throws PersistenceException
      Creates multiple assets corresponding to products using master asset
      Parameters:
      products - list of paths for commerce products
      master - asset for which print mapping is already defined as a rendition
      parent - parent resource where new assets are to be created
      Returns:
      a list of assets created as a copy from master asset and correspoding product
      Throws:
      PersistenceException - - If there's an error persisting the page
    • createCatalog

      Asset createCatalog(String name, List<Asset> pages, String mergedType, Resource parent) throws PersistenceException
      Creates a brochure using multiple assets
      Parameters:
      name - name of the page
      pages - ordered list of assets to be part of brochure
      mergedType - Template or Catalog ?
      parent - parent resource where new assets are to be created
      Returns:
      a asset representing brochure
      Throws:
      PersistenceException - - If there's an error persisting the catalog
    • createCatalog

      Asset createCatalog(String name, List<Asset> pages, Resource parent) throws PersistenceException
      Creates a brochure using multiple assets
      Parameters:
      name - name of the catalog
      pages - ordered list of assets to be part of brochure
      parent - parent resource where new assets are to be created
      Returns:
      a asset representing brochure
      Throws:
      PersistenceException - - If there's an error persisting the catalog