avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject svn commit: rev 36109 - avalon/trunk/planet/facilities/console/commands/src/main/org/apache/avalon/facilities/console/commands
Date Mon, 09 Aug 2004 12:07:18 GMT
Author: niclas
Date: Mon Aug  9 05:07:18 2004
New Revision: 36109

Modified:
   avalon/trunk/planet/facilities/console/commands/src/main/org/apache/avalon/facilities/console/commands/DeployCmd.java
   avalon/trunk/planet/facilities/console/commands/src/main/org/apache/avalon/facilities/console/commands/RedeployCmd.java
Log:
Ooops, removed the code in the wrong file yesterday.

Modified: avalon/trunk/planet/facilities/console/commands/src/main/org/apache/avalon/facilities/console/commands/DeployCmd.java
==============================================================================
--- avalon/trunk/planet/facilities/console/commands/src/main/org/apache/avalon/facilities/console/commands/DeployCmd.java
(original)
+++ avalon/trunk/planet/facilities/console/commands/src/main/org/apache/avalon/facilities/console/commands/DeployCmd.java
Mon Aug  9 05:07:18 2004
@@ -95,6 +95,29 @@
     public void execute( CommandInterpreter intp, BufferedReader input, BufferedWriter output,
String[] arguments )
         throws Exception
     {
+        if( arguments.length == 0 )
+            throw new CommandException( "block must be specified." );
+        
+        String block = arguments[0];
+        ContainmentModel current = intp.getCurrentContainer();
+        String target = current.getQualifiedName();
+        if( arguments.length > 0 )
+            target = arguments[1];
+        DeploymentModel model = current.getModel( target );
+        if( model == null )
+            throw new CommandException( "target not found:" + target );
+
+        if( model instanceof ContainmentModel )
+        {
+            URL blockUrl = UrlUtils.resolveURL( m_WorkingDir, block );
+            ContainmentModel container = (ContainmentModel) model;
+            ContainmentModel newContainer = container.addContainmentModel( blockUrl );
+            newContainer.commission();
+            intp.setCurrentContainer( newContainer );
+        }
+        else
+            throw new CommandException( "Can only deploy into a container." );
+        
         output.newLine();
         output.flush();
     }

Modified: avalon/trunk/planet/facilities/console/commands/src/main/org/apache/avalon/facilities/console/commands/RedeployCmd.java
==============================================================================
--- avalon/trunk/planet/facilities/console/commands/src/main/org/apache/avalon/facilities/console/commands/RedeployCmd.java
(original)
+++ avalon/trunk/planet/facilities/console/commands/src/main/org/apache/avalon/facilities/console/commands/RedeployCmd.java
Mon Aug  9 05:07:18 2004
@@ -95,28 +95,6 @@
     public void execute( CommandInterpreter intp, BufferedReader input, BufferedWriter output,
String[] arguments )
         throws Exception
     {
-        if( arguments.length == 0 )
-            throw new CommandException( "block must be specified." );
-        
-        String block = arguments[0];
-        ContainmentModel current = intp.getCurrentContainer();
-        String target = current.getQualifiedName();
-        if( arguments.length > 0 )
-            target = arguments[1];
-        DeploymentModel model = current.getModel( target );
-        if( model == null )
-            throw new CommandException( "target not found:" + target );
-
-        if( model instanceof ContainmentModel )
-        {
-            URL blockUrl = UrlUtils.resolveURL( m_WorkingDir, block );
-            ContainmentModel container = (ContainmentModel) model;
-            ContainmentModel newContainer = container.addContainmentModel( blockUrl );
-            newContainer.commission();
-            intp.setCurrentContainer( newContainer );
-        }
-        else
-            throw new CommandException( "Can only deploy into a container." );
         output.newLine();
         output.flush();
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message