* on error
*/
@Override
public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException
{
ChangeStreamActivitySubscriptionRequest request = (ChangeStreamActivitySubscriptionRequest) inActionContext
.getParams();
if (log.isInfoEnabled())
{
log.info("Setting group email notification "
+ (request.getReceiveNewActivityNotifications() ? "on" : "off") + " for "
+ inActionContext.getPrincipal().getAccountId() + " and stream entity with unique id "
+ request.getStreamEntityUniqueId());
}
// get the stream entity id
Long id = entityIdFromUniqueIdDAO.execute(request.getStreamEntityUniqueId());
// update the user's preference
changeNotificationPreferenceDAO.execute(new ChangeStreamActivitySubscriptionMapperRequest(inActionContext
.getPrincipal().getId(), id, request.getReceiveNewActivityNotifications(), request
.getCoordinatorOnlyNotifications()));
return null;
}