updated signature for methods notifyAddedItem and notifyRemovedItem

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@69684 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-02-27 11:22:00 +00:00
parent f35908d96c
commit 290399e555
2 changed files with 8 additions and 6 deletions

View File

@ -163,7 +163,7 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
* @throws InternalErrorException
*/
@Override
public boolean notifyAddedItem(String userIdToNotify, WorkspaceItem item) throws InternalErrorException {
public boolean notifyAddedItem(String userIdToNotify, WorkspaceItem item, WorkspaceFolder sharedFolder) throws InternalErrorException {
Notification not = new Notification(
UUID.randomUUID().toString(),
NotificationType.WP_ITEM_NEW,
@ -171,7 +171,7 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
item.getId(), //the
new Date(),
"?oid="+item.getId()+"&parentoid="+item.getParent().getId(),
"added "+ item.getName() +" to your workspace shared folder "+ item.getParent().getName(),
"added "+ item.getName() +" to your workspace shared folder "+ sharedFolder.getName(),
false,
aslSession.getUsername(),
aslSession.getUserFullName(),
@ -184,7 +184,7 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
* @throws InternalErrorException
*/
@Override
public boolean notifyRemovedItem(String userIdToNotify, WorkspaceItem item) throws InternalErrorException {
public boolean notifyRemovedItem(String userIdToNotify, WorkspaceItem item, WorkspaceFolder sharedFolder) throws InternalErrorException {
Notification not = new Notification(
UUID.randomUUID().toString(),
NotificationType.WP_ITEM_DELETE,
@ -192,7 +192,7 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
item.getId(), //the
new Date(),
"?oid="+item.getId()+"&parentoid="+item.getParent().getId(),
"removed "+ item.getName() +" from your workspace shared folder "+ item.getParent().getName(),
"removed "+ item.getName() +" from your workspace shared folder "+ sharedFolder.getName(),
false,
aslSession.getUsername(),
aslSession.getUserFullName(),

View File

@ -40,16 +40,18 @@ public interface NotificationsManager {
* use to notify a user he got a workspace item new in some of his workspace shared folder
* @param userIdToNotify the user you want to notify
* @param newItem the new shared {@link WorkspaceItem}
* @param sharedFolder the shared folder {@link WorkspaceFolder}
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyAddedItem(String userIdToNotify, WorkspaceItem item) throws Exception;
boolean notifyAddedItem(String userIdToNotify, WorkspaceItem item, WorkspaceFolder sharedFolder) throws Exception;
/**
* use to notify a user he got a workspace item deleted from one of his workspace shared folder
* @param userIdToNotify the user you want to notify
* @param removedItem the removed {@link WorkspaceItem}
* @param sharedFolder the shared folder {@link WorkspaceFolder}
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyRemovedItem(String userIdToNotify, WorkspaceItem item) throws Exception;
boolean notifyRemovedItem(String userIdToNotify, WorkspaceItem item, WorkspaceFolder sharedFolder) throws Exception;
/**
* use to notify a user he got a workspace item updated from one of his workspace shared folder
* @param userIdToNotify the user you want to notify