1 package com.instantbank.component.parameter.ejb; 2 3 import javax.ejb.EJBObject; 4 import java.rmi.RemoteException; 5 import java.io.*; 6 import java.util.ArrayList; 7 import java.util.Hashtable; 8 import com.instantbank.common.utilcomponents.CodeDescription; 9 import com.instantbank.component.parameter.util.*; 10 import com.instantbank.common.utilcomponents.DAOException; 11 12 /** 13 * Business interface of Parameter EJB: list of services 14 * for servicing ear : managamente of parameters 15 * (Session Stateful EJB) 16 * 17 * @author Instant-bank (Roberto Contreras) 18 * @created September 2002 19 */ 20 21 public interface Parameter extends EJBObject { 22 23 // BUSINESS METHODS FOR MANAGEMENT PARAMETERS OF LEVELS: 24 25 /** 26 * Loads parameters levels names of the current company. 27 * 28 * @return ArrayList object with 2 elements: 29 * (0) parameter level 1 name. 30 * (1) parameter level 2 name. 31 * @throws RemoteException Description of the Exception 32 * @throws DAOException Description of the Exception 33 */ 34 public ArrayList loadParamLevelsName() 35 throws RemoteException, DAOException; 36 37 38 /** 39 * Applies a set of updates in the parameters levels names of the current 40 * company. 41 * 42 * @param items ArrayList with 2 elements of type String 43 * representing the attributes of items to apply param name of 44 * level 1 and level 2. 45 * @return ArrayList object with 2 elements: 46 * (0) probabily problem. 47 * (1) ArrayList with a set of parameters levels names. 48 * @throws RemoteException Description of the Exception 49 * @throws DAOException Description of the Exception 50 */ 51 public ArrayList updateParamLevelsName(ArrayList items) 52 throws RemoteException, DAOException; 53 54 55 /** 56 * Loads all [code, value] of the values of parameter level 1 57 * of the current company. 58 * 59 * @return CodeDescription[] object with 60 * [code, value] of the values of parameter level 1. 61 * @throws RemoteException Description of the Exception 62 * @throws DAOException Description of the Exception 63 */ 64 public CodeDescription[] listParamLevel1Points() 65 throws RemoteException, DAOException; 66 67 68 /** 69 * Applies a set of changes in the values of parameter level 1 70 * of the current company. 71 * 72 * @param items ArrayList with 3 elements of 73 * type String[] representing the attributes of items to apply code, 74 * value and status. Status indicates if the item is for inserting, 75 * deleting or updating (ServicingGlobals.INSERT, 76 * ServicingGlobals.DELETE, ServicingGlobals.UPDATE) 77 * @return ArrayList with 2 elements: 78 * (0) possible problem (String), 79 * (1) current values of parameter level 1 list (CodeDescription[]) 80 * @throws RemoteException Description of the Exception 81 * @throws DAOException Description of the Exception 82 */ 83 public ArrayList applyItemsParamLevel1Points(ArrayList items) 84 throws RemoteException, DAOException; 85 86 87 /** 88 * Loads all [code, value] of the values of parameter level 2 89 * of the current company. 90 * 91 * @return CodeDescription[] object with 92 * [code, value] of the values of parameter level 2. 93 * @throws RemoteException Description of the Exception 94 * @throws DAOException Description of the Exception 95 */ 96 public CodeDescription[] listParamLevel2Points() 97 throws RemoteException, DAOException; 98 99 100 /** 101 * Applies a set of changes in the values of parameter level 2 102 * of the current company. 103 * 104 * @param items ArrayList with 3 elements of 105 * type String[] representing the attributes of items to apply code, 106 * value and status. Status indicates if the item is for inserting, 107 * deleting or updating (ServicingGlobals.INSERT, 108 * ServicingGlobals.DELETE, ServicingGlobals.UPDATE) 109 * @return ArrayList with 2 elements: 110 * (0) possible problem (String), 111 * (1) current values of parameter level 2 list (CodeDescription[]) 112 * @throws RemoteException Description of the Exception 113 * @throws DAOException Description of the Exception 114 */ 115 public ArrayList applyItemsParamLevel2Points(ArrayList items) 116 throws RemoteException, DAOException; 117 118 119 // BUSINESS METHODS FOR MANAGEMENT PARAMETER SEARH ORDER: 120 121 /** 122 * Loads parameters search order of the current company. 123 * 124 * @return ArrayList object with 2 elements: 125 * (0) parameter search 2 value. 126 * (1) parameter search 3 value. 127 * @throws RemoteException Description of the Exception 128 * @throws DAOException Description of the Exception 129 */ 130 public ArrayList loadParamSearchValues() 131 throws RemoteException, DAOException; 132 133 134 /** 135 * Applies a set of updates in the parameters search order of the current 136 * company. 137 * 138 * @param items ArrayList with 2 elements of type String 139 * representing the attributes of items to apply 140 * parameters search order. 141 * @return ArrayList object with 2 elements: 142 * (0) probabily problem. 143 * (1) ArrayList with a set of parameters search order. 144 * @throws RemoteException Description of the Exception 145 * @throws DAOException Description of the Exception 146 */ 147 public ArrayList updateParamSearchValues(ArrayList items) 148 throws RemoteException, DAOException; 149 150 151 // BUSINESS METHODS FOR MANAGEMENT PARAMETER RESTRICTIONS 152 153 154 /** 155 * Loads the set parameters restrictions of the current company 156 * for each group parameter. 157 * 158 * @return ArrayList object with (n) elements. When each element is 159 * representing a group parameter and its parameters restrictions of 160 * type GroupParam. 161 * @throws RemoteException Description of the Exception 162 * @throws DAOException Description of the Exception 163 */ 164 public ArrayList listParamRestrictions() 165 throws RemoteException, DAOException; 166 167 168 /** 169 * Applies a set of updates in the parameters restrictions in the current 170 * company. 171 * 172 * @param items Hashtable with (n) elements of type ParmRestrictionUpdate. 173 * When each element is representing the attributes of parameter 174 * restrictions. 175 * @return ArrayList object with (n) elements. When each element is 176 * representing a group parameter and its parameters restrictions of 177 * type GroupParam. 178 * @throws RemoteException Description of the Exception 179 * @throws DAOException Description of the Exception 180 */ 181 public ArrayList updateParamRestrictions(Hashtable items) 182 throws RemoteException, DAOException; 183 184 // BUSINESS METHODS FOR MANAGEMENT SET PARAMETER VALUES 185 186 /** 187 * Loads the set parameters values of the current company 188 * for the parameter without warning colors. 189 * 190 * @param codeParamater Description of the Parameter 191 * @return ParameterModel object. When its atributes are 192 * representing the all values and warning colors for the parameter. 193 * @throws RemoteException Description of the Exception 194 * @throws DAOException Description of the Exception 195 */ 196 public ParameterModel listParamValues(String codeParamater) 197 throws RemoteException, DAOException; 198 199 200 /** 201 * Loads the value an code of level 1 point 202 * 203 * @return level1Code The Hashtable object with value of level 1 point as 204 * the key and the code of point 1 as value. 205 * @throws RemoteException Description of the Exception 206 * @throws DAOException Description of the Exception 207 */ 208 public Hashtable loadLevel1Code() throws RemoteException, DAOException; 209 210 211 /** 212 * Loads the value an code of level 2 point 213 * 214 * @return level1Code The Hashtable object with value of level 2 point as 215 * the key and the code of point 2 as value. 216 * @throws RemoteException Description of the Exception 217 * @throws DAOException Description of the Exception 218 */ 219 public Hashtable loadLevel2Code() throws RemoteException, DAOException; 220 221 222 /** 223 * Applies a set of updates in the parameters values in the current 224 * company. 225 * 226 * @param items ParameterValue object with the value of code parameter, 227 * type of parameter and a Hashtable with the point1+"|"+point2 as 228 * the Key and the value of parameter as the Value. 229 * @param level1Code The Hashtable object with value of level 1 point as 230 * the key and the code of point 1 as value. 231 * @param level2Code The Hashtable object with value of level 2 point as 232 * the key and the code of point 2 as value. 233 * @return codeParameter The value of code parameter. 234 * @throws RemoteException Description of the Exception 235 * @throws DAOException Description of the Exception 236 */ 237 public String updateParamValues(ParameterValue items, Hashtable level1Code, 238 Hashtable level2Code) 239 throws RemoteException, DAOException; 240 241 242 /** 243 * Check the parameters values and set warning colors to ParameterModel 244 * object of the current company for the parameter. This service doesn't 245 * save parameters values in the data base. Only verify warning colors. 246 * 247 * @param items ParameterValue object with the value of code parameter, 248 * type of parameter and a Hashtable with the point1+"|"+point2 as 249 * the Key and the value of parameter as the Value. 250 * @return ParameterModel object. When its atributes are 251 * representing the all values and warning colors for the parameter. 252 * @throws RemoteException Description of the Exception 253 * @throws DAOException Description of the Exception 254 */ 255 public ParameterModel verifyParamValues(ParameterValue items) 256 throws RemoteException, DAOException; 257 } 258