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