Interface IActivityStreamManagerSPI

    • 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 what ActivityProcessorConfig to use for its activities. The value of this property may be the identifier of the ActivityProcessorConfig to use, or null 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 what ActivityProcessorConfig 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 all activities 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 an Activity 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 an Activity 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 Id
        serviceInstance - 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 Id
        channel - 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
      • 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 types
        maxResults - 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 and targets with same identifier and type as the given activityObject 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