[jboss-cvs] JBossAS SVN: r83898 - in projects/jboss-deployers/trunk: deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 5 08:40:58 EST 2009


Author: alesj
Date: 2009-02-05 08:40:58 -0500 (Thu, 05 Feb 2009)
New Revision: 83898

Added:
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarModificationAction.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarTopModificationTypeMatcher.java
Modified:
   projects/jboss-deployers/trunk/deployers-core-spi/src/main/java/org/jboss/deployers/spi/structure/ModificationType.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationActions.java
Log:
Add unjar modification.

Modified: projects/jboss-deployers/trunk/deployers-core-spi/src/main/java/org/jboss/deployers/spi/structure/ModificationType.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-core-spi/src/main/java/org/jboss/deployers/spi/structure/ModificationType.java	2009-02-05 13:37:48 UTC (rev 83897)
+++ projects/jboss-deployers/trunk/deployers-core-spi/src/main/java/org/jboss/deployers/spi/structure/ModificationType.java	2009-02-05 13:40:58 UTC (rev 83898)
@@ -33,7 +33,8 @@
 {
    UNPACK,
    EXPLODE,
-   TEMP;
+   TEMP,
+   UNJAR;
 
    /**
     * Get the modification type.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationActions.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationActions.java	2009-02-05 13:37:48 UTC (rev 83897)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationActions.java	2009-02-05 13:40:58 UTC (rev 83898)
@@ -27,6 +27,8 @@
 import org.jboss.deployers.spi.structure.ModificationType;
 
 /**
+ * Modification actions.
+ *
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
  */
 public class ModificationActions
@@ -39,6 +41,7 @@
       actions.put(ModificationType.UNPACK, new UnpackModificationAction());
       actions.put(ModificationType.EXPLODE, new ExplodeModificationAction());
       actions.put(ModificationType.TEMP, new TempModificationAction());
+      actions.put(ModificationType.UNJAR, new UnjarModificationAction());
    }
 
    /**

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarModificationAction.java (from rev 83617, projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/TempModificationAction.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarModificationAction.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarModificationAction.java	2009-02-05 13:40:58 UTC (rev 83898)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.deployers.vfs.plugins.structure.modify;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VFSUtils;
+
+/**
+ * Unjar modification action.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+class UnjarModificationAction implements ModificationAction
+{
+   public VirtualFile modify(VirtualFile original) throws IOException, URISyntaxException
+   {
+      return VFSUtils.unjar(original);
+   }
+}
\ No newline at end of file


Property changes on: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarModificationAction.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarTopModificationTypeMatcher.java (from rev 83617, projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/TempTopModificationTypeMatcher.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarTopModificationTypeMatcher.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarTopModificationTypeMatcher.java	2009-02-05 13:40:58 UTC (rev 83898)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.deployers.vfs.plugins.structure.modify;
+
+import org.jboss.deployers.spi.structure.ModificationType;
+
+/**
+ * Unjar top modification type matcher.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class UnjarTopModificationTypeMatcher extends FileModificationTypeMatcher
+{
+   public UnjarTopModificationTypeMatcher(String... paths)
+   {
+      super(paths);
+      setCheckChildren(true);
+      setModificationType(ModificationType.UNJAR);
+      setTopLevelOnly(true);
+   }
+}
\ No newline at end of file


Property changes on: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarTopModificationTypeMatcher.java
___________________________________________________________________
Name: svn:mergeinfo
   + 




More information about the jboss-cvs-commits mailing list