Interface IMonitorManagerSPI

    • Method Detail

      • initializeMonitoringData

        void initializeMonitoringData​(ITransaction transaction)
                               throws PortalException
        Method called during portal database initialization to populate the monitoring related data.
        Parameters:
        transaction - the transaction for persistence access.
        Throws:
        PortalException
        Since:
        9.0.0
      • init

        void init()
        Initializes the monitor manager.
        Since:
        9.0.0
      • shutdown

        void shutdown()
        Shutdowns the monitor manager.
        Since:
        9.0.0
      • submit

        void submit​(java.lang.Runnable task)
        Executes the given task at some time in the future using monitor internal executor service.
        Parameters:
        task - the runnable task.
        Throws:
        java.util.concurrent.RejectedExecutionException - if this task cannot be accepted for execution.
        java.lang.NullPointerException - if command is null.
        Since:
        14.0.0
      • restartExecutorService

        void restartExecutorService()
        Restarts executor service.
        Since:
        9.0.0
      • updateMonitorDefinition

        void updateMonitorDefinition​(java.util.Set<java.lang.String> definitionPaths)
                              throws PortalException
        Updates the monitor definition from the given file paths. The files will be read from the class loader.
        Parameters:
        definitionPaths - the definition paths.
        Throws:
        PortalException
        Since:
        11.0.0
      • scheduleReindexMonitorUser

        void scheduleReindexMonitorUser​(java.lang.String id,
                                        java.lang.Long visitorId)
                                 throws PortalException
        Schedules the reindexing of the monitor user with the given identifier on big data after the commit of the current transaction.
        Parameters:
        id - the monitor user identifier.
        visitorId - the monitor user visitor identifier.
        Throws:
        PortalException
        Since:
        12.0.0
      • createMonitorUserValuesProviderForUserId

        IMonitorValuesProvider createMonitorUserValuesProviderForUserId​(java.lang.String monitorUserId)
        Creates a new monitor values provider that returns the values for monitor user fields corresponding to the given user identifier. This provider will persist a monitor user when requested for values if no monitor user with the given identifier exists.
        Parameters:
        monitorUserId - the monitor user identifier.
        Returns:
        the monitor values provider.
        Since:
        12.0.0
      • createMonitorUserValuesProviderForTrackId

        IMonitorValuesProvider createMonitorUserValuesProviderForTrackId​(java.lang.String trackId)
        Creates a new monitor values provider that returns the values for monitor user fields corresponding to the given track identifier. This provider will persist a monitor user when requested for values if no monitor user with the given identifier exists.
        Parameters:
        trackId - the monitor user track identifier.
        Returns:
        the monitor values provider.
        Since:
        12.0.0
      • addMonitorUser

        void addMonitorUser​(UserConfig userConfig)
                     throws PortalException
        Adds a new monitor user to persistence.
        Parameters:
        userConfig - the portal user.
        Throws:
        PortalException
        Since:
        11.0.0
      • updateMonitorUser

        void updateMonitorUser​(UserConfig userConfig,
                               UserConfig original)
                        throws PortalException
        Updates the data stored in a monitor user with the corresponding data on a portal user.
        Parameters:
        userConfig - the portal user with the updated information.
        userConfig - the portal user with its information before update was done on it.
        Throws:
        PortalException
        Since:
        12.0.0
      • mergeMonitorUserDuringAuthentication

        void mergeMonitorUserDuringAuthentication​(java.lang.String httpSessionId,
                                                  java.lang.String srcMonitorUserId,
                                                  java.lang.String destMonitorUserId)
                                           throws PortalException
        Merges a monitor user to another, because a http session identified as the first monitor user was authenticated as the second monitor user.

        This method uses its own transaction for this operation.

        If the source monitor user has some identification (an associated portal user or friendlyId set) then a partial merge will be performed. Otherwise a full merge will be performed.

        A partial merge will move non-authenticated event data that belongs to the specified HTTP session and the source monitor user to the destination monitor user.

        A full merge will move all event data that belongs to the source monitor user to the destination monitor user, will copy source monitor user's properties to the destination monitor user (but will not overwrite data of destination monitor user's portal user as per monitor user standard behavior) and will delete the source monitor user.

        Parameters:
        httpSessionId - http session identifier used for partial merge.
        srcMonitorUserId - the monitor user that will be merged to another.
        destMonitorUserId - the monitor user destination of the merge.
        Throws:
        java.lang.IllegalArgumentException - if destMonitorUserId represents a monitor user without an associated portal user.
        java.lang.IllegalArgumentException - if srcMonitorUserId and destMonitorUserId are equal.
        PortalException
        Since:
        11.0.0
      • shouldMonitorRequest

        boolean shouldMonitorRequest​(javax.servlet.http.HttpServletRequest request)
                              throws PortalException
        Returns whether the given request should have the events monitored.
        Parameters:
        request - the request.
        Returns:
        whether the given request should have the events monitored.
        Throws:
        PortalException
        Since:
        11.0.0
      • initializeMonitorRequestRules

        void initializeMonitorRequestRules()
                                    throws PortalException
        Initializes the monitor request rules.
        Throws:
        PortalException
        Since:
        11.0.0
      • reindexAllMonitorUser

        void reindexAllMonitorUser()
                            throws PortalException
        Reindex all monitor users and their event data.
        Throws:
        PortalException
        Since:
        11.0.0
      • reindexGroupMember

        void reindexGroupMember​(java.util.Collection<java.lang.String> principalIds)
                         throws PortalException
        Schedule reindex of monitor users due to membership change.
        Parameters:
        principalIds - the principal identifiers where all monitor users that belongs to them must be reindexed.
        Throws:
        PortalException - if the reindexing could not be scheduled.
        Since:
        11.0.0
      • upgradeEventData

        void upgradeEventData()
                       throws PortalException
        Schedules the upgrade of event data in BigData.
        Throws:
        PortalException
        Since:
        11.0.0
      • mergeMonitorUsers

        void mergeMonitorUsers​(java.lang.String srcMonitorUserId,
                               java.lang.String destMonitorUserId)
                        throws PortalException
        Merger monitor users.
        Throws:
        PortalException
        Since:
        11.0.0
      • monitorUserHasPortalUser

        boolean monitorUserHasPortalUser​(java.lang.String monitorUserId)
        Returns whether the monitor user with the given identifier has a portal user.
        Parameters:
        monitorUserId - the monitor user identifier.
        Returns:
        true if the corresponding monitor user has a portal user, false if the monitor user does not have a portal user or if it was not found.
        Since:
        12.0.0
      • getMonitorUserTrackId

        java.lang.String getMonitorUserTrackId​(java.lang.String monitorUserId)
        Returns the track identifier for a monitor user.
        Parameters:
        monitorUserId - the monitor user identifier.
        Returns:
        the track identifier, or null if no such monitor user is available.
        Since:
        12.0.0
      • getMonitorUserIdByTrackId

        java.lang.String getMonitorUserIdByTrackId​(java.lang.String monitorUserTrackId)
        Returns the user identifier for a track identifier.
        Parameters:
        monitorUserTrackId - the track identifier.
        Returns:
        the user identifier, or null if no such track identifier is unavailable.
        Since:
        12.0.0
      • getCurrentMonitorUserTrackId

        java.lang.String getCurrentMonitorUserTrackId()
        Returns the track identifier of the current monitor user.
        Returns:
        the monitor user track identifier, or null if it is not set.
        Since:
        12.0.0
      • deleteMonitorUser

        void deleteMonitorUser​(java.lang.String userId)
        Deletes monitor user. This is to be used internally when a portal user will be deleted.
        Parameters:
        userId - the user identifier.
        Since:
        12.0.0
      • deleteUserActivities

        void deleteUserActivities​(java.lang.String userId)
                           throws PortalException
        Delete monitor user activities.
        Parameters:
        userId - the user identifier.
        Throws:
        PortalException
        Since:
        12.3.0
      • getMonitorUserPrincipal

        PrincipalConfig getMonitorUserPrincipal​(java.lang.String principalId)
        Returns the principal object that represents a monitor user.
        Parameters:
        principalId - the principal identifier.
        Returns:
        the principal or null if no such monitor user exists.
        Since:
        12.0.0
      • getStatistics

        IMonitorStatistics getStatistics()
        Returns statistics about monitoring framework.
        Returns:
        statistics about monitoring framework.
        Since:
        12.2.0
      • updateAllMonitorEventDocumentTypes

        @Deprecated
        void updateAllMonitorEventDocumentTypes()
                                         throws PortalException
        Deprecated.
        Updates all monitor event document types. Ignores the events that doesn't have the document types created.
        Throws:
        PortalException
        Since:
        12.2.0
      • updateMonitorUserDocumentType

        void updateMonitorUserDocumentType​(IBigDataRepository repository)
                                    throws PortalException
        Updates monitor user document types. Ignores the events that doesn't have the document types created.
        Parameters:
        repository - the big data repository to use.
        Throws:
        PortalException
        Since:
        12.2.0
      • anonymizeAllMonitorUser

        void anonymizeAllMonitorUser()
                              throws PortalException
        Anonymizes all monitor users without consent.
        Throws:
        PortalException
        Since:
        12.3.0
      • anonymizeMonitorUser

        void anonymizeMonitorUser​(java.lang.String monitorUserId)
                           throws PortalException
        Anonymizes the given monitor user. Any consents in the given user will be removed.
        Parameters:
        monitorUserId - the monitor user identifier.
        Throws:
        PortalException
        Since:
        12.3.0
      • anonymizeMonitorUsers

        void anonymizeMonitorUsers​(java.util.Collection<java.lang.String> monitorUserIds)
                            throws PortalException
        Anonymizes the given monitor users. Any consents in the given user will be removed. This operation will be performed in background.
        Parameters:
        monitorUserIds - the monitor user identifiers.
        Throws:
        PortalException
        Since:
        12.3.0
      • reindexMonitorUsers

        void reindexMonitorUsers​(java.util.Collection<java.lang.String> monitorUserIds)
                          throws PortalException
        Reindex the given monitor users.
        Parameters:
        monitorUserIds - the monitor user identifiers.
        Throws:
        PortalException
        Since:
        12.3.0
      • updateAllEventsDocumentTypes

        void updateAllEventsDocumentTypes()
                                   throws PortalException
        Updates all events document types. Ignores the events that doesn't have the document types created.
        Throws:
        PortalException
        Since:
        12.4.0
      • deleteMonitorElementsFromServiceInstance

        void deleteMonitorElementsFromServiceInstance​(ServiceInstanceConfig serviceInstance)
        Deletes events, fields and field groups of the given service instance.
        Parameters:
        serviceInstance - the service instance
        Since:
        12.5.0
      • clearEventsCache

        void clearEventsCache​(java.lang.String eventId)
                       throws PortalException
        Clears the cache relative to the event with the given identifier.
        Parameters:
        eventId - the event identifier.
        Throws:
        PortalException
        Since:
        14.0.0
      • getEventFromCache

        IMonitorEventSPI getEventFromCache​(java.lang.String eventId)
                                    throws PortalException
        Returns the event with the given identifier using the internal monitor manager events cache. This method is intended to be the most performance efficient possible. It is more efficient than IMonitorManager.getEvent(String), but the the event returned here is detached.
        Parameters:
        eventId - the event identifier.
        Returns:
        the detached event, or null if no event with the given identifier was found.
        Throws:
        PortalException
        Since:
        14.0.0