Brian Remmington ed839dcbe0 Merged BRANCHES/V4.2 to HEAD:
55206: Branch created for 4.2.x releases.
   55209: Merged HEAD to BRANCHES/V4.2:
        55208: Added Sharepoint config to unit test classpath to fix VtiRequestDispatcherTest.
   55222: Merged HEAD-BUG-FIX to V4.2
        55220: Merged V4.1-BUG-FIX (4.1.7) to HEAD-BUG-FIX (4.2)
           55218: Fix for ALF-19894 Site is not displayed after restoring from Trashcan
             This bug was reported on 4.2, but the bug is also present on 4.1.
             I have added a testcase to reproduce the bug along with a fix.
             The problem was in SiteServiceImpl.delete where the code was writing an empty property value into the {}memberships property
             and therefore there was no record of which users had been members of the deleted site.
   55245: Fixed javadoc while checking that ALF-19055 was fixed.  ActivityService no longer uses 'format
   55246: CLOUD-2050 -Content changes are not synced from Cloud to On-Premise (errors in the logs)
   55249: Hazelcast: Added ability to create cache with 'read-backup-data' via property *.readBackupData
   55250: Hazelcast cache builder now accepts 'async-backup-count' value and any error in setting a value logs the full exception
   55251: Asynchronous cache: Better logging of in- and after-transaction processes
   55252: Asynchronous cache: Better logging of in- and after-transaction processes
   55266: Workflow REST API fix for variable retrieval
   55276: Merged HEAD to BRANCHES/V4.2:
        55274: Disabling Sharepoint unit tests until we can make them run properly in the build.
   55278: ALF-19889 - String for Brazilian Portuguese
   55279: Merged DEV to 4.2
        ALF-17464 : Replication jobs aren't displayed until sorting by some characteristic
           - Changing not exact equals (!==) to not euqals (!=)
   55280: Fix for ALF-19865 - Forgot password link redirects to Login page. Also cleaned up the mess that is the 'Sign in to Alfresco in the cloud' dialog.
   55281: Probable fix for ALF-19225 Intermittent test failures in SubscriptionServiceActivitiesTest
   55282: ALF-19865 - Cloud Sync profile area now looks like the rest of profile area.
   55285: Merged BRANCHES/DEV/BELARUS/HEAD-2013_08_27 to BRANCHES/V4.2:
        55068: ALF-19915 : MT and WebDAV: Content is lost when uploading non-empty document
   55286: Merged BRANCHES/DEV/BELARUS/HEAD-2013_08_29 to BRANCHES/V4.2:
        55207: ALF-19915 : MT and WebDAV: Content is lost when uploading non-empty document
        55210: ALF-19915 : MT and WebDAV: Content is lost when uploading non-empty document
   55297: As part of prep work for fixing ALF-20023 Recent Sites and Favorite Sites in copy/move pickers empty,
   55299: ALF-19556: IE10 specific fix for file upload browse (impressive how IE finds more and more innovative ways to spoil things for itself)
   55300: Fixed date issue when creating a new process instance
   55308: Resync to HEAD@55302


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55309 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2013-09-15 15:00:13 +00:00

207 lines
8.8 KiB
Java

