1 22 package org.objectweb.petals.jbi.management.deployment.deploy; 23 24 import java.util.HashMap ; 25 26 import org.objectweb.petals.jbi.management.deployment.DeploymentContextConstants; 27 import org.objectweb.petals.jbi.management.deployment.DeploymentUtils; 28 import org.objectweb.petals.jbi.management.service.util.XMLResult; 29 import org.objectweb.petals.jbi.management.service.util.XMLResult.CauseFramework; 30 import org.objectweb.petals.jbi.management.service.util.XMLResult.MessageType; 31 import org.objectweb.petals.jbi.management.service.util.XMLResult.TaskResult; 32 import org.objectweb.petals.processor.Task; 33 import org.objectweb.petals.tools.jbicommon.descriptor.JBIDescriptor; 34 35 46 public class XMLDeploymentResultCreationTask implements Task { 47 48 @SuppressWarnings ("unchecked") 49 public void execute(HashMap context) throws Exception { 50 JBIDescriptor descriptor = (JBIDescriptor) context 51 .get(DeploymentContextConstants.SA_DESCRIPTOR); 52 53 XMLResult xmlResult = new XMLResult("deploy"); 54 createFrameworkTaskResult(DeploymentUtils 55 .getServiceAssemblyName(descriptor), xmlResult); 56 57 60 context.put(DeploymentContextConstants.XML_RESULT, xmlResult); 61 62 } 63 64 74 protected void createFrameworkTaskResult(String saName, XMLResult result) { 75 result.addFrameworkTaskResult(TaskResult.SUCCESS, MessageType.INFO, 76 "Successfully deployed service assembly : {1}", 77 new String [] {saName}, CauseFramework.YES); 78 } 79 80 public void undo(HashMap context) { 81 83 } 84 85 } 86 | Popular Tags |