forked from telefonicaid/fiware-orion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(JP) Add doc about subscription alterationType feature (telefonicaid#…
- Loading branch information
Showing
5 changed files
with
83 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# 変更タイプ (alteration type) に基づくサブスクリプション | ||
|
||
デフォルトでは、エンティティの作成または実際の更新操作中にトリガーされた条件 (サブスクリプションの | ||
`subject` フィールドと `conditions` フィールドで表現されます。たとえば、対象となるエンティティ、 | ||
チェックする属性のリスト、フィルター式など) が発生すると、サブスクリプションがトリガーされます | ||
(つまり、サブスクリプションに関連付けられた通知が送信されます)。 | ||
|
||
ただし、このデフォルトの動作を変更して、たとえば、エンティティが作成されたとき、またはエンティティ | ||
が削除されたときにのみ通知を送信できるようにすることができますが、エンティティが更新されたときは | ||
送信できません。 | ||
|
||
特に、`conditions` のサブフィールドとして `alterationTypes` フィールドが使用されます。 | ||
このフィールドの値は、サブスクリプションがトリガーされる変更タイプのリストを要素が指定する配列です。 | ||
現時点では、次の変更タイプがサポートされています: | ||
|
||
* `entityUpdate`: サブスクリプションの対象となるエンティティが更新されるたびに通知が送信されます | ||
(エンティティが実際に変更されたかどうかは関係ありません) | ||
* `entityChange`: サブスクリプションの対象となるエンティティが更新され、実際に変更されるたびに通知が | ||
送信されます (または、実際の更新ではないが、更新要求で [`forcedUpdate` オプション](ngsiv2_implementation_notes.md#forcedupdate-option) | ||
が使用されている場合) | ||
* `entityCreate`: サブスクリプションの対象となるエンティティが作成されるたびに通知が送信されます | ||
* `entityDelete`: サブスクリプションの対象となるエンティティが削除されるたびに通知が送信されます | ||
|
||
たとえば: | ||
|
||
``` | ||
"conditions": { | ||
"alterationTypes": [ "entityCreate", "entityDelete" ], | ||
... | ||
} | ||
``` | ||
|
||
エンティティの作成または削除が行われたときにサブスクリプションがトリガーされますが、更新が | ||
行われたときはトリガーされません。`alterationTypes` 配列の要素は、OR の意味で解釈されます。 | ||
|
||
デフォルトの `alterationTypes` (つまり、サブスクリプションが明示的に指定していないもの) は | ||
`["entityCreate", "entityChange"]` です。 |