public class ExecuteSystemCommandAction extends AbstractAction
This action is used execute a system command upon media files and directories
This action supports the following parameters:
Parameters can also have variable in them. These can be any of the pattern variables, as well as the following special variables:
Constructor and Description |
---|
ExecuteSystemCommandAction() |
Modifier and Type | Method and Description |
---|---|
protected void |
executeCommand(java.lang.String cmd,
java.io.File file,
MediaDirectory dir,
IVideo video) |
void |
perform(MediaDirectory dir,
IEpisode episode,
java.io.File mediaFile,
IActionEventHandler actionEventHandler)
This will execute the command in the parameter
|
void |
perform(MediaDirectory dir,
IFilm film,
java.io.File mediaFile,
java.lang.Integer part,
IActionEventHandler actionEventHandler)
This will execute the command in the parameter
|
void |
performOnDirectory(MediaDirectory dir,
java.io.File mediaDir,
IActionEventHandler actionEventHandler)
This will execute the command in the parameter
|
protected void |
sendEvents(IActionEventHandler actionEventHandler,
java.io.File mediaFile) |
void |
setParameter(java.lang.String key,
java.lang.String value)
This method is sued to set parameters.
|
finished, init, isTestMode, resolvePatterns, setTestMode
public void performOnDirectory(MediaDirectory dir, java.io.File mediaDir, IActionEventHandler actionEventHandler) throws ActionException
on
the directory if the parameter is set.
performOnDirectory
in interface IAction
performOnDirectory
in class AbstractAction
dir
- The media directorymediaDir
- The directory the action is to perform onactionEventHandler
- Used to notify the action performer about changesActionException
- Thrown if their is a problem with the actionprotected void executeCommand(java.lang.String cmd, java.io.File file, MediaDirectory dir, IVideo video) throws ActionException
ActionException
protected void sendEvents(IActionEventHandler actionEventHandler, java.io.File mediaFile) throws ActionException
ActionException
public void setParameter(java.lang.String key, java.lang.String value) throws ActionException
key
- The parameter keyvalue
- The parameter valueActionException
- Thrown if a known key is givenpublic void perform(MediaDirectory dir, IEpisode episode, java.io.File mediaFile, IActionEventHandler actionEventHandler) throws ActionException
on
the mediaFile if the parameter is set.
episode
- The episode informationmediaFile
- The media filedir
- File media directory the files belongs toactionEventHandler
- Used to notify the action performer about changesActionException
- Thrown if their is a problem with the actionpublic void perform(MediaDirectory dir, IFilm film, java.io.File mediaFile, java.lang.Integer part, IActionEventHandler actionEventHandler) throws ActionException
on
the mediaFile if the parameter is set.
film
- The film informationpart
- The part numbermediaFile
- The media filedir
- File media directory the files belongs toactionEventHandler
- Used to notify the action performer about changesActionException
- Thrown if their is a problem with the action