mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Turned subscription service into a subsystem
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28919 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -89,6 +89,8 @@ public class SubscriptionServiceImpl implements SubscriptionService
|
||||
protected NamespaceService namespaceService;
|
||||
protected FileFolderService fileFolderService;
|
||||
|
||||
protected boolean active;
|
||||
|
||||
/**
|
||||
* Sets the subscriptions DAO.
|
||||
*/
|
||||
@@ -161,6 +163,11 @@ public class SubscriptionServiceImpl implements SubscriptionService
|
||||
this.fileFolderService = fileFolderService;
|
||||
}
|
||||
|
||||
public final void setActive(boolean active)
|
||||
{
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PagingSubscriptionResults getSubscriptions(String userId, SubscriptionItemTypeEnum type,
|
||||
PagingRequest pagingRequest)
|
||||
@@ -352,9 +359,9 @@ public class SubscriptionServiceImpl implements SubscriptionService
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean subscriptionsEnabled()
|
||||
public boolean isActive()
|
||||
{
|
||||
return true;
|
||||
return active;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -362,7 +369,7 @@ public class SubscriptionServiceImpl implements SubscriptionService
|
||||
*/
|
||||
protected void checkEnabled()
|
||||
{
|
||||
if (!subscriptionsEnabled())
|
||||
if (!isActive())
|
||||
{
|
||||
throw new SubscriptionsDisabledException("subscription_service.err.disabled");
|
||||
}
|
||||
|
Reference in New Issue
Block a user