Package lumis.portal.activitystream
Interface IActivityStreamManagerSPI
-
- All Superinterfaces:
IActivityStreamManager
- All Known Implementing Classes:
ActivityStreamManager
public interface IActivityStreamManagerSPI extends IActivityStreamManager
Service provider interface for the activity stream framework manager.- Since:
- 8.2.0
- Version:
- $Revision: 20072 $ $Date: 2017-03-30 18:32:33 -0300 (Thu, 30 Mar 2017) $
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROPERTY_ACTIVITY_PROCESSOR_DEFAULT_VALUE
Default value for service instance property bag that indicates whatActivityProcessorConfig
to use for its activities.static String
PROPERTY_NAME_ACTIVITY_PROCESSOR_CONFIG_ID
Property in service instance property bag that indicates whatActivityProcessorConfig
to use for its activities.-
Fields inherited from interface lumis.portal.activitystream.IActivityStreamManager
ACTION_ID_ADD, ACTION_ID_CREATE, ACTION_ID_DELETE, ACTION_ID_REMOVE, ACTION_ID_SHARE, ACTION_ID_UPDATE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
deleteOldActivities()
Removes allactivities
that have reached their age deadline.void
disableActivityProcessor(ChannelConfig channel)
Set the activity processor of the given channel to disabledvoid
disableActivityProcessor(ServiceInstanceConfig serviceInstance)
Set the activity processor of the given service instance to disableddefault List<ActivityObjectType>
findObjectTypes(String query)
Find the first ten activity stream object types by id, given a search query.List<ActivityObjectType>
findObjectTypes(String query, int maxResults)
Find activity stream object types by id, given a search query.Integer
getActivitiesMaxAgeInDays()
Get the number of days anActivity
can exist before being removed.IActivityProcessorConfig
getActivityProcessorConfig(String activityProcessorId)
Returns the activity processor of the given identifier.String
getActivityProcessorId(ChannelConfig channel)
Get the activity processor identifier of the given channel.String
getActivityProcessorId(ServiceInstanceConfig serviceInstance)
Get the activity processor identifier of the given service instance.String
getLocalActivityProcessorId(ChannelConfig channel)
Get the local activity processor identifier of the given channel.String
getLocalActivityProcessorId(ServiceInstanceConfig serviceInstance)
Get the local activity processor identifier of the given service instance.List<ActivityObjectType>
getObjectTypes()
Returns list of persisted activity object types.void
registerActivityProcessor(String activityProcessorConfigPath)
Registers an activity processor configuration.void
registerDefaultActions()
Registers built-in default activity stream actions.void
registerDefaultActivityProcessors()
Registers built-in default activity processors.void
setActivitiesMaxAgeInDays(Integer days)
Set the number of days anActivity
can exist before being removed.void
setActivityProcessorConfig(String activityProcessorId, ChannelConfig channel)
Set the Activity Processor for the given channel.void
setActivityProcessorConfig(String activityProcessorId, ServiceInstanceConfig serviceInstance)
Set the Activity Processor for the given service instance.void
setActivityProcessorInherited(ChannelConfig channel)
Set the activity processor of the given channel to be inherited from the parent channelvoid
setActivityProcessorInherited(ServiceInstanceConfig serviceInstance)
Set the activity processor of the given service instance to be inherited from the parent channelvoid
unregisterActivityProcessor(String activityProcessorConfigId)
Unregisters an activity processor configuration.void
updateActivityObject(ActivityObject activityObject, String scope)
Updates the given activity object for the activity in the specified scopes.-
Methods inherited from interface lumis.portal.activitystream.IActivityStreamManager
addAction, addActivity, addObjectType, createActivityStructureSearchQueryFilter, createPriorityAndUserSearchQueryFilter, deleteAction, deleteActivity, deleteObjectType, getAction, getObjectType, getReadActivityIds, isActivityRead, markActivityAsRead, markActivityAsUnread
-
-
-
-
Field Detail
-
PROPERTY_NAME_ACTIVITY_PROCESSOR_CONFIG_ID
static final String PROPERTY_NAME_ACTIVITY_PROCESSOR_CONFIG_ID
Property in service instance property bag that indicates whatActivityProcessorConfig
to use for its activities. The value of this property may be the identifier of theActivityProcessorConfig
to use, ornull
if activity generation is disabled.- Since:
- 8.2.0
- See Also:
- Constant Field Values
-
PROPERTY_ACTIVITY_PROCESSOR_DEFAULT_VALUE
static final String PROPERTY_ACTIVITY_PROCESSOR_DEFAULT_VALUE
Default value for service instance property bag that indicates whatActivityProcessorConfig
to use for its activities.- Since:
- 8.2.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
registerDefaultActions
void registerDefaultActions() throws PortalException
Registers built-in default activity stream actions.- Throws:
PortalException
- Since:
- 8.2.0
-
deleteOldActivities
void deleteOldActivities() throws PortalException
Removes allactivities
that have reached their age deadline. The deadline is configured in the activity stream global administration interface.- Throws:
PortalException
- Since:
- 8.2.0
-
getActivitiesMaxAgeInDays
Integer getActivitiesMaxAgeInDays() throws PortalException
Get the number of days anActivity
can exist before being removed.- Returns:
- the number of days.
- Throws:
PortalException
- Since:
- 8.2.0
-
setActivitiesMaxAgeInDays
void setActivitiesMaxAgeInDays(Integer days) throws PortalException
Set the number of days anActivity
can exist before being removed.- Parameters:
days
- the number of days to set.- Throws:
PortalException
- Since:
- 8.2.0
-
registerActivityProcessor
void registerActivityProcessor(String activityProcessorConfigPath) throws PortalException
Registers an activity processor configuration.- Parameters:
activityProcessorConfigPath
- the path to the activity processor configuration, relative to the classpath.- Throws:
PortalException
- if the configuration could not be registered.- Since:
- 8.2.0
-
unregisterActivityProcessor
void unregisterActivityProcessor(String activityProcessorConfigId) throws PortalException
Unregisters an activity processor configuration.- Parameters:
activityProcessorConfigId
- the identifier of the activity processor configuration.- Throws:
PortalException
- if the configuration could not be unregistered.- Since:
- 8.2.0
-
registerDefaultActivityProcessors
void registerDefaultActivityProcessors() throws PortalException
Registers built-in default activity processors.- Throws:
PortalException
- Since:
- 8.2.0
-
setActivityProcessorConfig
void setActivityProcessorConfig(String activityProcessorId, ServiceInstanceConfig serviceInstance) throws PortalException
Set the Activity Processor for the given service instance.- Parameters:
activityProcessorId
- the activity processor IdserviceInstance
- the service instance to get the property bag- Throws:
PortalException
- Since:
- 8.2.0
-
setActivityProcessorConfig
void setActivityProcessorConfig(String activityProcessorId, ChannelConfig channel) throws PortalException
Set the Activity Processor for the given channel.- Parameters:
activityProcessorId
- the activity processor Idchannel
- the channel to get the property bag- Throws:
PortalException
- Since:
- 8.2.0
-
setActivityProcessorInherited
void setActivityProcessorInherited(ServiceInstanceConfig serviceInstance) throws PortalException
Set the activity processor of the given service instance to be inherited from the parent channel- Parameters:
serviceInstance
- the service instance- Throws:
PortalException
- Since:
- 8.2.0
-
setActivityProcessorInherited
void setActivityProcessorInherited(ChannelConfig channel) throws PortalException
Set the activity processor of the given channel to be inherited from the parent channel- Parameters:
channel
- the channel config- Throws:
PortalException
- Since:
- 8.2.0
-
disableActivityProcessor
void disableActivityProcessor(ServiceInstanceConfig serviceInstance) throws PortalException
Set the activity processor of the given service instance to disabled- Parameters:
serviceInstance
- the service instance- Throws:
PortalException
- Since:
- 8.2.0
-
disableActivityProcessor
void disableActivityProcessor(ChannelConfig channel) throws PortalException
Set the activity processor of the given channel to disabled- Parameters:
channel
- the channel config- Throws:
PortalException
- Since:
- 8.2.0
-
getActivityProcessorId
String getActivityProcessorId(ServiceInstanceConfig serviceInstance) throws PortalException
Get the activity processor identifier of the given service instance.- Parameters:
serviceInstance
- the service instance- Throws:
PortalException
- Since:
- 8.2.0
-
getActivityProcessorId
String getActivityProcessorId(ChannelConfig channel) throws PortalException
Get the activity processor identifier of the given channel.- Parameters:
channel
- the channel config- Throws:
PortalException
- Since:
- 8.2.0
-
getLocalActivityProcessorId
String getLocalActivityProcessorId(ServiceInstanceConfig serviceInstance) throws PortalException
Get the local activity processor identifier of the given service instance.- Parameters:
serviceInstance
- the service instance- Throws:
PortalException
- Since:
- 8.2.0
-
getLocalActivityProcessorId
String getLocalActivityProcessorId(ChannelConfig channel) throws PortalException
Get the local activity processor identifier of the given channel.- Parameters:
channel
- the channel config- Throws:
PortalException
- Since:
- 8.2.0
-
getActivityProcessorConfig
IActivityProcessorConfig getActivityProcessorConfig(String activityProcessorId) throws PortalException
Returns the activity processor of the given identifier.- Parameters:
activityProcessorId
- the activity processor identifier.- Returns:
- the activity processor of the given identifier.
- Throws:
PortalException
- Since:
- 10.0.0
-
getObjectTypes
List<ActivityObjectType> getObjectTypes() throws PortalException
Returns list of persisted activity object types.- Returns:
- list of persisted activity object types.
- Throws:
PortalException
- Since:
- 10.1.0
-
findObjectTypes
default List<ActivityObjectType> findObjectTypes(String query) throws PortalException
Find the first ten activity stream object types by id, given a search query.- Parameters:
query
- query used to search object types- Returns:
- List of object types which matches the search query, ordered by id.
- Throws:
PortalException
- Since:
- 10.1.0
- See Also:
findObjectTypes(String, int)
-
findObjectTypes
List<ActivityObjectType> findObjectTypes(String query, int maxResults) throws PortalException
Find activity stream object types by id, given a search query.- Parameters:
query
- query used to search object typesmaxResults
- amount of object types to return- Returns:
- List of object types which matches the search query, ordered by id.
- Throws:
PortalException
- Since:
- 10.1.0
-
updateActivityObject
void updateActivityObject(ActivityObject activityObject, String scope) throws PortalException
Updates the given activity object for the activity in the specified scopes.For each activity in the specified scope, the activity's
objects
andtargets
with sameidentifier
andtype
as the givenactivityObject
are updated with its properties.To prevent excessive resource usage, this method may update only some of the activity objects, leaving the other unmodified.
This method was initially intended for public API, but it has some strange limitations and may be replaced/modified, so keeping in SPI for now.
- Parameters:
activityObject
- the activity object with updated information.scope
- the scope of activities to be processed.- Throws:
PortalException
- if the operation could not be completed.IllegalArgumentException
- if no scope is specified.- Since:
- 10.1.1
-
-