| 1961 |
ankur.sing |
1 |
package in.shop2020.catalog.dashboard.server;
|
|
|
2 |
|
|
|
3 |
import in.shop2020.catalog.dashboard.client.LoginService;
|
|
|
4 |
import in.shop2020.thrift.clients.HelperServiceClient;
|
|
|
5 |
|
|
|
6 |
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
|
|
7 |
|
|
|
8 |
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {
|
|
|
9 |
|
|
|
10 |
@Override
|
|
|
11 |
public long authenticateUser(String username, String password) {
|
|
|
12 |
long warehouseId = -1;
|
|
|
13 |
try {
|
|
|
14 |
HelperServiceClient hsc = new HelperServiceClient();
|
|
|
15 |
in.shop2020.utils.HelperService.Client hClient = hsc.getClient();
|
|
|
16 |
warehouseId = hClient.authenticateUser(username, password);
|
|
|
17 |
} catch (Exception ex) {
|
|
|
18 |
ex.printStackTrace();
|
|
|
19 |
}
|
|
|
20 |
return warehouseId;
|
|
|
21 |
}
|
|
|
22 |
|
|
|
23 |
}
|