Interface PrintService


  • public interface PrintService
    • Method Detail

      • createExportJob

        Job createExportJob​(Asset master,
                            java.util.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

        java.util.List<Asset> createPages​(java.util.List<java.lang.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​(java.lang.String name,
                            java.util.List<Asset> pages,
                            java.lang.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
        parent - parent resource where new assets are to be created
        mergedType - Template or Catalog ?
        Returns:
        a asset representing brochure
        Throws:
        PersistenceException - - If there's an error persisting the catalog
      • createCatalog

        Asset createCatalog​(java.lang.String name,
                            java.util.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