public class IlpAlarmSeverityColorBinding extends IlpAbstractAttributeBinding
IltObject.NewAlarmHighestSeverityAttribute
,
NewImpactAlarmHighestSeverityAttribute
,
AlarmHighestSeverityAttribute
,
ImpactAlarmHighestSeverityAttribute
,
AckAlarmHighestSeverityAttribute
and
AckImpactAlarmHighestSeverityAttribute
) into a SDM model
property representing the severity color.Modifier and Type | Class and Description |
---|---|
static class |
IlpAlarmSeverityColorBinding.SeverityColors
Defines the different variations of the severity color
|
IlpAbstractAttributeBinding.ConversionFailedException, IlpAbstractAttributeBinding.PropertyAlreadySetException, IlpAbstractAttributeBinding.Type
_attributeName, _attributeType, _bindingContext, _propertyName, _propertyType, _type
Constructor and Description |
---|
IlpAlarmSeverityColorBinding(IlpAlarmSeverityColorBinding.SeverityColors colorType,
String attrName,
String propName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
convertToAttribute(Object newPropVal)
This method throws
IlpAbstractAttributeBinding.ConversionFailedException as the binding is
READ_ONLY . |
Object |
convertToProperty(Object severity)
This method converts the TGO objectState attribute into a
severity color according to the default color mapping.
|
boolean |
validate(Object value)
Validates a given TGO attribute value.
|
equals, getAttributeName, getAttributeType, getBindingContext, getPropertyName, getPropertyType, getType, setAttributeName, setAttributeType, setBindingContext, setPropertyName, setPropertyType, setType
public IlpAlarmSeverityColorBinding(IlpAlarmSeverityColorBinding.SeverityColors colorType, String attrName, String propName)
colorType
- Specifies the color variation to be usedattrName
- The TGO attribute name of type IltAlarmSeverity
propName
- The SDM model property namepublic Object convertToAttribute(Object newPropVal)
IlpAbstractAttributeBinding.ConversionFailedException
as the binding is
READ_ONLY
.convertToAttribute
in class IlpAbstractAttributeBinding
newPropVal
- The target valuepublic Object convertToProperty(Object severity)
convertToProperty
in class IlpAbstractAttributeBinding
severity
- The TGO alarm severity attribute valuepublic boolean validate(Object value)
IlpAbstractAttributeBinding
Validates a given TGO attribute value.
This method may throw IllegalArgumentException
or
IlpAbstractAttributeBinding.ConversionFailedException
with descriptive detail of the
error. The attribute binding mechanism will log the exception.
validate
in class IlpAbstractAttributeBinding
value
- The attribute value to be validated.true
for valid values;
false
otherwise© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.