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 java.lang.String
PROPERTY_ACTIVITY_PROCESSOR_DEFAULT_VALUE
Default value for service instance property bag that indicates whatActivityProcessorConfig
to use for its activities.static java.lang.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 java.util.List<ActivityObjectType>
findObjectTypes(java.lang.String query)
Find the first ten activity stream object types by id, given a search query.java.util.List<ActivityObjectType>
findObjectTypes(java.lang.String query, int maxResults)
Find activity stream object types by id, given a search query.java.lang.Integer
getActivitiesMaxAgeInDays()
Get the number of days anActivity
can exist before being removed.IActivityProcessorConfig
getActivityProcessorConfig(java.lang.String activityProcessorId)
Returns the activity processor of the given identifier.java.lang.String
getActivityProcessorId(ChannelConfig channel)
Get the activity processor identifier of the given channel.java.lang.String
getActivityProcessorId(ServiceInstanceConfig serviceInstance)
Get the activity processor identifier of the given service instance.java.lang.String
getLocalActivityProcessorId(ChannelConfig channel)
Get the local activity processor identifier of the given channel.java.lang.String
getLocalActivityProcessorId(ServiceInstanceConfig serviceInstance)
Get the local activity processor identifier of the given service instance.java.util.List<ActivityObjectType>
getObjectTypes()
Returns list of persisted activity object types.void
registerActivityProcessor(java.lang.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(java.lang.Integer days)
Set the number of days anActivity
can exist before being removed.void
setActivityProcessorConfig(java.lang.String activityProcessorId, ChannelConfig channel)
Set the Activity Processor for the given channel.void
setActivityProcessorConfig(java.lang.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(java.lang.String activityProcessorConfigId)
Unregisters an activity processor configuration.void
updateActivityObject(ActivityObject activityObject, java.lang.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 java.lang.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 java.lang.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
java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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
java.lang.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
java.lang.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
java.lang.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
java.lang.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(java.lang.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
java.util.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 java.util.List<ActivityObjectType> findObjectTypes(java.lang.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
java.util.List<ActivityObjectType> findObjectTypes(java.lang.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, java.lang.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.java.lang.IllegalArgumentException
- if no scope is specified.- Since:
- 10.1.1
-
-