You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ni...@apache.org on 2004/08/09 14:07:18 UTC

svn commit: rev 36109 - avalon/trunk/planet/facilities/console/commands/src/main/org/apache/avalon/facilities/console/commands

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