org.stanwood.media.actions.podcast
Class PodCastAction

java.lang.Object
  extended by org.stanwood.media.actions.AbstractAction
      extended by org.stanwood.media.actions.podcast.PodCastAction
All Implemented Interfaces:
IAction, IExtension

public class PodCastAction
extends AbstractAction

This action is used create a pod cast of media that it finds. It will add order the most recent media files by the date they were last modified.

This action supports the following parameters:

Parameters can also have variable in them. The following variables cane be used:


Constructor Summary
PodCastAction()
           
 
Method Summary
protected  void addFileToList(IFeedFile feedFile)
           
 void finished(MediaDirectory dir)
          Used to write the podcast
 void init(MediaDirectory dir)
          Used to setup the action and parse the podcast if it already exists
protected  void parseFeed(IVideo video, java.io.File mediaFile, java.lang.Integer part)
           
 void perform(MediaDirectory dir, IEpisode episode, java.io.File mediaFile, IActionEventHandler actionEventHandler)
          Used to perform the action upon a TV episode file.
 void perform(MediaDirectory dir, IFilm film, java.io.File mediaFile, java.lang.Integer part, IActionEventHandler actionEventHandler)
          Used to perform the action upon a film file.
 void setParameter(java.lang.String key, java.lang.String value)
          Used to set parameters on the action
protected  void writeFeed(java.io.File feedFile)
           
 
Methods inherited from class org.stanwood.media.actions.AbstractAction
isTestMode, performOnDirectory, resolvePatterns, setTestMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PodCastAction

public PodCastAction()
Method Detail

init

public void init(MediaDirectory dir)
          throws ActionException
Used to setup the action and parse the podcast if it already exists

Specified by:
init in interface IAction
Overrides:
init in class AbstractAction
Parameters:
dir - The media directory
Throws:
ActionException - Thrown if their are any problems

parseFeed

protected void parseFeed(IVideo video,
                         java.io.File mediaFile,
                         java.lang.Integer part)
                  throws ActionException
Throws:
ActionException

writeFeed

protected void writeFeed(java.io.File feedFile)
                  throws ActionException
Throws:
ActionException

perform

public void perform(MediaDirectory dir,
                    IEpisode episode,
                    java.io.File mediaFile,
                    IActionEventHandler actionEventHandler)
             throws ActionException
Used to perform the action upon a TV episode file.

Parameters:
dir - File media directory the files belongs to
episode - The episode information
mediaFile - The media file
actionEventHandler - Used to notify the action performer about changes
Throws:
ActionException - Thrown if their is a problem with the action

perform

public void perform(MediaDirectory dir,
                    IFilm film,
                    java.io.File mediaFile,
                    java.lang.Integer part,
                    IActionEventHandler actionEventHandler)
             throws ActionException
Used to perform the action upon a film file.

Parameters:
dir - File media directory the files belongs to
film - The film information
mediaFile - The media file
part - The part number of the film, or null if it does not have parts
actionEventHandler - Used to notify the action performer about changes
Throws:
ActionException - Thrown if their is a problem with the action

addFileToList

protected void addFileToList(IFeedFile feedFile)

finished

public void finished(MediaDirectory dir)
              throws ActionException
Used to write the podcast

Specified by:
finished in interface IAction
Overrides:
finished in class AbstractAction
Parameters:
dir - The media directory
Throws:
ActionException - Thrown if their are any problems

setParameter

public void setParameter(java.lang.String key,
                         java.lang.String value)
                  throws ActionException

Used to set parameters on the action

Parameters:
key - The key of the parameter
value - The value of the parameter
Throws:
ActionException - Thrown if their is a problem setting the parameter