1 2 24 package org.enhydra.tool.archive.wizard; 25 26 import org.enhydra.tool.ToolBoxInfo; 30 import org.enhydra.tool.archive.ServicePlan; 31 import org.enhydra.tool.archive.ArchiveException; 32 import org.enhydra.tool.archive.ArchiveTool; 33 import org.enhydra.tool.common.PathHandle; 34 import org.enhydra.tool.common.SwingUtil; 35 36 import javax.swing.*; 40 import javax.swing.border.*; 41 import java.awt.*; 42 import java.awt.event.ActionEvent ; 43 import java.awt.event.ActionListener ; 44 import java.io.File ; 45 import java.util.ArrayList ; 46 import java.util.ResourceBundle ; 47 import java.util.jar.Manifest ; 48 import java.util.jar.JarInputStream ; 49 50 public class ServiceType extends ArchiveType { 52 public final static String EXT = "jar"; 53 54 protected final String getSelectionName() { 56 return "Enhydra Service"; 57 } 58 59 protected final String getExtension() { 60 return EXT; 61 } 62 63 protected final String getType() { 64 return "service." + getExtension(); 65 } 66 67 protected final String getDescription() { 68 StringBuffer buf = new StringBuffer (); 69 70 buf.append("Create an Enhydra service archive for "); 71 buf.append("deployment as a shared resource."); 72 return buf.toString(); 73 } 74 75 protected void initPanels() throws ArchiveException { 76 ServiceFilePanel filePanel = new ServiceFilePanel(); 77 ClassesPanel classesPanel = new ClassesPanel(); 78 ArchivePanel[] newPanels = new ArchivePanel[2]; 79 80 newPanels[0] = filePanel; 81 newPanels[1] = classesPanel; 82 setWizardPanels(newPanels); 83 } 84 85 protected void initPlan() throws ArchiveException { 86 PathHandle path = null; 87 88 setPlan(new ServicePlan()); 89 getPlan().setArchivePath(getDefaultArchivePath()); 90 path = PathHandle.createPathHandle(getPlan().getArchivePath()); 91 if (path.isFile()) { 92 readArchive(getPlan().getArchivePath()); 93 } 94 } 95 96 97 } 98 | Popular Tags |