1 22 package org.objectweb.petals.jbi.management.deployment; 23 24 import java.io.File ; 25 import java.net.URI ; 26 27 import org.objectweb.petals.jbi.management.autoload.AutoLoaderImpl; 28 import org.objectweb.petals.tools.jbicommon.descriptor.JBIDescriptor; 29 import org.objectweb.petals.tools.jbicommon.descriptor.ServiceUnit; 30 31 public class DeploymentUtils { 32 33 41 public static String getServiceAssemblyName(JBIDescriptor descriptor) { 42 return descriptor.getServiceAssembly().getIdentification().getName(); 43 } 44 45 52 public static String getServiceUnitName(ServiceUnit serviceUnit) { 53 return serviceUnit.getIdentification().getName(); 54 } 55 56 64 public static String getServiceUnitTargetedComponent(ServiceUnit serviceUnit) { 65 return serviceUnit.getTargetComponentName(); 66 } 67 68 75 public static File getArchiveFile(URI archiveURI) { 76 return new File (archiveURI); 77 } 78 79 86 public static File getInstalledArchive(File file) { 87 return new File (AutoLoaderImpl.getInstalledDirectory(), file.getName()); 88 } 89 90 } 91 | Popular Tags |