Class AbstractCoverImageService

java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.coverimage.impl.AbstractCoverImageService
All Implemented Interfaces:
org.opencastproject.coverimage.CoverImageService, org.opencastproject.job.api.JobProducer
Direct Known Subclasses:
CoverImageServiceOsgiImpl

public abstract class AbstractCoverImageService extends org.opencastproject.job.api.AbstractJobProducer implements org.opencastproject.coverimage.CoverImageService
Service for creating cover images
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static enum 
    List of available operations on jobs
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
     
    protected org.opencastproject.security.api.OrganizationDirectoryService
    The organization directory service
    protected org.opencastproject.security.api.SecurityService
    The security service
    protected org.opencastproject.serviceregistry.api.ServiceRegistry
    The service registry service
    protected org.opencastproject.security.api.UserDirectoryService
    The user directory service
    protected org.opencastproject.workspace.api.Workspace
    The workspace service

    Fields inherited from class org.opencastproject.job.api.AbstractJobProducer

    ACCEPT_JOB_LOADS_EXCEEDING_PROPERTY, acceptJobLoadsExeedingMaxLoad, DEFAULT_ACCEPT_JOB_LOADS_EXCEEDING, executor, jobType

    Fields inherited from interface org.opencastproject.coverimage.CoverImageService

    JOB_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new composer service instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected File
    createTempFile(org.opencastproject.job.api.Job job, String suffix)
     
    org.opencastproject.job.api.Job
    generateCoverImage(String xml, String xsl, String width, String height, String posterImageUri, String targetFlavor)
     
    protected org.opencastproject.mediapackage.Attachment
    generateCoverImageInternal(org.opencastproject.job.api.Job job, String xml, String xsl, int width, int height, String posterImage, String targetFlavor)
     
    protected static Document
     
    protected String
    process(org.opencastproject.job.api.Job job)
     
    protected static void
    rasterizeSvg(File svgSource, File pngResult)
     
    protected static void
    transformSvg(Result svg, InputSource xmlSource, Document xslDoc, int width, int height, String posterImage)
     

    Methods inherited from class org.opencastproject.job.api.AbstractJobProducer

    acceptJob, activate, countJobs, finallyUpdateJob, getJobType, getOrganizationDirectoryService, getSecurityService, getServiceRegistry, getUserDirectoryService, incident, isReadyToAccept, isReadyToAcceptJobs

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • COVERIMAGE_WORKSPACE_COLLECTION

      protected static final String COVERIMAGE_WORKSPACE_COLLECTION
      See Also:
    • workspace

      protected org.opencastproject.workspace.api.Workspace workspace
      The workspace service
    • serviceRegistry

      protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry
      The service registry service
    • securityService

      protected org.opencastproject.security.api.SecurityService securityService
      The security service
    • userDirectoryService

      protected org.opencastproject.security.api.UserDirectoryService userDirectoryService
      The user directory service
    • organizationDirectoryService

      protected org.opencastproject.security.api.OrganizationDirectoryService organizationDirectoryService
      The organization directory service
  • Constructor Details

    • AbstractCoverImageService

      public AbstractCoverImageService()
      Creates a new composer service instance.
  • Method Details

    • process

      protected String process(org.opencastproject.job.api.Job job) throws Exception
      Specified by:
      process in class org.opencastproject.job.api.AbstractJobProducer
      Throws:
      Exception
    • generateCoverImage

      public org.opencastproject.job.api.Job generateCoverImage(String xml, String xsl, String width, String height, String posterImageUri, String targetFlavor) throws org.opencastproject.coverimage.CoverImageException
      Specified by:
      generateCoverImage in interface org.opencastproject.coverimage.CoverImageService
      Throws:
      org.opencastproject.coverimage.CoverImageException
    • generateCoverImageInternal

      protected org.opencastproject.mediapackage.Attachment generateCoverImageInternal(org.opencastproject.job.api.Job job, String xml, String xsl, int width, int height, String posterImage, String targetFlavor) throws org.opencastproject.coverimage.CoverImageException
      Throws:
      org.opencastproject.coverimage.CoverImageException
    • parseXsl

      protected static Document parseXsl(String xsl) throws org.opencastproject.coverimage.CoverImageException
      Throws:
      org.opencastproject.coverimage.CoverImageException
    • transformSvg

      protected static void transformSvg(Result svg, InputSource xmlSource, Document xslDoc, int width, int height, String posterImage) throws TransformerFactoryConfigurationError, org.opencastproject.coverimage.CoverImageException
      Throws:
      TransformerFactoryConfigurationError
      org.opencastproject.coverimage.CoverImageException
    • createTempFile

      protected File createTempFile(org.opencastproject.job.api.Job job, String suffix) throws org.opencastproject.coverimage.CoverImageException
      Throws:
      org.opencastproject.coverimage.CoverImageException
    • rasterizeSvg

      protected static void rasterizeSvg(File svgSource, File pngResult) throws org.opencastproject.coverimage.CoverImageException
      Throws:
      org.opencastproject.coverimage.CoverImageException