reformat
[jSite2.git] / src / net / pterodactylus / jsite / project / Project.java
index 305e8ef..22e66d8 100644 (file)
@@ -250,6 +250,18 @@ public class Project extends AbstractBean {
        /**
         * Adds a file override for the given file.
         * 
+        * @param projectFile
+        *            The file
+        * @param override
+        *            The override for the file
+        */
+       public void addFileOverride(ProjectFile projectFile, FileOverride override) {
+               addFileOverride(projectFile.getCompletePath(), override);
+       }
+
+       /**
+        * Adds a file override for the given file.
+        * 
         * @param filePath
         *            The file path
         * @param override
@@ -262,6 +274,16 @@ public class Project extends AbstractBean {
        /**
         * Removes the file override for the given file.
         * 
+        * @param projectFile
+        *            The file for which to remove the override
+        */
+       public void removeFileOverride(ProjectFile projectFile) {
+               removeFileOverride(projectFile.getCompletePath());
+       }
+
+       /**
+        * Removes the file override for the given file.
+        * 
         * @param filePath
         *            The file path for which to remove the override
         */
@@ -278,7 +300,7 @@ public class Project extends AbstractBean {
         *         not have an override
         */
        public FileOverride getFileOverride(ProjectFile projectFile) {
-               return fileOverrides.get(projectFile.getCompletePath());
+               return getFileOverride(projectFile.getCompletePath());
        }
 
        /**
@@ -338,7 +360,7 @@ public class Project extends AbstractBean {
                }
                String[] pathParts = completePath.split("\\" + File.separator);
                ProjectFileImpl currentProjectFile = rootProjectFile;
-               for (String pathPart: pathParts) {
+               for (String pathPart : pathParts) {
                        currentProjectFile = currentProjectFile.getFile(pathPart);
                        if (currentProjectFile == null) {
                                return null;
@@ -365,7 +387,7 @@ public class Project extends AbstractBean {
                if (!directory.isDirectory()) {
                        return;
                }
-               for (File file: directory.listFiles()) {
+               for (File file : directory.listFiles()) {
                        ProjectFileImpl projectFileChild = projectFile.addFile(file.getName(), file.length(), file.isDirectory(), file.isHidden());
                        if (file.isDirectory()) {
                                scanDirectory(file, projectFileChild);
@@ -509,7 +531,7 @@ public class Project extends AbstractBean {
                        if (!isDirectory()) {
                                return null;
                        }
-                       for (ProjectFileImpl projectFile: childProjectFiles) {
+                       for (ProjectFileImpl projectFile : childProjectFiles) {
                                if (projectFile.getName().equals(name)) {
                                        return projectFile;
                                }