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 ClassesModifier and TypeClassDescriptionprotected static enumList of available operations on jobs -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected org.opencastproject.security.api.OrganizationDirectoryServiceThe organization directory serviceprotected org.opencastproject.security.api.SecurityServiceThe security serviceprotected org.opencastproject.serviceregistry.api.ServiceRegistryThe service registry serviceprotected org.opencastproject.security.api.UserDirectoryServiceThe user directory serviceprotected org.opencastproject.workspace.api.WorkspaceThe workspace serviceFields inherited from class org.opencastproject.job.api.AbstractJobProducer
ACCEPT_JOB_LOADS_EXCEEDING_PROPERTY, acceptJobLoadsExeedingMaxLoad, DEFAULT_ACCEPT_JOB_LOADS_EXCEEDING, executor, jobTypeFields inherited from interface org.opencastproject.coverimage.CoverImageService
JOB_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FilecreateTempFile(org.opencastproject.job.api.Job job, String suffix) org.opencastproject.job.api.JobgenerateCoverImage(String xml, String xsl, String width, String height, String posterImageUri, String targetFlavor) protected org.opencastproject.mediapackage.AttachmentgenerateCoverImageInternal(org.opencastproject.job.api.Job job, String xml, String xsl, int width, int height, String posterImage, String targetFlavor) protected static Documentprotected Stringprocess(org.opencastproject.job.api.Job job) protected static voidrasterizeSvg(File svgSource, File pngResult) protected static voidtransformSvg(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
-
Field Details
-
COVERIMAGE_WORKSPACE_COLLECTION
- See Also:
-
workspace
protected org.opencastproject.workspace.api.Workspace workspaceThe workspace service -
serviceRegistry
protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistryThe service registry service -
securityService
protected org.opencastproject.security.api.SecurityService securityServiceThe security service -
userDirectoryService
protected org.opencastproject.security.api.UserDirectoryService userDirectoryServiceThe user directory service -
organizationDirectoryService
protected org.opencastproject.security.api.OrganizationDirectoryService organizationDirectoryServiceThe organization directory service
-
-
Constructor Details
-
AbstractCoverImageService
public AbstractCoverImageService()Creates a new composer service instance.
-
-
Method Details
-
process
- Specified by:
processin classorg.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:
generateCoverImagein interfaceorg.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:
TransformerFactoryConfigurationErrororg.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
-