private static final Logger LOG = LoggerFactory.getLogger(PortalRestAPIServiceImpl.class);
private static final String ERROR_MESSAGE = "Failed to {0} user [loginId:{1}]";
- /**
- * @return the userManager
- */
- public UserManager getUserManager() {
- return userManager;
- }
-
- /**
- * @param userManager the userManager to set
- */
- public void setUserManager(UserManager userManager) {
- this.userManager = userManager;
- }
-
- /**
- * @return the log
- */
- public static Logger getLog() {
- return LOG;
- }
-
- /**
- * @return the errorMessage
- */
- public static String getErrorMessage() {
- return ERROR_MESSAGE;
- }
-
private UserManager userManager;
/**
LOG.debug("Push user [loginId:" + user.getLoginId() + "]");
if (userManager.getUser(user.getLoginId()).isPresent()) {
- String message = getMessage(ERROR_MESSAGE, "push", user.getLoginId())
- + ", user is already stored";
+ String message =
+ getMessage(ERROR_MESSAGE, "push", user.getLoginId()) + ", user is already stored";
LOG.error(message);
throw new PortalAPIException(message);
}
/////////////////////////////////////////////////////////////////////////////
// Role interface
/////////////////////////////////////////////////////////////////////////////
+ public List<EcompRole> getAvailableRoles() throws PortalAPIException {
+ LOG.debug("Get available roles");
+ return UserManager.getRoles();
+ }
- /*
- * (non-Javadoc)
- *
- * @see com.att.fusion.core.onboarding.crossapi.IPortalRestAPIService#getAvailableRoles()
- */
- @Override
- public List<EcompRole> getAvailableRoles(String role) throws PortalAPIException {
+ public List<EcompRole> getAvailableRoles(String requestedLoginId) throws PortalAPIException {
LOG.debug("Get available roles");
return UserManager.getRoles();
}
formatter.applyPattern(message);
return formatter.format(args);
}
-
-}
\ No newline at end of file
+}