/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.service.cmr.activities;
import java.util.List;
import java.util.Set;
import org.alfresco.query.PagingRequest;
import org.alfresco.query.PagingResults;
import org.alfresco.repo.domain.activities.ActivityFeedEntity;
import org.alfresco.service.NotAuditable;
/**
* The activity service
*/
public interface ActivityService extends ActivityPostService
{
/*
* Retrieve Feed Entries
*/
/**
* Retrieve user feed with optional site filter
*
* Will return activities for all users across all sites, or optionally for all users for specified site.
*
* @param userId - required
* @param siteId - optional, if set then will filter by given siteId else return all sites
* @return list of JSON feed entries
*/
@NotAuditable
public List<String> getUserFeedEntries(String userId, String siteId);
/**
* Retrieve user feed with optional site filter and optional user filters
*
* Will return activities for users across all sites, or optionally for users for specified site.
*
* User filters are:
* - all user activities (excludeThisUser = false, excludeOtherUsers = false)
* - other user activities (excludeThisUser = true, excludeOtherUsers = false)
* - my user activities (excludeThisUser = false, excludeOtherUsers = true)
* note: if both excludes are true then no activities will be returned.
*
* @param userId - required
* @param siteId - optional, if set then will filter by given siteId else return all sites
* @param excludeThisUser - if TRUE then will exclude activities for this user (hence returning other users only)
* @param excludeOthersUsers - if TRUE then will exclude activities for other users (hence returning this user only)
* @return list of JSON feed entries
*/
@NotAuditable
public List<String> getUserFeedEntries(String userId, String siteId, boolean excludeThisUser, boolean excludeOtherUsers);
/**
* Retrieve user feed with optional site filter and optional user filters
*
* Will return activities for users across all sites, or optionally for users for specified site.
*
* User filters are:
* - all user activities (excludeThisUser = false, excludeOtherUsers = false)
* - other user activities (excludeThisUser = true, excludeOtherUsers = false)
* - my user activities (excludeThisUser = false, excludeOtherUsers = true)
* note: if both excludes are true then no activities will be returned.
*
* @param userId - required
* @param siteId - optional, if set then will filter by given siteId else return all sites
* @param excludeThisUser - if TRUE then will exclude activities for this user (hence returning other users only)
* @param excludeOthersUsers - if TRUE then will exclude activities for other users (hence returning this user only)
* @param userFilter - if not NULL then will only return activities of users in this set
* @param actvityFilter - if not NULL then will only return activities that are in this set
* @return list of JSON feed entries
*/
@NotAuditable
public List<String> getUserFeedEntries(String userId, String siteId, boolean excludeThisUser, boolean excludeOtherUsers, Set<String> userFilter, Set<String> actvityFilter);
/**
* Retrieve user feed with optional site filter and optional user filters and optional min feed DB id
*
* Will return activities for users across all sites, or optionally for users for specified site.
*
* User filters are:
* - all user activities (excludeThisUser = false, excludeOtherUsers = false)
* - other user activities (excludeThisUser = true, excludeOtherUsers = false)
* - my user activities (excludeThisUser = false, excludeOtherUsers = true)
* note: if both excludes are true then no activities will be returned.
*
* @param userId - required
* @param siteId - optional, if set then will filter by given siteId else return all sites
* @param excludeThisUser - if TRUE then will exclude activities for this user (hence returning other users only)
* @param excludeOthersUsers - if TRUE then will exclude activities for other users (hence returning this user only)
* @param onlyFollowing - if TRUE then will only return activities of users this user follows
* @param minFeedId - inclusive from min feed DB id, if -1 then return all available
* @return list of JSON feed entries
*/
@NotAuditable
public List<ActivityFeedEntity> getUserFeedEntries(String feedUserId, String siteId, boolean excludeThisUser, boolean excludeOtherUsers, long minFeedId);
/**
* Retrieve user feed with optional site filter and optional user filters and optional min feed DB id
*
* Will return activities for users across all sites, or optionally for users for specified site.
*
* User filters are:
* - all user activities (excludeThisUser = false, excludeOtherUsers = false)
* - other user activities (excludeThisUser = true, excludeOtherUsers = false)
* - my user activities (excludeThisUser = false, excludeOtherUsers = true)
* note: if both excludes are true then no activities will be returned.
*
* @param userId - required
* @param siteId - optional, if set then will filter by given siteId else return all sites
* @param excludeThisUser - if TRUE then will exclude activities for this user (hence returning other users only)
* @param excludeOthersUsers - if TRUE then will exclude activities for other users (hence returning this user only)
* @param onlyFollowing - if TRUE then will only return activities of users this user follows
* @param userFilter - if not NULL then will only return activities of users in this set
* @param actvityFilter - if not NULL then will only return activities that are in this set
* @param minFeedId - inclusive from min feed DB id, if -1 then return all available
* @return list of JSON feed entries
*/
@NotAuditable
public List<ActivityFeedEntity> getUserFeedEntries(String feedUserId, String siteId, boolean excludeThisUser, boolean excludeOtherUsers, Set<String> userFilter, Set<String> actvityFilter, long minFeedId);
@NotAuditable
public PagingResults<ActivityFeedEntity> getPagedUserFeedEntries(String feedUserId, String siteId, boolean excludeThisUser, boolean excludeOtherUsers, long minFeedId, PagingRequest pagingRequest);
/**
* Retrieve site feed
*
* @param activityType - required
* @return list of JSON feed entries
*/
@NotAuditable
public List<String> getSiteFeedEntries(String siteId);
/**
* Return maximum configured item entries (per feed)
*
* @return
*/
@NotAuditable
public int getMaxFeedItems();
/*
* Manage User Feed Controls
*/
/**
* For current user, set feed control (opt-out) for a site or an appTool or a site/appTool combination
*
* @param feedControl - required
*/
@NotAuditable
public void setFeedControl(FeedControl feedControl);
/**
* For given user, get feed controls
*
* @param userId - required (must match
* @return list of user feed controls
*/
@NotAuditable
public List<FeedControl> getFeedControls(String userId);
/**
* For current user, get feed controls
*
* @return list of user feed controls
*/
@NotAuditable
public List<FeedControl> getFeedControls();
/**
* For current user, unset feed control
*
* @param feedControl - required
*/
@NotAuditable
public void unsetFeedControl(FeedControl feedControl);
/**
* For current user, does the feed control exist ?
*
* @param feedControl - required
* @return true, if user feed control exists
*/
@NotAuditable
public boolean existsFeedControl(FeedControl feedControl);
}