m2u-upass-core / src / my / com / upass / security / code / SecurityCodeControllerV2.java @ 0:02300db8682b
History | View | Annotate | Download (1.7 KB)
1 |
/**
|
---|---|
2 |
* Copyright (M) 2010 Penril Datability (M) Sdn Bhd All rights reserved.
|
3 |
*
|
4 |
* This software is copyrighted. Under the copyright laws, this software
|
5 |
* may not be copied, in whole or in part, without prior written consent
|
6 |
* of Penril Datability (M) Sdn Bhd or its assignees. This software is
|
7 |
* provided under the terms of a license between Penril Datability (M)
|
8 |
* Sdn Bhd and the recipient, and its use is subject to the terms of that
|
9 |
* license.
|
10 |
*/
|
11 |
package my.com.upass.security.code; |
12 |
|
13 |
import java.util.Map; |
14 |
|
15 |
import my.com.upass.ConfigBean; |
16 |
import my.com.upass.Constants; |
17 |
import my.com.upass.pojo.SecurityCodeBean; |
18 |
|
19 |
/**
|
20 |
* PROGRAMMER: Danniell
|
21 |
* CHANGE-NO:
|
22 |
* TASK-NO:
|
23 |
* DATE CREATED: Nov 7, 2011
|
24 |
* TAG AS:
|
25 |
* REASON(S):
|
26 |
* MODIFICATION:
|
27 |
*/
|
28 |
|
29 |
/**
|
30 |
* Tac controller for multiple customer types
|
31 |
*/
|
32 |
public class SecurityCodeControllerV2 extends SecurityCodeController |
33 |
{ |
34 |
private SecurityCodeBean scBeanObject;
|
35 |
private Map<Integer, ConfigBean> configurationsMap; |
36 |
|
37 |
public SecurityCodeControllerV2 (SecurityCodeBean tacBeanObject,
|
38 |
Map<Integer, ConfigBean> configurationsMap) |
39 |
throws Exception |
40 |
{ |
41 |
super(tacBeanObject, false); |
42 |
this.scBeanObject = tacBeanObject;
|
43 |
this.configurationsMap = configurationsMap;
|
44 |
populateParameters (); |
45 |
|
46 |
} |
47 |
|
48 |
|
49 |
private void populateParameters () throws Exception |
50 |
{ |
51 |
ConfigBean config = configurationsMap.get (Constants.SYSTEM_ID); |
52 |
_MAX_ERROR = config.getSCMaxError (); |
53 |
_MAX_USE = config.getSCMaxUse (); |
54 |
_TIME_OUT = config.getSCTimeOut (); |
55 |
_REPEAT_TIMEOUT = config.getSCRepeatTimeOut (); |
56 |
_LIFTSPAN_TIMEOUT = config.getSCLifeSpanTimeOut (); |
57 |
} |
58 |
|
59 |
public SecurityCodeBean getUpdatedObject()
|
60 |
{ |
61 |
return scBeanObject;
|
62 |
} |
63 |
} |