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:
Florian Mü
2011-07-11 15:10:55 +00:00
parent 9adcac3910
commit 10a9817d08
7 changed files with 43 additions and 8 deletions

View File

@@ -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");
}