[jboss-cvs] JBossAS SVN: r101137 - projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 18 18:36:41 EST 2010


Author: alesj
Date: 2010-02-18 18:36:41 -0500 (Thu, 18 Feb 2010)
New Revision: 101137

Modified:
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSArchiveStructureDeployer.java
Log:
Reformat code.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSArchiveStructureDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSArchiveStructureDeployer.java	2010-02-18 23:28:27 UTC (rev 101136)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSArchiveStructureDeployer.java	2010-02-18 23:36:41 UTC (rev 101137)
@@ -21,8 +21,6 @@
  */
 package org.jboss.deployers.vfs.plugins.structure;
 
-import java.io.IOException;
-
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
 import org.jboss.deployers.vfs.spi.structure.StructureDeployer;
@@ -30,17 +28,18 @@
 import org.jboss.vfs.util.automount.Automounter;
 import org.jboss.vfs.util.automount.MountOption;
 
+import java.io.IOException;
+
 /**
- * Abstract {@link StructureDeployer} used to help mount VFS archive based {@link StructureDeployer}s.     
- *  
+ * Abstract {@link StructureDeployer} used to help mount VFS archive based {@link StructureDeployer}s.
+ *
  * @author <a href="jbailey at redhat.com">John Bailey</a>
  */
 public abstract class AbstractVFSArchiveStructureDeployer extends AbstractVFSStructureDeployer
 {
-
    /**
     * Determine the structure of a deployment invoking the Automounter for archive files.
-    * 
+    *
     * @param context the structure context
     * @return true when it recognized the context
     * @throws DeploymentException for an error
@@ -51,7 +50,8 @@
       boolean valid = false;
       try
       {
-         if(root.isFile()) {
+         if (root.isFile())
+         {
             if (shouldMount(root) == false || mountArchive(root) == false)
             {
                return false;
@@ -66,7 +66,7 @@
       }
       finally
       {
-         if (!valid)
+         if (valid == false)
          {
             Automounter.cleanup(root);
          }
@@ -76,48 +76,50 @@
 
    /**
     * Template method for VFS archive structure deployers to determine the structure once the archive has been mounted.
-    * 
+    *
     * @param context the structure context
     * @return true if the structure was determined
-    * @throws DeploymentException
+    * @throws DeploymentException for any deployment error
     */
    protected abstract boolean doDetermineStructure(StructureContext context) throws DeploymentException;
 
    /**
-    * Determine whether the {@link VirtualFile} has a name that matches this structure.  
-    * Defaults to just checking the suffix. 
-    * 
+    * Determine whether the {@link VirtualFile} has a name that matches this structure.
+    * Defaults to just checking the suffix.
+    *
     * @param root the {@link VirtualFile} root to check
     * @return true if the file name is valid for this {@link StructureDeployer}
     */
-   protected boolean hasValidName(VirtualFile root) {
+   protected boolean hasValidName(VirtualFile root)
+   {
       return hasValidSuffix(root.getName());
    }
-   
+
    /**
     * Template method for VFS archive structure deployers to correctly match file suffixes for their archive type.
-    * 
+    *
     * @param name the name of the file
     * @return true if the file matches the required pattern
     */
    protected abstract boolean hasValidSuffix(String name);
-   
+
    /**
-    * Determine whether to mount the archive. 
-    * 
+    * Determine whether to mount the archive.
+    *
     * @param virtualFile to check
     * @return true if the {@link VirtualFile} should be mounted
     */
-   protected boolean shouldMount(VirtualFile virtualFile) {
+   protected boolean shouldMount(VirtualFile virtualFile)
+   {
       return virtualFile.isFile() && hasValidName(virtualFile);
    }
 
    /**
     * Mounts the the provided file as an archive using the {@link Automounter}
-    * 
+    *
     * @param file the file to mount
-    * @return true if the mount was successful 
-    * @throws DeploymentException
+    * @return true if the mount was successful
+    * @throws DeploymentException for any deployment error
     */
    private boolean mountArchive(VirtualFile file) throws DeploymentException
    {
@@ -131,9 +133,15 @@
       }
       return true;
    }
-   
-   protected void performMount(VirtualFile file) throws IOException {
+
+   /**
+    * Perform mount.
+    *
+    * @param file the file to mount
+    * @throws IOException for any IO error
+    */
+   protected void performMount(VirtualFile file) throws IOException
+   {
       Automounter.mount(file, MountOption.COPY);
    }
-
 }




More information about the jboss-cvs-commits mailing list