Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
369 changes: 369 additions & 0 deletions ci/tests/130-destination-set/channels/01-destination-set/channel.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
step-remove
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
step [2, 3]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
step-remove-all-except
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
step [3]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
destinationSet.remove(['Dest A', 3])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
true [2]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
destinationSet.removeAllExcept('Dest B')
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
true [2]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
destinationSet.size() + ' ' + destinationSet.contains('Dest C')
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3 true [1, 2, 3]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
destinationSet.removeIf(function (id) { return id > 1; })
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
true [1]
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ private void addCodeTemplateReferences() {
addReference(new FunctionReference(CONTEXT_CONNECTOR, Category.MESSAGE.toString(), null, "Create Segment (in message, index)", "Create a new segment in specified message (msg or tmp) at segment index i", "function createSegment(segmentName, msg, i) {}", new CodeTemplateFunctionDefinition("createSegment", new Parameters("segmentName", "String", "The name of the segment to create.").add("msg", "XML", "The parent XML object in which to create the segment.").add("i", "Number", "The index at which to insert the segment into the parent XML object."), "XML", "An E4X XML object representing the created segment.")));
addReference(new FunctionReference(CONTEXT_CONNECTOR, Category.MESSAGE.toString(), null, "Create Segment After Segment", "Create a new segment and insert it after the target segment", "function createSegmentAfter(insertSegmentName, afterThisSegment) {}", new CodeTemplateFunctionDefinition("createSegmentAfter", new Parameters("insertSegmentName", "String", "The name of the segment to create.").add("afterThisSegment", "XML", "The existing segment that the new segment will be inserted after."), "XML", "An E4X XML object representing the created segment.")));
addReference(new ParameterizedCodeReference(CONTEXT_CONNECTOR, Category.MESSAGE.toString(), "Delete Segment", "Delete a segment from the message", "delete ${msg}['${segment}']"));
addReference(new ParameterizedCodeReference(CONTEXT_CONNECTOR, Category.MESSAGE.toString(), "Remove one or more from Destination Set", "Stop one or more destinations from being processed for this message. Only available in the preprocessor or source filter/transformer.", "destinationSet.remove([${metaDataIdOrConnectorNames}]);"));
addReference(new ParameterizedCodeReference(CONTEXT_CONNECTOR, Category.MESSAGE.toString(), "Remove all except specified from Destination Set", "Stop all except the specified destinations from being processed for this message. Only available in the preprocessor or source filter/transformer.", "destinationSet.removeAllExcept([${metaDataIdOrConnectorNames}]);"));
addReference(new ParameterizedCodeReference(CONTEXT_CONNECTOR, Category.MESSAGE.toString(), "Remove one or more from Destination Set", "Stop one or more destinations from being processed for this message. Only available in the preprocessor or source filter/transformer.", "destinationSet.removeAll([${metaDataIdOrConnectorNames}]);"));
addReference(new ParameterizedCodeReference(CONTEXT_CONNECTOR, Category.MESSAGE.toString(), "Remove all except specified from Destination Set", "Stop all except the specified destinations from being processed for this message. Only available in the preprocessor or source filter/transformer.", "destinationSet.retainAll([${metaDataIdOrConnectorNames}]);"));
addReference(new ParameterizedCodeReference(CONTEXT_CONNECTOR, Category.MESSAGE.toString(), "Remove all from Destination Set", "Stop all destinations from being processed for this message. Only available in the preprocessor or source filter/transformer.", "destinationSet.removeAll();"));
addReference(new ParameterizedCodeReference(CONTEXT_CHANNEL, Category.MESSAGE.toString(), "Message Reprocessed", "Get a variable indicating if this message was reprocessed.", "var reprocessed = sourceMap.get('reprocessed') == true;"));
addReference(new ParameterizedCodeReference(CONTEXT_CHANNEL, Category.MESSAGE.toString(), "Message Replaced", "Get a variable indicating if this message was reprocessed and replaced.", "var replaced = sourceMap.get('replaced') == true;"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ public String getScript(boolean loadFiles) throws ScriptBuilderException {

script.append("{\n\tdestinationSet.");
if (behavior == Behavior.REMOVE) {
script.append("remove");
script.append("removeAll");
} else if (behavior == Behavior.REMOVE_ALL_EXCEPT) {
script.append("removeAllExcept");
script.append("retainAll");
} else {
script.append("removeAll");
}
Expand Down
Loading
Loading