public class RenameAction extends AbstractAction
This action is used to rename media files in a media directory based on a pattern.
This action supports the following parameters
Constructor and Description |
---|
RenameAction() |
Modifier and Type | Method and Description |
---|---|
void |
perform(MediaDirectory dir,
IEpisode episode,
java.io.File mediaFile,
IActionEventHandler actionEventHandler)
Perform the rename action of the file files
|
void |
perform(MediaDirectory dir,
IFilm film,
java.io.File mediaFile,
java.lang.Integer part,
IActionEventHandler actionEventHandler)
Perform the rename action of the file files
|
void |
performOnDirectory(MediaDirectory mediaDir,
java.io.File dir,
IActionEventHandler actionEventHandler)
If the "pruneEmptyFolders" option has been set, then this will delete any empty
directories it finds.
|
void |
setParameter(java.lang.String key,
java.lang.String value)
Used to set the value of a parameter for this action.
|
finished, init, isTestMode, resolvePatterns, setTestMode
public void perform(MediaDirectory dir, IFilm film, java.io.File mediaFile, java.lang.Integer part, IActionEventHandler actionEventHandler) throws ActionException
film
- The film informationpart
- The part number of the film, or null if it does not have partsmediaFile
- 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, IEpisode episode, java.io.File mediaFile, IActionEventHandler actionEventHandler) throws ActionException
episode
- The film 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 setParameter(java.lang.String key, java.lang.String value) throws ActionException
Used to set the value of a parameter for this action.
This action supports the following parameters
key
- The key of the parametervalue
- The value of the parameterActionException
- Thrown if their is a problem setting the parameterpublic void performOnDirectory(MediaDirectory mediaDir, java.io.File dir, IActionEventHandler actionEventHandler) throws ActionException
performOnDirectory
in interface IAction
performOnDirectory
in class AbstractAction
mediaDir
- The media directorydir
- The directory been checkedactionEventHandler
- Thrown if their is a problem with the actionActionException
- Thrown if their is a problem with the action