Package lumis.portal.monitor
Class SimpleMonitorValuesProvider
- java.lang.Object
-
- lumis.portal.monitor.SimpleMonitorValuesProvider
-
- All Implemented Interfaces:
java.io.Serializable
,IMonitorValuesProvider
- Direct Known Subclasses:
BusinessContextMonitorValuesProvider
,FlowManager.AutomationFlowMonitorValuesProvider
@StableMinor(version="16.1", sinceVersion="9.0") public class SimpleMonitorValuesProvider extends java.lang.Object implements IMonitorValuesProvider
SimpleIMonitorValuesProvider
that holds and serves a map of values.- Since:
- 9.0.0
- Version:
- $Revision: 26156 $ $Date: 2024-01-13 10:26:46 -0300 (Sat, 13 Jan 2024) $
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleMonitorValuesProvider(java.util.Map<java.lang.String,java.util.List<? extends java.io.Serializable>> values)
Creates a new instance with the given values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<? extends java.io.Serializable>
getValues(SessionConfig sessionConfig, IMonitorField field, ITransaction transaction)
Returns the values for the given field.
If this value provider does not provide values for the given field, it must returnnull
.
Note that returning anull
value is not the same as returning an empty list.java.lang.String
toString()
-
-
-
Constructor Detail
-
SimpleMonitorValuesProvider
public SimpleMonitorValuesProvider(java.util.Map<java.lang.String,java.util.List<? extends java.io.Serializable>> values)
Creates a new instance with the given values.- Parameters:
values
- the map of field values, where the map entry key is the field identifier and the map entry values is a list of the values for the corresponding field. Anynull
or empty string in the list of values will be ignored. If for a field all values in the list arenull
or empty string, or if it is an empty list, the provider will return an empty list indicating that there is no value that field. This behavior is the same as specified inIMonitorValuesProvider.getValues(SessionConfig, IMonitorField, ITransaction)
.- Since:
- 9.0.0
-
-
Method Detail
-
getValues
public java.util.List<? extends java.io.Serializable> getValues(SessionConfig sessionConfig, IMonitorField field, ITransaction transaction) throws java.lang.Exception
Description copied from interface:IMonitorValuesProvider
Returns the values for the given field.
If this value provider does not provide values for the given field, it must returnnull
.
Note that returning anull
value is not the same as returning an empty list. When returning an empty list, it is implied that the field has an explicitnull
value. When anull
value is returned, then other value providers will be called. If a non-null
value is returned (even an empty list), then other value providers will not be called. Anynull
value or empty string in the returned list will be ignored, meaning that a list with onlynull
or empty strings will be considered an empty list.It is important to notice also that the given session config is not the session of the user that generated the monitoring event. Instead, it is a
system user
session.
As well as session config, the given transaction is not related to the transaction that generated the event (if any).- Specified by:
getValues
in interfaceIMonitorValuesProvider
- Parameters:
sessionConfig
- the current session.field
- the desired field.transaction
- the current transaction.- Returns:
- the values for the desired field.
- Throws:
java.lang.Exception
- if some error occur.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-