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 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
-
-
Constructor Summary
Constructors Constructor Description MonitorField(String id, 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.String
getDescription()
Returns the (localizable description).String
getId()
Returns the identifier of this element.Boolean
getIdentifiesUserOverride()
Returns whether this field identifies the user and must have its value modified when anonymized according to configuration of the current environment.Collection<IMonitorField>
getInnerFields()
Returns an unmodifiable collection of inner fields.String
getLocalizedDescription()
Returns the localized description of this field.String
getLocalizedName()
Returns the localized name of this field.String
getLocalizedUnit()
Returns the localized unit of this field.String
getName()
Returns the (localizable) name of this field.IMonitorField
getParent()
Returns this field parent field.String
getServiceInstanceId()
Returns the identifier of the service instance this element belongs to.String
getStringResourcePath()
Returns this field string resource path (used, if present, to localize strings).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(String innerFieldId)
Removes the given inner field.IMonitorFieldSPI
setDataType(IMonitorField.DataType dataType)
Sets the data type for this field.IMonitorFieldSPI
setDescription(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(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(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(String stringResourcePath)
Sets this field string resource path (used, if present, to localize strings).IMonitorFieldSPI
setUnit(String unit)
Sets the (localizable) unit of this field.protected void
validateLocalId(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
-
-
-
-
Field Detail
-
id
protected String id
-
-
Constructor Detail
-
MonitorField
public MonitorField(String id, String serviceInstanceId, IMonitorField.DataType dataType) throws PortalException
- Throws:
PortalException
-
-
Method Detail
-
getName
public 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(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 String getDescription()
Description copied from interface:IMonitorField
Returns the (localizable description).- Specified by:
getDescription
in interfaceIMonitorField
- Returns:
- the (localizable description).
-
setDescription
public IMonitorFieldSPI setDescription(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 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 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(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 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(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 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(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 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 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 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(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(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 String getId()
Returns the identifier of this element.- Returns:
- the identifier.
- Since:
- 14.0.0
-
getServiceInstanceId
public 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
-
-