[MAGNOLIA-3276] Add noop to nodebuilder Created: 16/Aug/10  Updated: 01/Dec/10  Resolved: 16/Aug/10

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 4.4

Type: New Feature Priority: Major
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MGNLEE-186 Setup automated integration tests for ee Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

When using the node builder api, we sometimes want to use ternary operations, where a noop() would be useful.
Example:

new ModuleNodeBuilderTask("test paragraph", "", ErrorHandling.strict,
                getNode("paragraphs").then(
                        addNode(name, "mgnl:contentNode").then(
                                addProperty("templatePath", templatePath),
                                addProperty("type", type),
                                modelClass != null ? addProperty("modelClass", modelClass.getName()) : noop()
                        )
                )
        )


 Comments   
Comment by Tobias Mattsson [ 29/Nov/10 ]

Reviewed.

Generated at Mon Feb 12 03:44:55 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.