Class AbstractResourceSubscriptionService
- java.lang.Object
-
- org.silverpeas.core.subscription.service.AbstractResourceSubscriptionService
-
- All Implemented Interfaces:
Initialization
,ResourceSubscriptionService
- Direct Known Subclasses:
AbstractCalendarSubscriptionService
,AbstractPublicationSubscriptionService
,DefaultResourceSubscriptionService
public abstract class AbstractResourceSubscriptionService extends Object implements ResourceSubscriptionService, Initialization
- Author:
- Yohann Chastagnier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.silverpeas.core.subscription.ResourceSubscriptionService
ResourceSubscriptionService.Constants
-
-
Constructor Summary
Constructors Constructor Description AbstractResourceSubscriptionService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addAllSubscribersAboutNodePath(NodePath nodePath, Collection<SubscriptionSubscriber> subscribers)
protected abstract String
getHandledComponentName()
Gets the name of the component that the implementation handles.protected NodeService
getNodeService()
SubscriptionSubscriberList
getSubscribersOfComponent(String componentInstanceId)
Gets all subscribers registered on a component.
This service does not look at resources handled by the component but just explicit component subscriptions.SubscriptionSubscriberList
getSubscribersOfComponentAndTypedResource(String componentInstanceId, SubscriptionResourceType resourceType, String resourceId, SubscriberDirective... directives)
Gets all subscribers concerned by a specified resource represented by the given resource type and identifier.
The inheritance of subscription is handled by this method.SubscriptionSubscriberList
getSubscribersOfSubscriptionResource(SubscriptionResource subscriptionResource, SubscriberDirective... directives)
Gets all subscribers concerned by a specified subscription resource.
The inheritance of subscription is handled by this method.void
init()
Initializes some resources required by the services or performs some initialization processes at Silverpeas startup.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.initialization.Initialization
getPriority, release
-
-
-
-
Method Detail
-
init
public void init() throws Exception
Description copied from interface:Initialization
Initializes some resources required by the services or performs some initialization processes at Silverpeas startup.- Specified by:
init
in interfaceInitialization
- Throws:
Exception
- if an error occurs during the initialization process. In this case the Silverpeas startup fails.
-
getHandledComponentName
protected abstract String getHandledComponentName()
Gets the name of the component that the implementation handles.- Returns:
- the name of the component handled by the implementation.
-
getSubscribersOfComponent
public SubscriptionSubscriberList getSubscribersOfComponent(String componentInstanceId)
Description copied from interface:ResourceSubscriptionService
Gets all subscribers registered on a component.
This service does not look at resources handled by the component but just explicit component subscriptions.- Specified by:
getSubscribersOfComponent
in interfaceResourceSubscriptionService
- Parameters:
componentInstanceId
- the identifier of the component instance from which subscription are requested.- Returns:
- an instance of
SubscriptionSubscriberList
that represents a collection ofSubscriptionSubscriber
decorated with useful tool methods.
-
getSubscribersOfSubscriptionResource
public SubscriptionSubscriberList getSubscribersOfSubscriptionResource(SubscriptionResource subscriptionResource, SubscriberDirective... directives)
Description copied from interface:ResourceSubscriptionService
Gets all subscribers concerned by a specified subscription resource.
The inheritance of subscription is handled by this method. So if the aimed subscription resource has a parent subscription resource, subscribers of both of them are returned.- Specified by:
getSubscribersOfSubscriptionResource
in interfaceResourceSubscriptionService
- Parameters:
subscriptionResource
- the instance of subscription resource.- Returns:
- an instance of
SubscriptionSubscriberList
that represents a collection ofSubscriptionSubscriber
decorated with useful tool methods.
-
getSubscribersOfComponentAndTypedResource
public SubscriptionSubscriberList getSubscribersOfComponentAndTypedResource(String componentInstanceId, SubscriptionResourceType resourceType, String resourceId, SubscriberDirective... directives)
Description copied from interface:ResourceSubscriptionService
Gets all subscribers concerned by a specified resource represented by the given resource type and identifier.
The inheritance of subscription is handled by this method. So if the aimed subscription resource has a parent subscription resource, subscribers of both of them are returned.- Specified by:
getSubscribersOfComponentAndTypedResource
in interfaceResourceSubscriptionService
- Parameters:
componentInstanceId
- the identifier of the component instance from which subscription are requested.resourceType
- the type of the aimed resource.resourceId
- the identifier of the aimed resource.directives
- some directive to apply when it is necessary.- Returns:
- an instance of
SubscriptionSubscriberList
that represents a collection ofSubscriptionSubscriber
decorated with useful tool methods.
-
addAllSubscribersAboutNodePath
protected void addAllSubscribersAboutNodePath(NodePath nodePath, Collection<SubscriptionSubscriber> subscribers)
-
getNodeService
protected NodeService getNodeService()
-
-