notification-portlet-webapp/src/main/java/org/jasig/portlet/notice/action/favorite/FavoriteAction.java
@Override
    public void invoke(final ActionRequest req, final ActionResponse res) throws IOException {
        final NotificationEntry entry = getTarget();
        final String notificationId = entry.getId();
        final Set<String> favoriteNotices = this.getFavoriteNotices(req);
        if (favoriteNotices.contains(notificationId)) {
            favoriteNotices.remove(notificationId);
        } else {
            favoriteNotices.add(notificationId);
        }
        setFavoriteNotices(req, favoriteNotices);
    }
@Override
    public void invoke(final ActionRequest req, final ActionResponse res) throws IOException {
        final NotificationEntry entry = getTarget();
        final String notificationId = entry.getId();
        final Set<String> favoriteNotices = this.getFavoriteNotices(req);
        if (favoriteNotices.contains(notificationId)) {
            favoriteNotices.remove(notificationId);
        } else {
            favoriteNotices.add(notificationId);
        }
        setFavoriteNotices(req, favoriteNotices);
    }
Invoking a FavoriteAction toggles it.