X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fmeviz%2Frenamer%2FMain.java;h=39ae0c0e332d94c38d93105d5b03e01a2a283570;hb=567410640f4e0428caf9de9fc83df4c73f0e5067;hp=6495e0f3bd9538e6852f91c3ed694fb3f06dd57a;hpb=1b742640af99284aae1cd10c259254137316ba7c;p=meviz.git diff --git a/src/main/java/eu/svjatoslav/meviz/renamer/Main.java b/src/main/java/eu/svjatoslav/meviz/renamer/Main.java index 6495e0f..39ae0c0 100755 --- a/src/main/java/eu/svjatoslav/meviz/renamer/Main.java +++ b/src/main/java/eu/svjatoslav/meviz/renamer/Main.java @@ -1,11 +1,11 @@ /* * Meviz - Various tools collection to work with multimedia. - * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu - * + * Copyright (C) 2012 -- 2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public License - * as published by the Free Software Foundation. - */ + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. +*/ package eu.svjatoslav.meviz.renamer; @@ -17,16 +17,16 @@ import java.util.Arrays; public class Main implements Module { - public int processedFilesCount; - CommandlineHandler commandlineHandler = new CommandlineHandler(); - RenamingOptions options; + private final CommandlineHandler commandlineHandler = new CommandlineHandler(); + private int processedFilesCount; + private RenamingOptions options; /** * Verify that program has enough information to start executing * * @return true if all is ok, false if errors were found */ - public boolean checkThatThereIsEnoughDataToProceed() { + private boolean checkThatThereIsEnoughDataToProceed() { if (options.inputPatterns.size() == 0) { System.out.println("Error: no input patterns given."); return false; @@ -40,7 +40,7 @@ public class Main implements Module { return true; } - public boolean fileMatchesInputPattern(final File file) { + private boolean fileMatchesInputPattern(final File file) { final String fileName = file.getName(); for (final String inputPattern : options.inputPatterns) @@ -119,7 +119,7 @@ public class Main implements Module { } } - public void processFileOrDirectory(final File file) { + private void processFileOrDirectory(final File file) { if (!file.exists()) { System.out.println("Error: file \"" + file.getAbsolutePath() + "\" does not exist."); @@ -134,7 +134,7 @@ public class Main implements Module { } - public void rename() { + private void rename() { processFileOrDirectory(options.targetDirectory); }