public interface IMonitorManagerSPI extends IMonitorManager
Modifier and Type | Field and Description |
---|---|
static String |
FRIENDLY_ID_FIELD_EMAIL
Indicates the field to be used to generate friendly identifier of monitor users from
UserConfig is
UserConfig.getEmail() . |
static String |
FRIENDLY_ID_FIELD_ID
Indicates the field to be used to generate friendly identifier of monitor users from
UserConfig is
UserConfig.getId() . |
static String |
FRIENDLY_ID_FIELD_LOGIN
Indicates the field to be used to generate friendly identifier of monitor users from
UserConfig is
UserConfig.getLogin() . |
Modifier and Type | Method and Description |
---|---|
void |
addMonitorUser(UserConfig userConfig)
Adds a new monitor user to persistence.
|
void |
clearRequestRulesCache()
Clears the request rules cache.
|
IMonitorValuesProvider |
createMonitorUserValuesProviderForTrackId(String trackId)
Creates a new monitor values provider that returns the values for monitor user
fields corresponding to the given track identifier.
|
IMonitorValuesProvider |
createMonitorUserValuesProviderForUserId(String monitorUserId)
Creates a new monitor values provider that returns the values for monitor user
fields corresponding to the given user identifier.
|
void |
deleteMonitorUser(String userId)
Deletes monitor user.
|
Collection<IMonitorEvent> |
getAllEvents()
Returns all monitor events.
|
Collection<IMonitorField> |
getAllFields()
Returns all monitor fields.
|
String |
getCurrentMonitorUserTrackId()
Returns the track identifier of the current monitor user.
|
ExecutorService |
getExecutorService()
Returns the executor service to be used when monitoring values.
|
String |
getFriendlyIdUserField()
Returns the field used to calculated the monitor user's friendly id for portal users.
|
IMonitorContextSPI |
getMonitorContext()
Returns the current monitor context.
|
String |
getMonitorUserIdByTrackId(String monitorUserTrackId)
Returns the user identifier for a track identifier.
|
PrincipalConfig |
getMonitorUserPrincipal(String principalId)
Returns the principal object that represents a monitor user.
|
String |
getMonitorUserTrackId(String monitorUserId)
Returns the track identifier for a monitor user.
|
void |
init()
Initializes the monitor manager.
|
void |
initializeMonitoringData(ITransaction transaction)
Method called during portal database initialization to populate the
monitoring related data.
|
void |
initializeMonitorRequestRules()
Initializes the monitor request rules.
|
void |
loadMonitorUserInfo(String userId,
IUserConfigInitializer userConfigInitializer)
Provides a monitor user information to
IUserConfigInitializer . |
void |
mergeMonitorUserDuringAuthentication(String httpSessionId,
String srcMonitorUserId,
String destMonitorUserId)
Merges a monitor user to another, because a http session identified as the first monitor user was authenticated
as the second monitor user.
|
void |
mergeMonitorUsers(String srcMonitorUserId,
String destMonitorUserId)
Merger monitor users.
|
boolean |
monitorUserHasPortalUser(String monitorUserId)
Returns whether the monitor user with the given identifier has a portal user.
|
void |
reindexAllMonitorUser()
Reindex all monitor users and their event data.
|
void |
reindexGroupMember(Collection<String> principalIds)
Schedule reindex of monitor users due to membership change.
|
void |
restartExecutorService()
Restarts executor service.
|
void |
scheduleReindexMonitorUser(String id,
Long visitorId)
Schedules the reindexing of the monitor user with the given identifier on big data after the commit of the
current transaction.
|
void |
setFriendlyIdUserField(String field)
Sets the field used to calculated the monitor user's friendly id for portal users.
|
boolean |
shouldMonitorRequest(HttpServletRequest request)
Returns whether the given request should have the events monitored.
|
void |
shutdown()
Shutdowns the monitor manager.
|
IMonitor |
syncMonitor(String eventId)
Returns a synchronous monitor.
|
void |
updateMonitorDefinition(Set<String> definitionPaths)
Updates the monitor definition from the given file paths.
|
void |
updateMonitorUser(UserConfig userConfig,
UserConfig original)
Updates the data stored in a monitor user with the corresponding data on a portal user.
|
void |
upgradeEventData()
Schedules the upgrade of event data in BigData.
|
getCurrentMonitorUserId, getEvent, getField, getFieldGroup, monitor, monitor
static final String FRIENDLY_ID_FIELD_EMAIL
UserConfig
is
UserConfig.getEmail()
.setFriendlyIdUserField(String)
,
Constant Field Valuesstatic final String FRIENDLY_ID_FIELD_ID
UserConfig
is
UserConfig.getId()
.setFriendlyIdUserField(String)
,
Constant Field Valuesstatic final String FRIENDLY_ID_FIELD_LOGIN
UserConfig
is
UserConfig.getLogin()
.setFriendlyIdUserField(String)
,
Constant Field Valuesvoid initializeMonitoringData(ITransaction transaction) throws PortalException
transaction
- the transaction for persistence access.PortalException
void init()
void shutdown()
ExecutorService getExecutorService()
void restartExecutorService()
void updateMonitorDefinition(Set<String> definitionPaths) throws PortalException
definitionPaths
- the definition paths.PortalException
void scheduleReindexMonitorUser(String id, Long visitorId) throws PortalException
id
- the monitor user identifier.visitorId
- the monitor user visitor identifier.PortalException
IMonitorValuesProvider createMonitorUserValuesProviderForUserId(String monitorUserId)
monitorUserId
- the monitor user identifier.IMonitorValuesProvider createMonitorUserValuesProviderForTrackId(String trackId)
trackId
- the monitor user track identifier.void addMonitorUser(UserConfig userConfig) throws PortalException
userConfig
- the portal user.PortalException
void updateMonitorUser(UserConfig userConfig, UserConfig original) throws PortalException
userConfig
- the portal user with the updated information.userConfig
- the portal user with its information before update was done on it.PortalException
void mergeMonitorUserDuringAuthentication(String httpSessionId, String srcMonitorUserId, String destMonitorUserId) throws PortalException
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.
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.IllegalArgumentException
- if destMonitorUserId
represents a monitor user without an associated
portal user.IllegalArgumentException
- if srcMonitorUserId
and destMonitorUserId
are equal.PortalException
Collection<IMonitorEvent> getAllEvents() throws PortalException
PortalException
Collection<IMonitorField> getAllFields() throws PortalException
PortalException
IMonitorContextSPI getMonitorContext()
IMonitorManager
getMonitorContext
in interface IMonitorManager
boolean shouldMonitorRequest(HttpServletRequest request) throws PortalException
request
- the request.PortalException
void initializeMonitorRequestRules() throws PortalException
PortalException
void clearRequestRulesCache() throws PortalException
PortalException
void reindexAllMonitorUser() throws PortalException
PortalException
void setFriendlyIdUserField(String field) throws PortalException
Note: this method uses its own transaction.
field
- one of FRIENDLY_ID_FIELD_ID
, FRIENDLY_ID_FIELD_LOGIN
,
FRIENDLY_ID_FIELD_EMAIL
, the identifier of a UserAttribute
or null
to indicate no
friendly id.PortalException
String getFriendlyIdUserField() throws PortalException
FRIENDLY_ID_FIELD_ID
, FRIENDLY_ID_FIELD_LOGIN
,
FRIENDLY_ID_FIELD_EMAIL
, the identifier of a UserAttribute
or null
to indicate no
friendly id.PortalException
void reindexGroupMember(Collection<String> principalIds) throws PortalException
principalIds
- the principal identifiers where all monitor users that belongs to them must be reindexed.PortalException
- if the reindexing could not be scheduled.void upgradeEventData() throws PortalException
PortalException
void mergeMonitorUsers(String srcMonitorUserId, String destMonitorUserId) throws PortalException
PortalException
IMonitor syncMonitor(String eventId) throws PortalException
eventId
- the event identifierPortalException
IMonitorManager.monitor(String)
boolean monitorUserHasPortalUser(String monitorUserId)
monitorUserId
- the monitor user identifier.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.String getMonitorUserTrackId(String monitorUserId)
monitorUserId
- the monitor user identifier.null
if no such monitor user is available.String getMonitorUserIdByTrackId(String monitorUserTrackId)
monitorUserTrackId
- the track identifier.null
if no such track identifier is unavailable.String getCurrentMonitorUserTrackId()
null
if it is not set.void deleteMonitorUser(String userId)
userId
- the user identifier.void loadMonitorUserInfo(String userId, IUserConfigInitializer userConfigInitializer) throws PortalException
IUserConfigInitializer
.userId
- the user identifier.userConfigInitializer
- the initializer.PortalException
PrincipalConfig getMonitorUserPrincipal(String principalId)
principalId
- the principal identifier.null
if no such monitor user exists.LumisXP 12.1.0.191010 - Copyright © 2006–2019 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.