1 package org.enhydra.shark.corbaclient.workflowadmin.user.actions; 2 3 import java.awt.event.*; 4 import javax.swing.*; 5 6 import org.omg.WfBase.*; 7 import org.enhydra.shark.corbaclient.*; 8 import org.enhydra.shark.corbaclient.workflowadmin.*; 9 import org.enhydra.shark.corbaclient.workflowadmin.user.*; 10 import org.enhydra.shark.corba.WorkflowService.*; 11 12 18 public class RemoveUserMapping extends ActionBase { 19 20 public RemoveUserMapping (UserMappingManagement umm) { 21 super(umm); 22 } 23 24 public void actionPerformed(ActionEvent e) { 25 UserMappingManagement umm=(UserMappingManagement)actionPanel; 26 SharkAdmin workflowAdmin=umm.getWorkflowAdmin(); 27 28 MappingAdministration mm=SharkAdmin.getMappingAdmin(); 29 30 try { 31 String packageId=(String )umm.getExistingMappingsPanel().getColumnValueOfSelectedRow(0); 32 String processDefinitionId=(String )umm.getExistingMappingsPanel().getColumnValueOfSelectedRow(1); 33 String participantId=(String )umm.getExistingMappingsPanel().getColumnValueOfSelectedRow(2); 34 String username=(String )umm.getExistingMappingsPanel().getColumnValueOfSelectedRow(5); 35 boolean isGroupUser=((Boolean )umm.getExistingMappingsPanel().getColumnValueOfSelectedRow(8)).booleanValue(); 36 ParticipantMap pm=mm.createParticipantMap(); 37 pm.setPackageId(packageId); 38 pm.setProcessDefinitionId(processDefinitionId); 39 pm.setParticipantId(participantId); 40 pm.setUsername(username); 41 pm.setIsGroupUser(isGroupUser); 42 mm.removeParticipantMapping(pm); 43 umm.refresh(true); 44 } catch (Exception ex) { 45 JOptionPane.showMessageDialog(workflowAdmin.getFrame(), 46 ResourceManager.getLanguageDependentString("MessageMappingCannotBeRemovedAtTheMoment"), 47 workflowAdmin.getAppTitle(),JOptionPane.INFORMATION_MESSAGE); 48 } 49 } 50 } 51 | Popular Tags |