public String getLoginId() { String result; User loggedInUser = getLoggedInUser(); if (loggedInUser == null) { result = GUEST_LOGIN_ID; } else { result = loggedInUser.getLoginId(); } return result; }
public String getFormalName() { String result; User loggedInUser = getLoggedInUser(); if (loggedInUser == null) { result = GUEST_FORMAL_NAME; } else { result = loggedInUser.getDetails().getFirstName() + " " + loggedInUser.getDetails().getLastName(); } return result; }