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