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 |
---|---|
String |
addMonitorUser(UserConfig userConfig)
Adds a new monitor user to persistence.
|
void |
clearRequestRulesCache()
Clears the request rules cache.
|
Collection<IMonitorEvent> |
getAllEvents()
Returns all monitor events.
|
Collection<IMonitorField> |
getAllFields()
Returns all monitor fields.
|
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.
|
IMonitorValuesProvider |
getMonitorUserValuesProvider(String monitorUserId)
Returns a monitor values provider that returns the values for monitor user
fields.
|
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 |
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.
|
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)
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.
|
void |
updateMonitorDefinition(Set<String> definitionPaths)
Updates the monitor definition from the given file paths.
|
void |
updateMonitorUser(String monitorUserId,
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) throws PortalException
id
- the monitor user identifier.PortalException
IMonitorValuesProvider getMonitorUserValuesProvider(String monitorUserId)
monitorUserId
- the monitor user identifier.String addMonitorUser(UserConfig userConfig) throws PortalException
userConfig
- the portal user.PortalException
void updateMonitorUser(String monitorUserId, UserConfig userConfig, UserConfig original) throws PortalException
monitorUserId
- the monitor user's identifier.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
LumisXP 11.2.0.190404 - Copyright © 2006–2019 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.