net.sf.jame.service
Class LibraryService

java.lang.Object
  extended by net.sf.jame.service.LibraryService

public class LibraryService
extends java.lang.Object

Author:
Andrea Medeghini

Field Summary
static int TILE_HEIGHT
           
static int TILE_WIDTH
           
 
Constructor Summary
LibraryService(Session session, java.io.File workdir)
           
 
Method Summary
 void addServiceListener(LibraryServiceListener listener)
           
 void cleanClip(RenderClipDataRow clip)
           
 void cleanJob(RenderJobDataRow job)
           
 void cleanProfile(RenderProfileDataRow profile)
           
 void createClip(RenderClipDataRow clip, TwisterClip twisterClip)
           
 void createJob(RenderJobDataRow job)
           
 void createJobs(int profileId, ProgressListener listener, java.lang.String message, float percentage)
           
 void createProfile(RenderProfileDataRow profile)
           
 void deleteAll()
           
 void deleteClip(RenderClipDataRow clip)
           
 void deleteJob(RenderJobDataRow job)
           
 void deleteJobs()
           
 void deleteJobs(int profileId, ProgressListener listener, java.lang.String message, float percentage)
           
 void deleteProfile(RenderProfileDataRow profile)
           
 void exportClip(RenderClipDataRow dataRow, java.io.File file)
           
 void exportProfile(RenderProfileDataRow profile, EncoderExtensionRuntime<?> encoder, ProgressListener listener, java.io.File path)
           
protected  void fireClipCreated(RenderClipDataRow clip)
           
protected  void fireClipDeleted(RenderClipDataRow clip)
           
protected  void fireClipLoaded(RenderClipDataRow clip)
           
protected  void fireClipUpdated(RenderClipDataRow clip)
           
protected  void fireJobAborted(RenderJobDataRow job)
           
protected  void fireJobCreated(RenderJobDataRow job)
           
protected  void fireJobDeleted(RenderJobDataRow job)
           
protected  void fireJobResumed(RenderJobDataRow job)
           
protected  void fireJobStarted(RenderJobDataRow job)
           
protected  void fireJobStopped(RenderJobDataRow job)
           
protected  void fireJobUpdated(RenderJobDataRow job)
           
protected  void fireProfileCreated(RenderProfileDataRow profile)
           
protected  void fireProfileDeleted(RenderProfileDataRow profile)
           
protected  void fireProfileLoaded(RenderProfileDataRow profile)
           
