2using System.Threading.Tasks;
64 [Page(7,
"Configuration")]
65 [Header(185,
"Callback URL:")]
66 [ToolTip(186,
"URL to call for each event.")]
68 public string Url {
get;
set; }
73 [Page(7,
"Configuration")]
74 [Header(221,
"Max collection time (s):")]
75 [ToolTip(222,
"Maximum number of seconds events can be cached before being sent.")]
81 [Page(7,
"Configuration")]
82 [Header(223,
"Min collection time (s):")]
83 [ToolTip(224,
"Minimum number of seconds events can be cached before being sent.")]
89 [Page(7,
"Configuration")]
90 [Header(225,
"Collect on Type.")]
91 [ToolTip(226,
"Collect events having the same event type.")]
97 [Page(7,
"Configuration")]
98 [Header(227,
"Collect on Level.")]
99 [ToolTip(228,
"Collect events having the same event level.")]
105 [Page(7,
"Configuration")]
106 [Header(229,
"Collect on Level.")]
107 [ToolTip(230,
"Collect events having the same event level.")]
113 [Page(7,
"Configuration")]
114 [Header(231,
"Collect on Object.")]
115 [ToolTip(232,
"Collect events having the same event object.")]
121 [Page(7,
"Configuration")]
122 [Header(233,
"Collect on Actor.")]
123 [ToolTip(234,
"Collect events having the same event actor.")]
129 [Page(7,
"Configuration")]
130 [Header(235,
"Collect on Facility.")]
131 [ToolTip(236,
"Collect events having the same event facility.")]
137 [Page(7,
"Configuration")]
138 [Header(237,
"Collect on Module.")]
139 [ToolTip(238,
"Collect events having the same event module.")]
159 LinkedList<Parameter> Parameters = (LinkedList<Parameter>)await base.GetDisplayableParametersAsync(
Language, Caller);
171 public override void Export(XmlWriter Output)
173 Output.WriteStartElement(
"WebHookEventSink");
174 Output.WriteAttributeString(
"id", this.
SinkId);
175 Output.WriteAttributeString(
"url", this.
Url);
176 Output.WriteAttributeString(
"maxSecondsUsed", this.
MaxSecondsUsed.ToString());
177 Output.WriteAttributeString(
"maxSecondsUnused", this.
MaxSecondsUnused.ToString());
178 Output.WriteAttributeString(
"collectOnType",
CommonTypes.
Encode(
this.CollectOnType));
179 Output.WriteAttributeString(
"collectOnLevel",
CommonTypes.
Encode(
this.CollectOnLevel));
180 Output.WriteAttributeString(
"collectOnEventId",
CommonTypes.
Encode(
this.CollectOnEventId));
181 Output.WriteAttributeString(
"collectOnObject",
CommonTypes.
Encode(
this.CollectOnObject));
182 Output.WriteAttributeString(
"collectOnActor",
CommonTypes.
Encode(
this.CollectOnActor));
183 Output.WriteAttributeString(
"collectOnFacility",
CommonTypes.
Encode(
this.CollectOnFacility));
184 Output.WriteAttributeString(
"collectOnModule",
CommonTypes.
Encode(
this.CollectOnModule));
185 Output.WriteEndElement();
Helps with parsing of commong data types.
static string Encode(bool x)
Encodes a Boolean for use in XML and other formats.
Contains information about a language.
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
async Task< Namespace > GetNamespaceAsync(string Name)
Gets the namespace object, given its name, if available.
Contains information about a namespace in a language.
Task< LanguageString > GetStringAsync(int Id)
Gets the string object, given its ID, if available.
Abstract base class for gateway configuration nodes.
virtual INode Parent
Parent Node, or null if a root node.
GatewayConfigSource Source
Source hosting the node.
Abstract base class for event sink nodes.
string SinkId
Domain being redirected.
Representation of a WebHookEventSink
WebHookEventSinkNode(GatewayConfigSource Source, ConfigurationNode Parent, string SinkId, string Url, int MaxSecondsUsed, int MaxSecondsUnused, bool CollectOnType, bool CollectOnLevel, bool CollectOnEventId, bool CollectOnObject, bool CollectOnActor, bool CollectOnFacility, bool CollectOnModule)
Representation of a WebHookEventSink
WebHookEventSinkNode()
Representation of a WebHookEventSink
bool CollectOnActor
If events should be collected based on their actor.
override async Task< IEnumerable< Parameter > > GetDisplayableParametersAsync(Language Language, RequestOrigin Caller)
Gets displayable parameters.
bool CollectOnType
If events should be collected based on their type.
bool CollectOnObject
If events should be collected based on their object.
int MaxSecondsUnused
Maximum number of seconds events can be cached (if collection key unused) before being sent.
bool CollectOnModule
If events should be collected based on their module.
bool CollectOnFacility
If events should be collected based on their facility.
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
bool CollectOnLevel
If events should be collected based on their level.
bool CollectOnEventId
If events should be collected based on their event ID.
int MaxSecondsUsed
Maximum number of seconds events can be cached before being sent.
override void Export(XmlWriter Output)
Exports the event sink definition to XML.
Data source mirroring the Gateway.config file.
Tokens available in request.