org.ow2.petals.jbi.management.task.deployment.deploy
Class ExtractSUsTask

java.lang.Object
  extended by org.ow2.petals.jbi.management.task.AbstractLoggableTask
      extended by org.ow2.petals.jbi.management.task.deployment.deploy.ExtractSUsTask
All Implemented Interfaces:
Task

public class ExtractSUsTask
extends AbstractLoggableTask

This task extracts service unit archives into the repository
Inputs : Jbi, parent service assembly install root URI
Outputs : SU install roots Map
The task has got a non-robust approach : it stops at the first subtask failed
and have the undo capability.

Author:
ofabre - EBM Websourcing, Frederic Gardes - eBM Websourcing

Field Summary
protected  RepositoryService repositoryService
          Platform Component :: Repository Service
 
Fields inherited from class org.ow2.petals.jbi.management.task.AbstractLoggableTask
log
 
Constructor Summary
ExtractSUsTask(org.ow2.petals.util.LoggingUtil log, RepositoryService repositoryService)
           
 
Method Summary
 void execute(Context context)
          Launch the task with the given context.
protected  java.net.URL expandSUIntoSA(java.lang.String suId, java.net.URL suZipLocation, java.lang.String saId)
          Expand a service unit package into its service assembly installRoot.
protected  java.util.Map<java.lang.String,java.net.URL> expandSUs(java.net.URL saInstallUrl, org.ow2.petals.jbi.descriptor.original.generated.Jbi descriptor)
          Explode service unit packages into the repository
 void undo(Context context)
          Reverse the task in order to retrieve the environ state before execution of this task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repositoryService

protected RepositoryService repositoryService
Platform Component :: Repository Service

Constructor Detail

ExtractSUsTask

public ExtractSUsTask(org.ow2.petals.util.LoggingUtil log,
                      RepositoryService repositoryService)
Method Detail

execute

public void execute(Context context)
             throws java.lang.Exception
Description copied from interface: Task
Launch the task with the given context. Task can modify information included in this context during execution.

Parameters:
context - the execution context handling input and output information
Throws:
java.lang.Exception - if an error occurs during Task processing

expandSUs

protected java.util.Map<java.lang.String,java.net.URL> expandSUs(java.net.URL saInstallUrl,
                                                                 org.ow2.petals.jbi.descriptor.original.generated.Jbi descriptor)
                                                          throws ManagementException,
                                                                 org.ow2.petals.kernel.api.server.PetalsException,
                                                                 java.net.MalformedURLException
Explode service unit packages into the repository

Parameters:
saInstallRoot - the root URI of the service assembly
descriptor - the service assembly descriptor
Returns:
the map containing all su install roots
Throws:
ManagementException - if the repository service doesn't manage to expend SU archive
org.ow2.petals.kernel.api.server.PetalsException
java.net.MalformedURLException

expandSUIntoSA

protected java.net.URL expandSUIntoSA(java.lang.String suId,
                                      java.net.URL suZipLocation,
                                      java.lang.String saId)
                               throws ManagementException
Expand a service unit package into its service assembly installRoot.

Parameters:
suId - the unique identifier of the su
suZipLocation - URI representing the su zip location
saId - the unique identifier of the sa
Returns:
SU installationRoot, null if it fails
Throws:
ManagementException - if it fails to expend the su package to the repository

undo

public void undo(Context context)
          throws java.lang.Exception
Description copied from interface: Task
Reverse the task in order to retrieve the environ state before execution of this task.

Parameters:
context - the execution context handling input and output information
Throws:
java.lang.Exception - if an error occurs during Task unprocessing


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.