1    package com.instantbank.servicing.control.event;
2    
3    import java.io.Serializable;
4    import java.util.ArrayList;
5    
6    /**
7     *  Set Parameter Search Order usecase: This event is sent from the web tier to the EJB
8     *  Controller to notify the EJB Controller that an action needs to be made in
9     *  the Set Parameter Search Order model data.
10    *
11    * @author Instant-bank (Jorge Cardenas)
12    * @created September 2002
13    */
14   public class ParmSearchOrderEvent extends ServicingEventSupport {
15   
16     // possible actions on Set Parameter Search Order model data:
17     /**
18      * action constant of setting the parameter search order
19      *  of the current company
20      */
21   
22     public static final int LIST_PARM_SEARCH_ORDER = 0;
23   
24     public static final int UPDATE_PARM_SEARCH_ORDER = 1;
25   
26     // attributes: necesary data for executing the operations
27     /**
28      * action requested by the user
29      */
30     private int actionType;
31     /**
32      * current company
33      */
34     private String companyId;
35     /**
36      * current user
37      */
38     private Long userId;
39     /**
40      * items for changing the parameter search order
41      *  of the current company
42      */
43     private ArrayList items;
44   
45   
46     /**
47      * constructor: initializes attributes
48      *
49      * @param actionType action requested by the user
50      * @param userId current user
51      * @param items for changing the parameter search order of the current company
52      * @param companyId Description of the Parameter
53      */
54     public ParmSearchOrderEvent(int actionType, String companyId, Long userId,
55                                 ArrayList items) {
56       this.actionType = actionType;
57       this.companyId = companyId;
58       this.userId = userId;
59       this.items = items;
60     }
61   
62   
63     /**
64      * get method for actionType
65      *
66      * @return The actionType value
67      */
68     public int getActionType() {
69       return actionType;
70     }
71   
72   
73     /**
74      * get method for companyId
75      *
76      * @return The companyId value
77      */
78     public String getCompanyId() {
79       return companyId;
80     }
81   
82   
83     /**
84      * get method for userId
85      *
86      * @return The userId value
87      */
88     public Long getUserId() {
89       return userId;
90     }
91   
92   
93     /**
94      * get method for items
95      *
96      * @return The items value
97      */
98     public ArrayList getItems() {
99       return items;
100    }
101  
102  
103    /**
104     * String representation of the event
105     *
106     * @return Description of the Return Value
107     */
108    public String toString() {
109      return "ParmSearchOrderEvent("
110        + String.valueOf(actionType) + ", "
111        + companyId + ", "
112        + userId.toString() +
113        ")";
114    }
115  
116  
117    /**
118     * JNDI name for the event: Controller EJB registers this env variable
119     *
120     * @return The eventName value
121     */
122    public String getEventName() {
123      return "java:comp/env/parmSearchOrderEvent";
124    }
125  }
126  
127