KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > corbaclient > workflowadmin > user > actions > AddUserMapping


1 package org.enhydra.shark.corbaclient.workflowadmin.user.actions;
2
3 import org.enhydra.shark.corba.WorkflowService.*;
4
5 import java.awt.event.*;
6 import java.util.*;
7
8 import org.enhydra.shark.corbaclient.*;
9 import org.enhydra.shark.corbaclient.workflowadmin.*;
10 import org.enhydra.shark.corbaclient.workflowadmin.user.*;
11
12 /**
13  * Creates new xpdl participant to system user mapping.
14  *
15  * @author Sasa Bojanic
16  * @version 1.0
17  */

18 public class AddUserMapping extends ActionBase {
19
20    public AddUserMapping (UserMappingManagement umm) {
21       super(umm);
22    }
23
24    public void actionPerformed(ActionEvent e) {
25       UserMappingManagement umm=(UserMappingManagement)actionPanel;
26       SharkAdmin workflowAdmin=umm.getWorkflowAdmin();
27       MappingAdministration ma=SharkAdmin.getMappingAdmin();
28       ArrayList users=new ArrayList();
29       ArrayList groupNames=new ArrayList();
30       try {
31          users.addAll(Arrays.asList(ma.getAllUsers()));
32          groupNames.addAll(Arrays.asList(ma.getAllGroupnames()));
33       } catch (Exception JavaDoc ex) {
34 // System.out.println("ERROR IN AddUserMapping.actionPerformed()");
35
// ex.printStackTrace();
36
}
37 //System.out.println("AUS="+allUsers);
38
UserMapping um=new UserMapping(umm,
39                                      umm.getParticipantKeyToParticipant().values(),users, groupNames);
40       um.showDialog();
41    }
42 }
43
Popular Tags