lucee.Componentcoldbox.system.core.delegates.Flow
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This component is mostly used as a delegate to have flow control methods for fluent beauty
Method Summary | |
---|---|
any
|
ifNull([any target], any success, [any failure])
Verify if the target argument is `null` and if it is, then execute the `success` closure, else if passed. |
any
|
ifPresent([any target], any success, [any failure])
Verify if the target argument is not `null` and if it is, then execute the `success` closure, else if passed. |
any
|
throwIf(boolean target, any type, [any message=''], [any detail=''])
This function evaluates the target boolean expression and if `true` it will throw the controlled exception. |
any
|
throwUnless(boolean target, any type, [any message=''], [any detail=''])
This function evaluates the target boolean expression and if `false` it will throw the controlled exception. |
any
|
unless(boolean target, any success, [any failure])
This function evaluates the target boolean expression and if `false` it will execute the `success` closure. |
any
|
when(boolean target, any success, [any failure])
This function evaluates the target boolean expression and if `true` it will execute the `success` closure. |
Methods inherited from class lucee.Component |
---|
None |
Method Detail |
---|
Verify if the target argument is `null` and if it is, then execute the `success` closure, else if passed execute the `failure` closure.
target
success
failure
Verify if the target argument is not `null` and if it is, then execute the `success` closure, else if passed execute the `failure` closure.
target
success
failure
This function evaluates the target boolean expression and if `true` it will throw the controlled exception
target
- The boolean evaluator, this can be a boolean valuetype
- The exception typemessage
- The exception messagedetail
- The exception detailThis function evaluates the target boolean expression and if `false` it will throw the controlled exception
target
- The boolean evaluator, this can be a boolean valuetype
- The exception typemessage
- The exception messagedetail
- The exception detailThis function evaluates the target boolean expression and if `false` it will execute the `success` closure else, if the `failure` closure is passed, it will execute it.
target
- The boolean evaluator, this can be a boolean valuesuccess
- The closure/lambda to execute if the boolean value is truefailure
- The closure/lambda to execute if the boolean value is falseThis function evaluates the target boolean expression and if `true` it will execute the `success` closure else, if the `failure` closure is passed, it will execute it.
target
- The boolean evaluator, this can be a boolean valuesuccess
- The closure/lambda to execute if the boolean value is truefailure
- The closure/lambda to execute if the boolean value is false