Search in sources :

Example 1 with RenamerPlugin

use of jack.rm.plugins.types.RenamerPlugin in project rom-manager by Jakz.

the class Organizer method organize.

public void organize() {
    RenamerPlugin renamer = settings().getRenamer();
    FolderPlugin organizerPlugin = settings().getFolderOrganizer();
    boolean hasCleanupPhase = settings().hasCleanupPlugins();
    Consumer<Boolean> cleanupPhase = b -> {
        cleanup();
        Main.setManager.saveSetStatus(set);
    };
    Consumer<Boolean> moverPhase = organizerPlugin == null ? cleanupPhase : b -> new MoverWorker(set, organizerPlugin, cleanupPhase).execute();
    Consumer<Boolean> renamerPhase = renamer == null ? moverPhase : b -> new RenamerWorker(set, renamer, moverPhase).execute();
    renamerPhase.accept(true);
}
Also used : CleanupPlugin(jack.rm.plugins.types.CleanupPlugin) RenamerPlugin(jack.rm.plugins.types.RenamerPlugin) Files(java.nio.file.Files) LogSource(jack.rm.log.LogSource) LogTarget(jack.rm.log.LogTarget) PluginRealType(jack.rm.plugins.PluginRealType) DecimalFormat(java.text.DecimalFormat) Game(com.github.jakz.romlib.data.game.Game) Set(java.util.Set) MyGameSetFeatures(jack.rm.data.romset.MyGameSetFeatures) FolderPlugin(jack.rm.plugins.folder.FolderPlugin) TreeSet(java.util.TreeSet) Handle(com.pixbits.lib.io.archive.handles.Handle) Consumer(java.util.function.Consumer) GameSet(com.github.jakz.romlib.data.set.GameSet) Logger(com.pixbits.lib.log.Logger) Log(com.pixbits.lib.log.Log) GameSetFeatures(com.github.jakz.romlib.data.set.GameSetFeatures) PatternSetPlugin(jack.rm.plugins.types.PatternSetPlugin) Path(java.nio.file.Path) Main(jack.rm.Main) Settings(jack.rm.data.romset.Settings) RenamerPlugin(jack.rm.plugins.types.RenamerPlugin) FolderPlugin(jack.rm.plugins.folder.FolderPlugin)

Aggregations

Game (com.github.jakz.romlib.data.game.Game)1 GameSet (com.github.jakz.romlib.data.set.GameSet)1 GameSetFeatures (com.github.jakz.romlib.data.set.GameSetFeatures)1 Handle (com.pixbits.lib.io.archive.handles.Handle)1 Log (com.pixbits.lib.log.Log)1 Logger (com.pixbits.lib.log.Logger)1 Main (jack.rm.Main)1 MyGameSetFeatures (jack.rm.data.romset.MyGameSetFeatures)1 Settings (jack.rm.data.romset.Settings)1 LogSource (jack.rm.log.LogSource)1 LogTarget (jack.rm.log.LogTarget)1 PluginRealType (jack.rm.plugins.PluginRealType)1 FolderPlugin (jack.rm.plugins.folder.FolderPlugin)1 CleanupPlugin (jack.rm.plugins.types.CleanupPlugin)1 PatternSetPlugin (jack.rm.plugins.types.PatternSetPlugin)1 RenamerPlugin (jack.rm.plugins.types.RenamerPlugin)1 Files (java.nio.file.Files)1 Path (java.nio.file.Path)1 DecimalFormat (java.text.DecimalFormat)1 Set (java.util.Set)1