Package lumis.portal.monitor.impl
Class MonitorField
- java.lang.Object
-
- lumis.portal.monitor.impl.MonitorField
-
- All Implemented Interfaces:
IMonitorElementSPI<IMonitorFieldSPI>
,IMonitorField
,IMonitorFieldSPI
public class MonitorField extends java.lang.Object implements IMonitorFieldSPI
Monitor field.- Since:
- 9.0.0
- Version:
- $Revision: 24789 $ $Date: 2021-12-20 17:37:20 -0300 (Mon, 20 Dec 2021) $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface lumis.portal.monitor.IMonitorField
IMonitorField.DataType
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
id
-
Constructor Summary
Constructors Constructor Description MonitorField(java.lang.String id, java.lang.String serviceInstanceId, IMonitorField.DataType dataType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IMonitorFieldSPI
addInnerField(IMonitorField innerField)
Adds the given inner field.IMonitorFieldSPI
clearInnerFields()
Removes all inner fields.IMonitorField.DataType
getDataType()
Returns this field data type.java.lang.String
getDescription()
Returns the (localizable description).java.lang.String
getId()
Returns the identifier of this element.java.lang.Boolean
getIdentifiesUserOverride()
Returns whether this field identifies the user and must have its value modified when anonymized according to configuration of the current environment.java.util.Collection<IMonitorField>
getInnerFields()
Returns an unmodifiable collection of inner fields.java.lang.String
getLocalizedDescription()
Returns the localized description of this field.java.lang.String
getLocalizedName()
Returns the localized name of this field.java.lang.String
getLocalizedUnit()
Returns the localized unit of this field.java.lang.String
getName()
Returns the (localizable) name of this field.IMonitorField
getParent()
Returns this field parent field.java.lang.String
getServiceInstanceId()
Returns the identifier of the service instance this element belongs to.java.lang.String
getStringResourcePath()
Returns this field string resource path (used, if present, to localize strings).java.lang.String
getUnit()
Returns the (localizable) unit of this field.boolean
identifiesUser()
Indicates whether this field identifies the user and must have its value modified when anonymized.boolean
isIdentifiesUserDefinition()
Returns whether this field identifies the user and must have its value modified when anonymized according to the definition of this field.boolean
isStandard()
Returns whether this is a standard field.IMonitorFieldSPI
removeInnerField(java.lang.String innerFieldId)
Removes the given inner field.IMonitorFieldSPI
setDataType(IMonitorField.DataType dataType)
Sets the data type for this field.IMonitorFieldSPI
setDescription(java.lang.String description)
Sets the (localizable description).IMonitorFieldSPI
setIdentifiesUserDefinition(boolean identifiesUserDefinition)
Sets whether this field identifies the user and must have its value modified when anonymized according to the definition of this field.IMonitorFieldSPI
setIdentifiesUserOverride(java.lang.Boolean identifiesUserOverride)
Sets whether this field identifies the user and must have its value modified when anonymized, according to configuration of the current environment.IMonitorFieldSPI
setName(java.lang.String name)
Sets the (localizable) name of this field.IMonitorFieldSPI
setStandard(boolean isStandard)
Sets this field either as standard or custom (non-standard).IMonitorFieldSPI
setStringResourcePath(java.lang.String stringResourcePath)
Sets this field string resource path (used, if present, to localize strings).IMonitorFieldSPI
setUnit(java.lang.String unit)
Sets the (localizable) unit of this field.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.IMonitorField
getId
-
-
-
-
Constructor Detail
-
MonitorField
public MonitorField(java.lang.String id, java.lang.String serviceInstanceId, IMonitorField.DataType dataType) throws PortalException
- Throws:
PortalException
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:IMonitorField
Returns the (localizable) name of this field.- Specified by:
getName
in interfaceIMonitorField
- Returns:
- the (localizable) name of this field.
-
setName
public IMonitorFieldSPI setName(java.lang.String name)
Description copied from interface:IMonitorFieldSPI
Sets the (localizable) name of this field.- Specified by:
setName
in interfaceIMonitorFieldSPI
- Parameters:
name
- the (localizable) name of this field.- Returns:
- this field for chaining.
-
getDescription
public java.lang.String getDescription()
Description copied from interface:IMonitorField
Returns the (localizable description).- Specified by:
getDescription
in interfaceIMonitorField
- Returns:
- the (localizable description).
-
setDescription
public IMonitorFieldSPI setDescription(java.lang.String description)
Description copied from interface:IMonitorFieldSPI
Sets the (localizable description).- Specified by:
setDescription
in interfaceIMonitorFieldSPI
- Parameters:
description
- the (localizable description).- Returns:
- this field for chaining.
-
getUnit
public java.lang.String getUnit()
Description copied from interface:IMonitorField
Returns the (localizable) unit of this field.- Specified by:
getUnit
in interfaceIMonitorField
- Returns:
- the (localizable) unit of this field.
-
getLocalizedUnit
public java.lang.String getLocalizedUnit()
Description copied from interface:IMonitorField
Returns the localized unit of this field.- Specified by:
getLocalizedUnit
in interfaceIMonitorField
- Returns:
- the localized unit of this field.
-
setUnit
public IMonitorFieldSPI setUnit(java.lang.String unit)
Description copied from interface:IMonitorFieldSPI
Sets the (localizable) unit of this field.- Specified by:
setUnit
in interfaceIMonitorFieldSPI
- Parameters:
unit
- the (localizable) unit of this field.- Returns:
- this field for chaining.
-
getStringResourcePath
public java.lang.String getStringResourcePath()
Description copied from interface:IMonitorField
Returns this field string resource path (used, if present, to localize strings).- Specified by:
getStringResourcePath
in interfaceIMonitorField
- Returns:
- this field string resource path (used, if present, to localize strings).
-
setStringResourcePath
public IMonitorFieldSPI setStringResourcePath(java.lang.String stringResourcePath)
Description copied from interface:IMonitorFieldSPI
Sets this field string resource path (used, if present, to localize strings).- Specified by:
setStringResourcePath
in interfaceIMonitorFieldSPI
- Parameters:
stringResourcePath
- this field string resource path (used, if present, to localize strings).- Returns:
- this field for chaining.
-
getDataType
public IMonitorField.DataType getDataType()
Description copied from interface:IMonitorField
Returns this field data type.- Specified by:
getDataType
in interfaceIMonitorField
- Returns:
- this field data type.
-
getParent
public IMonitorField getParent()
Returns this field parent field.- Specified by:
getParent
in interfaceIMonitorFieldSPI
- Returns:
- this field parent field.
- Since:
- 10.2.0
-
getInnerFields
public java.util.Collection<IMonitorField> getInnerFields()
Description copied from interface:IMonitorField
Returns an unmodifiable collection of inner fields.- Specified by:
getInnerFields
in interfaceIMonitorField
- Returns:
- an unmodifiable collection of inner fields.
-
addInnerField
public IMonitorFieldSPI addInnerField(IMonitorField innerField)
Description copied from interface:IMonitorFieldSPI
Adds the given inner field.- Specified by:
addInnerField
in interfaceIMonitorFieldSPI
- Parameters:
innerField
- the inner field.- Returns:
- this field.
-
setStandard
public IMonitorFieldSPI setStandard(boolean isStandard)
Description copied from interface:IMonitorFieldSPI
Sets this field either as standard or custom (non-standard).- Specified by:
setStandard
in interfaceIMonitorFieldSPI
- Parameters:
isStandard
- true to mark this field as standard, false to custom.- Returns:
- this field for chaining.
-
removeInnerField
public IMonitorFieldSPI removeInnerField(java.lang.String innerFieldId)
Description copied from interface:IMonitorFieldSPI
Removes the given inner field.- Specified by:
removeInnerField
in interfaceIMonitorFieldSPI
- Parameters:
innerFieldId
- the inner field identifier.- Returns:
- this field.
-
clearInnerFields
public IMonitorFieldSPI clearInnerFields()
Description copied from interface:IMonitorFieldSPI
Removes all inner fields.- Specified by:
clearInnerFields
in interfaceIMonitorFieldSPI
- Returns:
- this field
-
setDataType
public IMonitorFieldSPI setDataType(IMonitorField.DataType dataType)
Description copied from interface:IMonitorFieldSPI
Sets the data type for this field.- Specified by:
setDataType
in interfaceIMonitorFieldSPI
- Parameters:
dataType
- the data type.- Returns:
- this field.
-
isStandard
public boolean isStandard()
Description copied from interface:IMonitorFieldSPI
Returns whether this is a standard field.- Specified by:
isStandard
in interfaceIMonitorFieldSPI
- Returns:
- whether this is a standard field.
-
getLocalizedDescription
public java.lang.String getLocalizedDescription()
Description copied from interface:IMonitorField
Returns the localized description of this field.- Specified by:
getLocalizedDescription
in interfaceIMonitorField
- Returns:
- the description of this field.
-
getLocalizedName
public java.lang.String getLocalizedName()
Description copied from interface:IMonitorField
Returns the localized name of this field.- Specified by:
getLocalizedName
in interfaceIMonitorField
- Returns:
- the name for this field.
-
isIdentifiesUserDefinition
public boolean isIdentifiesUserDefinition()
Description copied from interface:IMonitorFieldSPI
Returns whether this field identifies the user and must have its value modified when anonymized according to the definition of this field.- Specified by:
isIdentifiesUserDefinition
in interfaceIMonitorFieldSPI
- Returns:
true
if the definition of this field declares it as identifies user,false
otherwise.
-
setIdentifiesUserDefinition
public IMonitorFieldSPI setIdentifiesUserDefinition(boolean identifiesUserDefinition)
Description copied from interface:IMonitorFieldSPI
Sets whether this field identifies the user and must have its value modified when anonymized according to the definition of this field.- Specified by:
setIdentifiesUserDefinition
in interfaceIMonitorFieldSPI
-
getIdentifiesUserOverride
public java.lang.Boolean getIdentifiesUserOverride()
Description copied from interface:IMonitorFieldSPI
Returns whether this field identifies the user and must have its value modified when anonymized according to configuration of the current environment.- Specified by:
getIdentifiesUserOverride
in interfaceIMonitorFieldSPI
- Returns:
true
if the field was set as identifies user in the current configurations,false
if set as does not identify user in the current configurations, ornull
if there is nothing explicit in the current configuration and it must use the definition default.
-
setIdentifiesUserOverride
public IMonitorFieldSPI setIdentifiesUserOverride(java.lang.Boolean identifiesUserOverride)
Description copied from interface:IMonitorFieldSPI
Sets whether this field identifies the user and must have its value modified when anonymized, according to configuration of the current environment.- Specified by:
setIdentifiesUserOverride
in interfaceIMonitorFieldSPI
-
identifiesUser
public boolean identifiesUser()
Description copied from interface:IMonitorField
Indicates whether this field identifies the user and must have its value modified when anonymized.- Specified by:
identifiesUser
in interfaceIMonitorField
- Returns:
true
if this field identifies the user,false
otherwise.
-
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.- Since:
- 14.0.0
-
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
-
-