org.ow2.petals.jbi.management.task
Class AbstractCopyPackageToRepositoryTask
java.lang.Object
org.ow2.petals.jbi.management.task.AbstractLoggableTask
org.ow2.petals.jbi.management.task.AbstractCopyPackageToRepositoryTask
- All Implemented Interfaces:
- Task
- Direct Known Subclasses:
- CreateComponentRepositoryTask, CreateSARepositoryTask, CreateSLRepositoryTask
public abstract class AbstractCopyPackageToRepositoryTask
- extends AbstractLoggableTask
This task copy unzipped entity (component, shared lib, service assembly)
package into the repository
Inputs : Jbi, unzipped package root File
Outputs : entity install root URI
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
|
Method Summary |
protected abstract java.io.File |
copyEntityPackage(java.lang.String entityName,
java.lang.String entityVersion,
java.io.File packageFile)
|
protected java.io.File |
copyPackage(java.lang.String entityName,
java.lang.String entityVersion,
java.io.File packageFile)
Expand the given package into the system repository |
void |
execute(Context context)
Launch the task with the given context. |
protected abstract void |
removeEntityPackage(java.lang.String entityName,
java.lang.String entityVersion)
|
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 |
repositoryService
protected RepositoryService repositoryService
- Platform Component :: Repository Service
AbstractCopyPackageToRepositoryTask
public AbstractCopyPackageToRepositoryTask(org.ow2.petals.util.LoggingUtil log,
RepositoryService repositoryService)
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
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
copyPackage
protected java.io.File copyPackage(java.lang.String entityName,
java.lang.String entityVersion,
java.io.File packageFile)
throws ManagementException
- Expand the given package into the system repository
- Parameters:
descriptor - jbi descriptor of the entitypackageFile - the entity package root file
- Returns:
- return installation URI of the expanded package, null if it fails
- Throws:
ManagementException - if the package copy fails or if returned install root is null
copyEntityPackage
protected abstract java.io.File copyEntityPackage(java.lang.String entityName,
java.lang.String entityVersion,
java.io.File packageFile)
throws java.io.IOException,
RepositoryException
- Throws:
java.io.IOException
RepositoryException
removeEntityPackage
protected abstract void removeEntityPackage(java.lang.String entityName,
java.lang.String entityVersion)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.