diff --git a/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Notifications.java b/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Notifications.java index 3fb0b49..d7c35de 100644 --- a/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Notifications.java +++ b/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Notifications.java @@ -349,7 +349,7 @@ public class Notifications { // check if the token belongs to an application token. In this case use J.A.R.V.I.S (the username used to communicate with Liferay) String username = null; String fullName = ""; - logger.debug("Catalogue Notification called by " + caller.getClient().getId() + " isUser?"+TokensUtils.isUserToken(caller)); + logger.info("Catalogue Notification called by " + caller.getClient().getId() + " isUser?"+TokensUtils.isUserToken(caller)); if(!TokensUtils.isUserToken(caller)){ GCubeUser jarvis = UserManagerWSBuilder.getInstance().getUserManager().getUserByEmail(LiferayJSONWsCredentials.getSingleton().getUser()); SecurityTokenProvider.instance.set(LiferayJSONWsCredentials.getSingleton().getNotifierUserToken()); @@ -365,14 +365,16 @@ public class Notifications { String context = ScopeProvider.instance.get(); - logger.debug("catalogue notifications from user = " + username); + logger.info("catalogue notifications from user = " + username); ResponseBean responseBean = new ResponseBean(); Status status = Status.OK; boolean deliveryResult = false; try { - logger.debug("catalogue notifications type is " + event.getType()); + logger.info("catalogue notifications type is " + event.getType()); SocialNetworkingSite site = SocialNetworkingSiteFinder.getSocialNetworkingSiteFromScope(context); - + logger.info("social networking site is " + site.getName()); + logger.info("context is " + context); + logger.info("user is " + user.getUsername()); NotificationsManager nm = new ApplicationNotificationsManager(UserManagerWSBuilder.getInstance().getUserManager(), site, context, user); @@ -392,7 +394,12 @@ public class Notifications { responseBean.setMessage("Username not found, got: " + userIdToNotify); return Response.status(status).entity(responseBean).build(); } - + logger.info("username2notify " + username2Notify); + logger.info("type is " + CatalogueEventTypeMapper.getType(event.getType())); + logger.info("item id is " + event.getItemId()); + logger.info("item text is " + event.getNotifyText()); + logger.info("item url is " + event.getItemURL()); + deliveryResult = nm.notifyCatalogueEvent( CatalogueEventTypeMapper.getType(event.getType()),