Package lumis.portal.monitor.impl
Class MonitorEvent
- java.lang.Object
-
- lumis.portal.monitor.impl.MonitorEvent
-
- All Implemented Interfaces:
IMonitorElementSPI<IMonitorEventSPI>
,IMonitorEvent
,IMonitorEventSPI
public class MonitorEvent extends java.lang.Object implements IMonitorEventSPI
Defines events to monitor. For field descriptions, see thedatabasedefinition.xml
.- Since:
- 9.0.0
- Version:
- $Revision: 24789 $ $Date: 2021-12-20 17:37:20 -0300 (Mon, 20 Dec 2021) $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
id
-
Fields inherited from interface lumis.portal.monitor.IMonitorEvent
DEFAULT_EVENT_PREFIX
-
-
Constructor Summary
Constructors Constructor Description MonitorEvent(java.lang.String id, java.lang.String serviceInstanceId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IMonitorEventSPI
addField(IMonitorField field, boolean required)
Adds the given field in this event.IMonitorEventSPI
addFieldGroup(IMonitorFieldGroup fieldGroup, boolean required)
Adds the given field group in this event.java.lang.String
getDescription()
Returns the description of this event.java.util.Collection<IMonitorFieldInstance>
getDirectFields()
Returns the fields that are associated with this event directly (not through a field group).java.util.Collection<IMonitorFieldInstance>
getFields()
Returns an unmodifiable collection of the fields that should be collected for this event.java.util.Collection<IMonitorFieldGroupInstance>
getFieldsGroups()
Returns the field groups associated with this event.java.lang.String
getId()
Returns the identifier of this element.java.lang.String
getImage()
Returns the image.java.lang.String
getLocalizedDescription()
Returns the localized description of this event.java.lang.String
getLocalizedName()
Returns the localized name of this event.java.lang.String
getLocalizedVerb()
Returns the localized verb of this event.java.lang.String
getName()
Returns the name of this event.java.lang.String
getServiceInstanceId()
Returns the identifier of the service instance this element belongs to.java.lang.String
getStringResourcePath()
The string resource path for localizing this event's strings.java.lang.String
getVerb()
Returns the verb.boolean
isEnabled()
Returns if the monitoring for this event is enabled.boolean
isProcessActionEvent()
Returns if the event is a process action event.IMonitorEventSPI
removeDirectFields(java.util.Collection<java.lang.String> fieldsIds)
Removes the direct fields that has their ids in the given ids collection.IMonitorEventSPI
removeField(java.lang.String fieldId)
Removes the given field.IMonitorEventSPI
removeFieldGroup(java.lang.String fieldGroupId)
Removes the given field group.IMonitorEventSPI
removeFieldsGroups(java.util.Collection<java.lang.String> fieldsGroupsIds)
Removes the fields groups that has their ids in the given ids collection.IMonitorEventSPI
setDescription(java.lang.String description)
Sets the description for this event.IMonitorEventSPI
setEnabled(boolean enabled)
Enables or disables the monitoring of this event.IMonitorEventSPI
setImage(java.lang.String image)
Sets the image.IMonitorEventSPI
setName(java.lang.String name)
Sets the name for this event.IMonitorEventSPI
setProcessActionEvent(boolean isProcessActionEvent)
Sets this event either as process action event or a normal one.IMonitorEventSPI
setStandard(boolean isStandard)
Sets this event either as standard or custom (non-standard).IMonitorEventSPI
setStringResourcePath(java.lang.String stringResourcePath)
Sets the string resource path for this event.IMonitorEventSPI
setVerb(java.lang.String verb)
Sets the image.protected void
validateLocalId(java.lang.String localId)
Validates the part of the identifier without the service instance identifier prefix, when the element belongs to a service instance.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface lumis.portal.monitor.IMonitorElementSPI
getId, getServiceInstanceId
-
Methods inherited from interface lumis.portal.monitor.IMonitorEvent
getId
-
-
-
-
Constructor Detail
-
MonitorEvent
public MonitorEvent(java.lang.String id, java.lang.String serviceInstanceId) throws PortalException
- Throws:
PortalException
-
-
Method Detail
-
validateLocalId
protected void validateLocalId(java.lang.String localId) throws PortalException
Validates the part of the identifier without the service instance identifier prefix, when the element belongs to a service instance.- Parameters:
localId
- the part of the identifier without the service instance identifier prefix.- Throws:
PortalException
- if the validation fails.
-
getDescription
public java.lang.String getDescription()
Description copied from interface:IMonitorEvent
Returns the description of this event. The description is localizable usingIMonitorEvent.getStringResourcePath()
.- Specified by:
getDescription
in interfaceIMonitorEvent
- Returns:
- the description of this event.
-
setDescription
public IMonitorEventSPI setDescription(java.lang.String description)
Description copied from interface:IMonitorEventSPI
Sets the description for this event.- Specified by:
setDescription
in interfaceIMonitorEventSPI
- Parameters:
description
- the description to set.- Returns:
- this event for chaining.
- See Also:
IMonitorEvent.getDescription()
-
isEnabled
public boolean isEnabled()
Description copied from interface:IMonitorEvent
Returns if the monitoring for this event is enabled.- Specified by:
isEnabled
in interfaceIMonitorEvent
- Returns:
- true if enabled or false if disabled.
-
setEnabled
public IMonitorEventSPI setEnabled(boolean enabled)
Description copied from interface:IMonitorEventSPI
Enables or disables the monitoring of this event.- Specified by:
setEnabled
in interfaceIMonitorEventSPI
- Parameters:
enabled
- true to enable or false to disable.- Returns:
- this event for chaining.
-
getName
public java.lang.String getName()
Description copied from interface:IMonitorEvent
Returns the name of this event. The name is localizable usingIMonitorEvent.getStringResourcePath()
.- Specified by:
getName
in interfaceIMonitorEvent
- Returns:
- the name of this event.
-
setName
public IMonitorEventSPI setName(java.lang.String name)
Description copied from interface:IMonitorEventSPI
Sets the name for this event.- Specified by:
setName
in interfaceIMonitorEventSPI
- Parameters:
name
- the name- Returns:
- this event for chaining.
- See Also:
IMonitorEvent.getName()
-
getStringResourcePath
public java.lang.String getStringResourcePath()
Description copied from interface:IMonitorEvent
The string resource path for localizing this event's strings.- Specified by:
getStringResourcePath
in interfaceIMonitorEvent
- Returns:
- the string resource path.
-
setStringResourcePath
public IMonitorEventSPI setStringResourcePath(java.lang.String stringResourcePath)
Description copied from interface:IMonitorEventSPI
Sets the string resource path for this event.- Specified by:
setStringResourcePath
in interfaceIMonitorEventSPI
- Parameters:
stringResourcePath
- the string resource path.- Returns:
- this event for chaining.
- See Also:
IMonitorEvent.getStringResourcePath()
-
getFields
public java.util.Collection<IMonitorFieldInstance> getFields()
Description copied from interface:IMonitorEvent
Returns an unmodifiable collection of the fields that should be collected for this event.- Specified by:
getFields
in interfaceIMonitorEvent
- Returns:
- an unmodifiable collection of the fields that should be collected for this event.
-
addField
public IMonitorEventSPI addField(IMonitorField field, boolean required)
Description copied from interface:IMonitorEventSPI
Adds the given field in this event.- Specified by:
addField
in interfaceIMonitorEventSPI
- Parameters:
field
- the field.required
- indicates whether the given field is required.- Returns:
- this event for chaining.
-
addFieldGroup
public IMonitorEventSPI addFieldGroup(IMonitorFieldGroup fieldGroup, boolean required)
Description copied from interface:IMonitorEventSPI
Adds the given field group in this event.- Specified by:
addFieldGroup
in interfaceIMonitorEventSPI
- Parameters:
fieldGroup
- the field grouprequired
- indicates whether the fields of the given field group are required.- Returns:
- this event for chaining.
-
removeField
public IMonitorEventSPI removeField(java.lang.String fieldId)
Description copied from interface:IMonitorEventSPI
Removes the given field.- Specified by:
removeField
in interfaceIMonitorEventSPI
- Parameters:
fieldId
- the field identifier.- Returns:
- this event.
-
removeFieldGroup
public IMonitorEventSPI removeFieldGroup(java.lang.String fieldGroupId)
Description copied from interface:IMonitorEventSPI
Removes the given field group.- Specified by:
removeFieldGroup
in interfaceIMonitorEventSPI
- Parameters:
fieldGroupId
- the field group identifier.- Returns:
- this event.
-
setStandard
public IMonitorEventSPI setStandard(boolean isStandard)
Description copied from interface:IMonitorEventSPI
Sets this event either as standard or custom (non-standard).- Specified by:
setStandard
in interfaceIMonitorEventSPI
- Parameters:
isStandard
- true to mark this event as standard, false to custom.- Returns:
- this event for chaining.
-
setProcessActionEvent
public IMonitorEventSPI setProcessActionEvent(boolean isProcessActionEvent)
Description copied from interface:IMonitorEventSPI
Sets this event either as process action event or a normal one.- Specified by:
setProcessActionEvent
in interfaceIMonitorEventSPI
- Parameters:
isProcessActionEvent
- true to mark this event as a process action one.- Returns:
- this event for chaining.
-
isProcessActionEvent
public boolean isProcessActionEvent()
Description copied from interface:IMonitorEventSPI
Returns if the event is a process action event.- Specified by:
isProcessActionEvent
in interfaceIMonitorEventSPI
- Returns:
- if the event is a process action event
-
getDirectFields
public java.util.Collection<IMonitorFieldInstance> getDirectFields()
Description copied from interface:IMonitorEventSPI
Returns the fields that are associated with this event directly (not through a field group).- Specified by:
getDirectFields
in interfaceIMonitorEventSPI
- Returns:
- the fields that are associated with this event directly (not through a field group).
-
removeDirectFields
public IMonitorEventSPI removeDirectFields(java.util.Collection<java.lang.String> fieldsIds)
Removes the direct fields that has their ids in the given ids collection.- Parameters:
fieldsIds
- the identifiers of the fields to be removed- Returns:
- this event for chaining
- Since:
- 14.0.0
-
getFieldsGroups
public java.util.Collection<IMonitorFieldGroupInstance> getFieldsGroups()
Description copied from interface:IMonitorEventSPI
Returns the field groups associated with this event.- Specified by:
getFieldsGroups
in interfaceIMonitorEventSPI
- Returns:
- the field groups associated with this event.
-
removeFieldsGroups
public IMonitorEventSPI removeFieldsGroups(java.util.Collection<java.lang.String> fieldsGroupsIds)
Removes the fields groups that has their ids in the given ids collection.- Parameters:
fieldsGroupsIds
- the identifiers of the fields groups to be removed- Returns:
- this event for chaining
- Since:
- 14.0.0
-
getLocalizedDescription
public java.lang.String getLocalizedDescription()
Description copied from interface:IMonitorEvent
Returns the localized description of this event.- Specified by:
getLocalizedDescription
in interfaceIMonitorEvent
- Returns:
- the description of this event.
-
getLocalizedName
public java.lang.String getLocalizedName()
Description copied from interface:IMonitorEvent
Returns the localized name of this event.- Specified by:
getLocalizedName
in interfaceIMonitorEvent
- Returns:
- the name for this event.
-
getImage
public java.lang.String getImage()
Description copied from interface:IMonitorEvent
Returns the image.- Specified by:
getImage
in interfaceIMonitorEvent
- Returns:
- the image
-
setImage
public IMonitorEventSPI setImage(java.lang.String image)
Description copied from interface:IMonitorEventSPI
Sets the image.- Specified by:
setImage
in interfaceIMonitorEventSPI
- Parameters:
image
- the image value to set.
-
setVerb
public IMonitorEventSPI setVerb(java.lang.String verb)
Description copied from interface:IMonitorEventSPI
Sets the image.- Specified by:
setVerb
in interfaceIMonitorEventSPI
-
getVerb
public java.lang.String getVerb()
Description copied from interface:IMonitorEvent
Returns the verb.- Specified by:
getVerb
in interfaceIMonitorEvent
- Returns:
- the verb.
-
getLocalizedVerb
public java.lang.String getLocalizedVerb()
Description copied from interface:IMonitorEvent
Returns the localized verb of this event.- Specified by:
getLocalizedVerb
in interfaceIMonitorEvent
- Returns:
- the verb for this event.
-
getId
public java.lang.String getId()
Returns the identifier of this element.- Returns:
- the identifier.
- Since:
- 14.0.0
-
getServiceInstanceId
public java.lang.String getServiceInstanceId()
Returns the identifier of the service instance this element belongs to.- Returns:
- the identifier of the service instance this element belongs to or
null
if this element is global. - Since:
- 14.0.0
-
-