1 22 package org.objectweb.petals.jbi.management.deployment.undeploy; 23 24 import java.util.HashMap ; 25 26 import org.objectweb.petals.jbi.management.deployment.DeploymentContextConstants; 27 import org.objectweb.petals.jbi.management.deployment.ServiceAssemblyDataHandler; 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 34 40 public class XMLUndeploymentResultCreationTask implements Task { 41 42 @SuppressWarnings ("unchecked") 43 public void execute(HashMap context) throws Exception { 44 ServiceAssemblyDataHandler handler = (ServiceAssemblyDataHandler) context 45 .get(DeploymentContextConstants.SA_DATA_HANDLER); 46 47 XMLResult xmlResult = new XMLResult("undeploy"); 48 createFrameworkTaskResult(handler.getName(), xmlResult); 49 50 53 context.put(DeploymentContextConstants.XML_RESULT, xmlResult); 54 55 } 56 57 67 protected void createFrameworkTaskResult(String saName, XMLResult result) { 68 result.addFrameworkTaskResult(TaskResult.SUCCESS, MessageType.INFO, 69 "Successfully undeployed service assembly : {1}", 70 new String [] { saName }, CauseFramework.YES); 71 } 72 73 public void undo(HashMap context) throws Exception { 74 76 } 77 78 } 79 | Popular Tags |