Revision 8:1982e43e6686 src/my/com/upass/services/ResetTacService.java
src/my/com/upass/services/ResetTacService.java | ||
---|---|---|
50 | 50 |
UserTacDAO tacDao = DAOFactoryProvider.getDAOFactory().getUserTacDAO(); |
51 | 51 |
|
52 | 52 |
final Map<Integer, ConfigBean> configsMap = upc.getConfigurationsMap(); |
53 |
TacBean tb = null; |
|
54 | 53 |
for (Integer appId : configsMap.keySet()) { |
55 |
tb = tacDao.getTacFromStore(userAlias, appId); |
|
56 |
|
|
54 |
TacBean tb = tacDao.getTacFromStore(userAlias, appId); |
|
57 | 55 |
if (tb == null) { |
58 | 56 |
continue; |
59 | 57 |
} |
... | ... | |
62 | 60 |
TacController tc = UPassFactory.getTacController(tb, configsMap.get(appId)); |
63 | 61 |
tc.ResetTAC(); |
64 | 62 |
tc.getUpdatedObject(); |
65 |
|
|
63 |
|
|
66 | 64 |
if (tacDao.updateTacToStore(tb)) { |
67 |
rc = Constants.ERR_SUCCESS;
|
|
65 |
return Constants.ERR_SUCCESS;
|
|
68 | 66 |
|
69 | 67 |
} else { |
70 |
rc = Constants.ERR_UNKNOWN;
|
|
68 |
return Constants.ERR_UNKNOWN;
|
|
71 | 69 |
} |
72 | 70 |
} |
73 | 71 |
|
74 |
if(tb == null){ |
|
75 |
rc = Constants.ERR_USERALIAS_NOT_FOUND; |
|
76 |
} |
|
72 |
rc = Constants.ERR_USERALIAS_NOT_FOUND; |
|
77 | 73 |
|
78 | 74 |
} catch (Exception e) { |
79 | 75 |
e.printStackTrace(); |
Also available in: Unified diff