*/
public InvocationResponse handleStream(InputStream contentIS, InvocationRequest request) throws Throwable
{
// Get the deployment repository for this deploymentID
SerializableDeploymentID deploymentTarget = (SerializableDeploymentID) request.getParameter();
DeploymentRepository deploymentRepository = getDeploymentRepository(deploymentTarget);
// Start to handle stream
log.info("Handle stream, deploymentTarget: " + deploymentTarget);
deploymentTarget.setContentIS(contentIS);
String[] names = deploymentTarget.getNames();
// Add deployment content to the repository
String repositoryName = deploymentRepository.addDeploymentContent(names[0], contentIS,
deploymentTarget.getDeploymentOptions());
// FIXME make deployment visible to management view
VirtualFile vf = deploymentRepository.getDeploymentContent(repositoryName);
ProfileDeployment deployment = createDeployment(vf);
deploymentRepository.addDeployment(deployment.getName(), deployment);
deploymentRepository.lockDeploymentContent(deployment.getName());
log.info("End handle stream, repositoryName: " + repositoryName);
// Return the repository names
String[] rnames = {repositoryName};
deploymentTarget.setRepositoryNames(rnames);