public String getUserkey(String userLogin) {
logger.info("getUserkey method started");
UserManager usrMgr = Platform.getService(UserManager.class);
User user = new User(userLogin);
Set restSet = new HashSet();
restSet.add("usr_key");
String userKey = null;
try {
user =
usrMgr.getDetails("User Login", userLogin, null); // getting the user key based on userlogin
} catch (NoSuchUserException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
} catch (UserLookupException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
} catch (SearchKeyNotUniqueException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
} catch (NullPointerException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
} catch (Exception e) {
logger.log(Level.SEVERE, e.getMessage(), e);
}
userKey = user.getEntityId();
return userKey;
}
logger.info("getUserkey method started");
UserManager usrMgr = Platform.getService(UserManager.class);
User user = new User(userLogin);
Set restSet = new HashSet();
restSet.add("usr_key");
String userKey = null;
try {
user =
usrMgr.getDetails("User Login", userLogin, null); // getting the user key based on userlogin
} catch (NoSuchUserException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
} catch (UserLookupException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
} catch (SearchKeyNotUniqueException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
} catch (NullPointerException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
} catch (Exception e) {
logger.log(Level.SEVERE, e.getMessage(), e);
}
userKey = user.getEntityId();
return userKey;
}