1 22 package org.objectweb.petals.jbi.management.deployment.deploy; 23 24 import java.net.URI ; 25 import java.util.HashMap ; 26 27 import org.objectweb.petals.jbi.management.deployment.DeploymentContextConstants; 28 import org.objectweb.petals.jbi.management.service.PackageHandler; 29 import org.objectweb.petals.processor.Task; 30 import org.objectweb.petals.tools.jbicommon.descriptor.JBIDescriptor; 31 32 39 public class DescriptorAndURIRetrievalTask implements Task { 40 41 44 protected PackageHandler packageHandler; 45 46 public DescriptorAndURIRetrievalTask(PackageHandler packageHandler) { 47 super(); 48 this.packageHandler = packageHandler; 49 } 50 51 @SuppressWarnings ("unchecked") 52 public void execute(HashMap context) throws Exception { 53 54 String archiveURL = (String ) context 55 .get(DeploymentContextConstants.ARCHIVE_URL); 56 57 60 URI archiveURI = packageHandler.processAndGetPackageURI(archiveURL, 61 true); 62 63 66 JBIDescriptor descriptor = packageHandler.loadDescriptor(archiveURI); 67 68 71 context.put(DeploymentContextConstants.ARCHIVE_URI, archiveURI); 72 context.put(DeploymentContextConstants.SA_DESCRIPTOR, descriptor); 73 74 } 75 76 public void undo(HashMap context) { 77 79 } 80 81 } 82 | Popular Tags |