protected  void fireProfileUpdated(RenderProfileDataRow profile)
           
 RenderClipDataRow getClip(int clipId)
           
 java.io.InputStream getClipInputStream(int clipId)
           
 java.io.OutputStream getClipOutputStream(int clipId)
           
 RenderJobDataRow getJob(int jobId)
           
 java.io.InputStream getJobInputStream(int jobId)
           
 java.io.OutputStream getJobOutputStream(int jobId)
           
 ChunkedRandomAccessFile getJobRandomAccessFile(int jobId)
           
 RenderProfileDataRow getProfile(int profileId)
           
 java.io.InputStream getProfileInputStream(int profileId)
           
 java.io.OutputStream getProfileOutputStream(int profileId)
           
 ChunkedRandomAccessFile getProfileRandomAccessFile(int profileId)
           
 java.io.File getWorkspace()
           
 void importClip(RenderClipDataRow dataRow, java.io.File file)
           
 TwisterClip loadClip(RenderClipDataRow dataRow)
           
 java.util.List<RenderClipDataRow> loadClips()
           
 java.util.List<RenderJobDataRow> loadJobs()
           
 java.util.List<RenderProfileDataRow> loadProfiles(int clipId)
           
 void processDeleted(JobData jobData)
           
 void processStarted(JobData jobData)
           
 void processStopped(JobData jobData)
           
 void processTerminated(JobData jobData)
           
 void processUpdated(JobData jobData)
           
 void removeServiceListener(LibraryServiceListener listener)
           
 java.util.List<RenderProfileDataRow> resetProfiles(int clipId)
           
 void resumeJobs()
           
 void saveClip(RenderClipDataRow clip)
           
 void saveJob(RenderJobDataRow job)
           
 void saveJobStatus(RenderJobDataRow job)
           
 void saveProfile(RenderProfileDataRow profile)
           
 void startJobs()
           
 void startJobs(int profileId, ProgressListener listener, java.lang.String message, float percentage)
           
 void stopJobs()
           
 void stopJobs(int profileId, ProgressListener listener, java.lang.String message, float percentage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TILE_WIDTH

public static final int TILE_WIDTH
See Also:
Constant Field Values

TILE_HEIGHT

public static final int TILE_HEIGHT
See Also:
Constant Field Values
Constructor Detail

LibraryService

public LibraryService(Session session,
                      java.io.File workdir)
               throws RenderServiceException
Parameters:
session -
workdir -
Throws:
RenderServiceException
Method Detail

loadClips

public java.util.List<RenderClipDataRow> loadClips()
                                            throws RenderServiceException
Returns:
Throws:
RenderServiceException

createClip

public void createClip(RenderClipDataRow clip,
                       TwisterClip twisterClip)
                throws RenderServiceException
Parameters:
clip -
clip -
Throws:
RenderServiceException

saveClip

public void saveClip(RenderClipDataRow clip)
              throws RenderServiceException
Parameters:
clip -
Throws:
RenderServiceException

deleteClip

public void deleteClip(RenderClipDataRow clip)
                throws RenderServiceException
Parameters:
clip -
Throws:
RenderServiceException

getClip

public RenderClipDataRow getClip(int clipId)
                          throws RenderServiceException
Parameters:
clipId -
Returns:
Throws:
RenderServiceException

loadProfiles

public java.util.List<RenderProfileDataRow> loadProfiles(int clipId)
                                                  throws RenderServiceException
Parameters:
clipId -
Returns:
Throws:
RenderServiceException

resetProfiles

public java.util.List<RenderProfileDataRow> resetProfiles(int clipId)
                                                   throws RenderServiceException
Parameters:
clipId -
Returns:
Throws:
RenderServiceException

createProfile

public void createProfile(RenderProfileDataRow profile)
                   throws RenderServiceException
Parameters:
profile -
Throws:
RenderServiceException

saveProfile

public void saveProfile(RenderProfileDataRow profile)
                 throws RenderServiceException
Parameters:
profile -
Throws:
RenderServiceException

deleteProfile

public void deleteProfile(RenderProfileDataRow profile)
                   throws RenderServiceException
Parameters:
profile -
Throws:
RenderServiceException

getProfile

public RenderProfileDataRow getProfile(int profileId)
                                throws RenderServiceException
Parameters:
profileId -
Returns:
Throws:
RenderServiceException

loadJobs

public java.util.List<RenderJobDataRow> loadJobs()
                                          throws RenderServiceException
Returns:
Throws:
RenderServiceException

createJob

public void createJob(RenderJobDataRow job)
               throws RenderServiceException
Parameters:
job -
Throws:
RenderServiceException

saveJob

public void saveJob(RenderJobDataRow job)
             throws RenderServiceException
Parameters:
job -
Throws:
RenderServiceException

deleteJob

public void deleteJob(RenderJobDataRow job)
               throws RenderServiceException
Parameters:
job -
Throws:
RenderServiceException

getJob

public RenderJobDataRow getJob(int jobId)
                        throws RenderServiceException
Parameters:
jobId -
Returns:
Throws:
RenderServiceException

saveJobStatus

public void saveJobStatus(RenderJobDataRow job)
                   throws RenderServiceException
Parameters:
job -
Throws:
RenderServiceException

startJobs

public void startJobs()
               throws RenderServiceException
Throws:
RenderServiceException

stopJobs

public void stopJobs()
              throws RenderServiceException
Throws:
RenderServiceException

deleteJobs

public void deleteJobs()
                throws RenderServiceException
Throws:
RenderServiceException

startJobs

public void startJobs(int profileId,
                      ProgressListener listener,
                      java.lang.String message,
                      float percentage)
               throws RenderServiceException
Parameters:
profileId -
listener -
message -
percentage -
Throws:
RenderServiceException

stopJobs

public void stopJobs(int profileId,
                     ProgressListener listener,
                     java.lang.String message,
                     float percentage)
              throws RenderServiceException
Parameters:
profileId -
listener -
message -
percentage -
Throws:
RenderServiceException

resumeJobs

public void resumeJobs()
                throws RenderServiceException
Throws:
RenderServiceException

deleteJobs

public void deleteJobs(int profileId,
                       ProgressListener listener,
                       java.lang.String message,
                       float percentage)
                throws RenderServiceException
Parameters:
profileId -
listener -
percentage -
Throws:
RenderServiceException

createJobs

public void createJobs(int profileId,
                       ProgressListener listener,
                       java.lang.String message,
                       float percentage)
                throws RenderServiceException
Parameters:
profileId -
listener -
message -
percentage -
Throws:
RenderServiceException

processUpdated

public void processUpdated(JobData jobData)
                    throws RenderServiceException
Parameters:
job -
Throws:
RenderServiceException

processTerminated

public void processTerminated(JobData jobData)
                       throws RenderServiceException
Parameters:
job -
Throws:
RenderServiceException

processStarted

public void processStarted(JobData jobData)
                    throws RenderServiceException
Parameters:
job -
Throws:
RenderServiceException

processStopped

public void processStopped(JobData jobData)
                    throws RenderServiceException
Parameters:
job -
Throws:
RenderServiceException

processDeleted

public void processDeleted(JobData jobData)
                    throws RenderServiceException
Parameters:
job -
Throws:
RenderServiceException

deleteAll

public void deleteAll()
               throws RenderServiceException
Throws:
RenderServiceException

importClip

public void importClip(RenderClipDataRow dataRow,
                       java.io.File file)
                throws RenderServiceException
Parameters:
dataRow -
file -
Throws:
RenderServiceException

exportClip

public void exportClip(RenderClipDataRow dataRow,
                       java.io.File file)
                throws RenderServiceException
Parameters:
dataRow -
file -
Throws:
RenderServiceException

loadClip

public TwisterClip loadClip(RenderClipDataRow dataRow)
                     throws RenderServiceException
Parameters:
dataRow -
Returns:
Throws:
RenderServiceException

exportProfile

public void exportProfile(RenderProfileDataRow profile,
                          EncoderExtensionRuntime<?> encoder,
                          ProgressListener listener,
                          java.io.File path)
                   throws RenderServiceException
Parameters:
profile -
encoder -
listener -
path -
Throws:
RenderServiceException

addServiceListener

public void addServiceListener(LibraryServiceListener listener)
Parameters:
listener -

removeServiceListener

public void removeServiceListener(LibraryServiceListener listener)
Parameters:
listener -

fireClipCreated

protected void fireClipCreated(RenderClipDataRow clip)
Parameters:
clip -

fireClipDeleted

protected void fireClipDeleted(RenderClipDataRow clip)
Parameters:
clip -

fireClipUpdated

protected void fireClipUpdated(RenderClipDataRow clip)
Parameters:
clip -

fireClipLoaded

protected void fireClipLoaded(RenderClipDataRow clip)
Parameters:
clip -

fireProfileCreated

protected void fireProfileCreated(RenderProfileDataRow profile)
Parameters:
profile -

fireProfileDeleted

protected void fireProfileDeleted(RenderProfileDataRow profile)
Parameters:
profile -

fireProfileUpdated

protected void fireProfileUpdated(RenderProfileDataRow profile)
Parameters:
profile -

fireProfileLoaded

protected void fireProfileLoaded(RenderProfileDataRow profile)
Parameters:
profile -

fireJobCreated

protected void fireJobCreated(RenderJobDataRow job)
Parameters:
job -

fireJobDeleted

protected void fireJobDeleted(RenderJobDataRow job)
Parameters:
job -

fireJobUpdated

protected void fireJobUpdated(RenderJobDataRow job)
Parameters:
job -

fireJobStarted

protected void fireJobStarted(RenderJobDataRow job)
Parameters:
job -

fireJobAborted

protected void fireJobAborted(RenderJobDataRow job)
Parameters:
job -

fireJobStopped

protected void fireJobStopped(RenderJobDataRow job)
Parameters:
job -

fireJobResumed

protected void fireJobResumed(RenderJobDataRow job)
Parameters:
job -

getClipOutputStream

public java.io.OutputStream getClipOutputStream(int clipId)
                                         throws java.io.IOException
Parameters:
clipId -
Returns:
Throws:
java.io.IOException

getProfileOutputStream

public java.io.OutputStream getProfileOutputStream(int profileId)
                                            throws java.io.IOException
Parameters:
profileId -
Returns:
Throws:
java.io.IOException

getJobOutputStream

public java.io.OutputStream getJobOutputStream(int jobId)
                                        throws java.io.IOException
Parameters:
jobId -
Returns:
Throws:
java.io.IOException

getClipInputStream

public java.io.InputStream getClipInputStream(int clipId)
                                       throws java.io.IOException
Parameters:
clipId -
Returns:
Throws:
java.io.IOException

getProfileInputStream

public java.io.InputStream getProfileInputStream(int profileId)
                                          throws java.io.IOException
Parameters:
profileId -
Returns:
Throws:
java.io.IOException

getJobInputStream

public java.io.InputStream getJobInputStream(int jobId)
                                      throws java.io.IOException
Parameters:
jobId -
Returns:
Throws:
java.io.IOException

cleanClip

public void cleanClip(RenderClipDataRow clip)
               throws RenderServiceException
Parameters:
clip -
Throws:
RenderServiceException

cleanProfile

public void cleanProfile(RenderProfileDataRow profile)
                  throws RenderServiceException
Parameters:
profile -
Throws:
RenderServiceException

cleanJob

public void cleanJob(RenderJobDataRow job)
              throws RenderServiceException
Parameters:
job -
Throws:
RenderServiceException

getProfileRandomAccessFile

public ChunkedRandomAccessFile getProfileRandomAccessFile(int profileId)
                                                   throws java.io.IOException
Parameters:
profileId -
Returns:
Throws:
java.io.IOException

getJobRandomAccessFile

public ChunkedRandomAccessFile getJobRandomAccessFile(int jobId)
                                               throws java.io.IOException
Parameters:
jobId -
Returns:
Throws:
java.io.IOException

getWorkspace

public java.io.File getWorkspace()
Returns: