MovieLibrary
Class ConvertingJob

java.lang.Object
  extended by MovieLibrary.ConvertingJob

public class ConvertingJob
extends java.lang.Object

Converting job object
Contains the information required to convert a video
Such as video path, conversion profile, crop settings...

Author:
Alex Della-Croce

Constructor Summary
ConvertingJob(ConvertingJob reqConvertingJob)
           
ConvertingJob(CropSettings reqCrop, ConversionProfile reqProfile, VideoObject reqVideo, java.lang.String reqTitle, int reqIndex)
          Constructor for a converting job
ConvertingJob(java.io.File jobFile)
           
 
Method Summary
 ConversionProfile getConversionProfile()
          get conversion profile for current job
 CropSettings getCropSettings()
          get crop settings for current job
 java.lang.String getDisabledTitle()
           
 java.lang.String getErrorTitle()
           
 java.lang.String getJobPath()
          returns the path of this job
 java.lang.String getProcessedTitle(java.lang.String timeElapsed)
           
 java.lang.String getProcessingTitle()
           
 java.lang.String getTitle()
           
 VideoObject getVideoToConvert()
          get the video to be converted in this job
 boolean hasBeenDisabled()
           
 boolean hasJobFinished()
          has this job finished converting
 boolean isJobDoneSuccessfully()
           
 boolean isJobEnabled()
          is this job enabled, will it be converted
 boolean isJobRunning()
          is this job running
 boolean saveJob(boolean overwrite)
           
 void setConversionProfile(ConversionProfile reqProfile)
          sets the conversion profile for this job
 void setCropSettings(CropSettings reqCrop)
          sets the crop settings for this job
 void setIndex(int reqIndex)
           
 void setJobEnabled(boolean jobStatus)
          set job to enabled, will be converted once it is its turn
 void setJobFinished(boolean jobStatus)
          set job to finished converting
 void setJobRunning(boolean jobStatus)
          set this job to start converting
 void setJobSuccessful(boolean jobStatus)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertingJob

public ConvertingJob(CropSettings reqCrop,
                     ConversionProfile reqProfile,
                     VideoObject reqVideo,
                     java.lang.String reqTitle,
                     int reqIndex)
Constructor for a converting job

Parameters:
reqCrop - crop settings for this job
reqProfile - conversion profile for this job
reqVideo - video to convert
reqTitle - video job title

ConvertingJob

public ConvertingJob(ConvertingJob reqConvertingJob)

ConvertingJob

public ConvertingJob(java.io.File jobFile)
Method Detail

setCropSettings

public void setCropSettings(CropSettings reqCrop)
sets the crop settings for this job

Parameters:
reqCrop - crop settings to set for this job

setConversionProfile

public void setConversionProfile(ConversionProfile reqProfile)
sets the conversion profile for this job

Parameters:
reqProfile - conversion profile to set for this job

getCropSettings

public CropSettings getCropSettings()
get crop settings for current job

Returns:
the crop settings to crop the input video, null if auto crop detection enabled

getConversionProfile

public ConversionProfile getConversionProfile()
get conversion profile for current job

Returns:
the conversion profile to use to convert the video

getVideoToConvert

public VideoObject getVideoToConvert()
get the video to be converted in this job

Returns:
the video object to be converted

setJobFinished

public void setJobFinished(boolean jobStatus)
set job to finished converting

Parameters:
jobStatus - status of job

hasJobFinished

public boolean hasJobFinished()
has this job finished converting

Returns:
status of this job

setJobRunning

public void setJobRunning(boolean jobStatus)
set this job to start converting

Parameters:
jobStatus - status of this job

isJobRunning

public boolean isJobRunning()
is this job running

Returns:
status of this job

setJobEnabled

public void setJobEnabled(boolean jobStatus)
set job to enabled, will be converted once it is its turn

Parameters:
jobStatus - job status

isJobEnabled

public boolean isJobEnabled()
is this job enabled, will it be converted

Returns:
status of this job

getTitle

public java.lang.String getTitle()

getProcessingTitle

public java.lang.String getProcessingTitle()

getProcessedTitle

public java.lang.String getProcessedTitle(java.lang.String timeElapsed)

getErrorTitle

public java.lang.String getErrorTitle()

getDisabledTitle

public java.lang.String getDisabledTitle()

setIndex

public void setIndex(int reqIndex)

setJobSuccessful

public void setJobSuccessful(boolean jobStatus)

isJobDoneSuccessfully

public boolean isJobDoneSuccessfully()

hasBeenDisabled

public boolean hasBeenDisabled()

saveJob

public boolean saveJob(boolean overwrite)

getJobPath

public java.lang.String getJobPath()
returns the path of this job

Returns:
the path of this job in the jobs folder