public static class DefaultAlarm.Builder extends Object
| Constructor and Description |
|---|
Builder(Alarm alarm)
Constructs a Builder to create a Default Alarm based on another alarm.
|
Builder(AlarmId id,
DeviceId deviceId,
String description,
Alarm.SeverityLevel severity,
long timeRaised)
Constructs a Builder to create a Default Alarm.
|
| Modifier and Type | Method and Description |
|---|---|
DefaultAlarm |
build()
Builds the alarm.
|
DefaultAlarm.Builder |
clear()
Clears the alarm that is being created.
|
DefaultAlarm.Builder |
forSource(AlarmEntityId source)
Sets the new alarm source.
|
DefaultAlarm.Builder |
withAcknowledged(boolean isAcknowledged)
Sets the new alarm acknowledged flag.
|
DefaultAlarm.Builder |
withAssignedUser(String assignedUser)
Sets the new alarm assigned user.
|
DefaultAlarm.Builder |
withManuallyClearable(boolean isManuallyClearable)
Sets the new alarm the manually clearable flag.
|
DefaultAlarm.Builder |
withServiceAffecting(boolean isServiceAffecting)
Sets the new alarm service affecting flag.
|
DefaultAlarm.Builder |
withTimeCleared(Long timeCleared)
Sets the new alarm time cleared.
|
DefaultAlarm.Builder |
withTimeUpdated(long timeUpdated)
Sets the new alarm time updated.
|
public Builder(Alarm alarm)
alarm - the other alarmpublic Builder(AlarmId id, DeviceId deviceId, String description, Alarm.SeverityLevel severity, long timeRaised)
id - the AlarmIddeviceId - the device IDdescription - the Alarm descriptionseverity - the severitytimeRaised - when the alarm was raisedpublic DefaultAlarm.Builder forSource(AlarmEntityId source)
source - the sourcepublic DefaultAlarm.Builder withTimeUpdated(long timeUpdated)
timeUpdated - the timepublic DefaultAlarm.Builder withTimeCleared(Long timeCleared)
timeCleared - the timepublic DefaultAlarm.Builder clear()
public DefaultAlarm.Builder withServiceAffecting(boolean isServiceAffecting)
isServiceAffecting - the service affecting flagpublic DefaultAlarm.Builder withAcknowledged(boolean isAcknowledged)
isAcknowledged - the acknowledged flagpublic DefaultAlarm.Builder withManuallyClearable(boolean isManuallyClearable)
isManuallyClearable - the manually clearable flagpublic DefaultAlarm.Builder withAssignedUser(String assignedUser)
assignedUser - the userpublic DefaultAlarm build()