Revision 72:a8758bf4aee0
src/main/java/my/com/upass/maybank/MinimalMaybankFacade.java | ||
---|---|---|
1 | 1 |
package my.com.upass.maybank; |
2 | 2 |
|
3 |
import java.util.Map; |
|
4 | 3 |
|
5 | 4 |
public interface MinimalMaybankFacade { |
6 | 5 |
|
src/main/java/my/com/upass/maybank/MinimalMaybankFacadeImpl.java | ||
---|---|---|
98 | 98 |
UserProfile profile = minUpcV2.findProfile( |
99 | 99 |
appAccessId, hashedSecretKey, username, session); |
100 | 100 |
|
101 |
final Map map = profile.propertiesToMap(); |
|
102 |
res.setMap(map); |
|
103 |
res.setCode(MinimalConstants.ERR_SUCCESS); |
|
101 |
if (profile != null) { |
|
102 |
final Map map = profile.propertiesToMap(); |
|
103 |
res.setMap(map); |
|
104 |
res.setCode(MinimalConstants.ERR_SUCCESS); |
|
104 | 105 |
|
106 |
} else { |
|
107 |
res.setCode(MinimalConstants.ERR_USERALIAS_NOT_FOUND); |
|
108 |
} |
|
105 | 109 |
} catch (UPassException e) { |
106 | 110 |
LOGGER.info(e, e); |
107 | 111 |
res.setCode(e.getErrorCode()); |
... | ... | |
127 | 131 |
UserProfile profile = minUpcV2.findProfile( |
128 | 132 |
appAccessId, hashedSecretKey, username, ClientApp.APP_ID_CCPP, session); |
129 | 133 |
|
130 |
final Map map = profile.propertiesToMap(); |
|
131 |
res.setMap(map); |
|
132 |
res.setCode(MinimalConstants.ERR_SUCCESS); |
|
133 |
|
|
134 |
if (profile != null) { |
|
135 |
final Map map = profile.propertiesToMap(); |
|
136 |
res.setMap(map); |
|
137 |
res.setCode(MinimalConstants.ERR_SUCCESS); |
|
138 |
} else { |
|
139 |
res.setCode(MinimalConstants.ERR_USERALIAS_NOT_FOUND); |
|
140 |
} |
|
134 | 141 |
} catch (UPassException e) { |
135 | 142 |
LOGGER.info(e, e); |
136 | 143 |
res.setCode(e.getErrorCode()); |
... | ... | |
196 | 203 |
} |
197 | 204 |
return res; |
198 | 205 |
} |
199 |
|
|
206 |
|
|
200 | 207 |
// protected methods |
201 | 208 |
|
202 | 209 |
protected int newUser( |
... | ... | |
278 | 285 |
MinimalUPassControllerV2.getMaybankLdapDAO().updateUser(username, attrMap); |
279 | 286 |
} |
280 | 287 |
session.getTransaction().commit(); |
281 |
|
|
288 |
|
|
282 | 289 |
} else { |
283 | 290 |
LOGGER.warn("Unable to update user profile."); |
284 | 291 |
GenericDAOHibernate.rollbackTransactionIfAny(session); |
Also available in: Unified diff