1 package org.enhydra.shark.corbaclient.workflowadmin.definition.actions; 2 3 import java.awt.event.*; 4 5 import javax.swing.*; 6 7 import org.omg.WfBase.*; 8 import org.enhydra.shark.corba.WorkflowService.*; 9 import org.enhydra.shark.corbaclient.*; 10 import org.enhydra.shark.corbaclient.workflowadmin.*; 11 import org.enhydra.shark.corbaclient.workflowadmin.definition.*; 12 13 19 public class UnloadPackages extends ActionBase { 20 21 public UnloadPackages(PackageManagement pdm) { 22 super(pdm); 23 } 24 25 public void actionPerformed(ActionEvent e) { 26 PackageManagement pdm=(PackageManagement)actionPanel; 27 SharkAdmin workflowAdmin=pdm.getWorkflowAdmin(); 28 try { 29 String id=pdm.getSelectedPackageId(); 30 32 SharkAdmin.getPackageAmin().closePkg(id); 33 workflowAdmin.refresh(true); 34 } catch (PackageHasActiveProcesses nc){ 35 JOptionPane.showMessageDialog(workflowAdmin.getFrame(), 36 ResourceManager.getLanguageDependentString("ErrorTheSelectedPackageCannotBeUnloadedAtTheMoment"), 37 workflowAdmin.getAppTitle(),JOptionPane.ERROR_MESSAGE); 38 } catch (PackageInUse piu) { 39 JOptionPane.showMessageDialog(workflowAdmin.getFrame(), 40 ResourceManager.getLanguageDependentString("ErrorTheSelectedPackageCannotBeUnloadedAtTheMoment"), 41 workflowAdmin.getAppTitle(),JOptionPane.ERROR_MESSAGE); 42 } catch (Exception be) { 43 JOptionPane.showMessageDialog(workflowAdmin.getFrame(), 44 ResourceManager.getLanguageDependentString("ErrorTheSelectedPackageCannotBeUnloadedAtTheMoment"), 45 workflowAdmin.getAppTitle(),JOptionPane.ERROR_MESSAGE); 46 } 47 } 48 } 49 50 51 | Popular Tags |