Class Layer1ApiSoundAlertDeclarationMessage
- All Implemented Interfaces:
Layer1ApiStrategiesEchoMessagesLayer.StrategyEchoMessageFromLayer
Use this message to declare your addon intents of sending alerts to a user.
The class specifies a "blueprint" of future alerts group. Send created message
via Layer1ApiAdminProvider.sendUserMessage(Object), and link the
declaration message to an alert via Layer1ApiSoundAlertMessage.alertDeclarationId
The Bookmap caches these messages internally, and if your Layer1ApiSoundAlertMessage
with a linked Layer1ApiSoundAlertDeclarationMessage does not conform
the fields specified in the declaration message - an exception will be thrown,
and your addon will be unloaded.
When a user removes a declaration from GUI - your addon will receive this
message with flag isAdd = false
That is, your addon needs to listen for these messages using
Layer1ApiAdminListener.onUserMessage(Object)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionThe predicate obtains an instrument alias.final StringId can be used to reference this declaration messagefinal booleanTrue if this message adds a declaration.final booleanDefine whether an alert can have a popup notification
The actual state of the popup notification (on/off) is defined withLayer1ApiAlertSettingsMessage.popupfinal booleanTrue if alerts described by this declaration are repeated -Layer1ApiSoundAlertMessage.repeatCount> 1final booleanDefine whether an alert can have a sound notification
The actual state of the sound notification (on/off) is defined withLayer1ApiAlertSettingsMessage.soundfinal Class<?>Class that created this message.final StringName of the strategy that created this message, extracted fromLayer1StrategyName.value(), displayed on the UIfinal StringShort description of the trigger event for this declaration. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates builder to buildLayer1ApiSoundAlertDeclarationMessage.toString()
-
Field Details
-
id
Id can be used to reference this declaration message -
triggerDescription
Short description of the trigger event for this declaration. Will be shown on the UI -
source
Class that created this message. The class must haveLayer1StrategyNameannotation present -
strategyName
Name of the strategy that created this message, extracted fromLayer1StrategyName.value(), displayed on the UI -
aliasMatcher
The predicate obtains an instrument alias. If it returns true, the declaration is believed to be linked to the specified alias. Used internally for declarations filtration on the UI -
isPopupAllowed
public final boolean isPopupAllowedDefine whether an alert can have a popup notification
The actual state of the popup notification (on/off) is defined withLayer1ApiAlertSettingsMessage.popup -
isSoundAllowed
public final boolean isSoundAllowedDefine whether an alert can have a sound notification
The actual state of the sound notification (on/off) is defined withLayer1ApiAlertSettingsMessage.sound -
isRepeated
public final boolean isRepeatedTrue if alerts described by this declaration are repeated -Layer1ApiSoundAlertMessage.repeatCount> 1 -
isAdd
public final boolean isAddTrue if this message adds a declaration. Otherwise, the declaration with the sameidwill be removed
-
-
Method Details
-
toString
-
builder
Creates builder to buildLayer1ApiSoundAlertDeclarationMessage.- Returns:
- created builder
-