Completed subscriptions REST API and added a bit more UI logic

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28488 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Florian Mü
2011-06-20 18:08:36 +00:00
parent adc0297235
commit f53a15b729
3 changed files with 90 additions and 73 deletions

View File

@@ -144,7 +144,7 @@ public interface SubscriptionService
int getFollowersCount(String userId);
/**
* Follows another
* Follows a user.
*
* @param userId
* the id of the user
@@ -154,6 +154,14 @@ public interface SubscriptionService
@Auditable(parameters = { "userId", "userToFollow" })
void follow(String userId, String userToFollow);
/**
* Unfollows a user.
*
* @param userId
* the id of the user
* @param userToUnfollow
* the id of the user to unfollow
*/
@Auditable(parameters = { "userId", "userToUnfollow" })
void unfollow(String userId, String userToUnfollow);
@@ -191,4 +199,10 @@ public interface SubscriptionService
*/
@NotAuditable
boolean isSubscriptionListPrivate(String userId);
/**
* Returns if subscription are enabled for this system.
*/
@NotAuditable
boolean subscriptionsEnabled();
}

View File

@@ -0,0 +1,42 @@
/*
* 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.subscriptions;
import org.alfresco.error.AlfrescoRuntimeException;
/**
* This exception is thrown if subscriptions are disabled.
*
* @author Florian Mueller
* @since 4.0
*/
public class SubscriptionsDisabledException extends AlfrescoRuntimeException
{
private static final long serialVersionUID = 6971869799749343887L;
public SubscriptionsDisabledException(String msg)
{
super(msg);
}
public SubscriptionsDisabledException(String msg, Throwable cause)
{
super(msg, cause);
}
}