lucee.Componentcoldbox.system.FrameworkSupertype
coldbox.system.EventHandler
coldbox.system.RestHandler
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- Base class for all RESTFul event handlers
Method Summary | |
---|---|
any
|
aroundHandler([any event], [any rc], [any prc], [any targetAction], [any eventArguments])
Our Rest handler adds a nice around handler that will be active for all handlers. |
any
|
onAnyOtherException([any event], [any rc], [any prc], [any eventArguments], [any exception='[runtime expression]'])
Action for 'any' exceptions, ie when not caught by previous catch statements. |
any
|
onAuthenticationFailure([any event='[runtime expression]'], [any rc='[runtime expression]'], [any prc='[runtime expression]'], [any abort='false'], [any exception='[runtime expression]'])
Action that can be used for authentication failures. |
any
|
onAuthorizationFailure([any event='[runtime expression]'], [any rc='[runtime expression]'], [any prc='[runtime expression]'], [any abort='false'], [any exception='[runtime expression]'])
Action that can be used for authorization failures. |
any
|
onEntityNotFoundException([any event], [any rc], [any prc], [any eventArguments], [any exception='[runtime expression]'])
Action that can be used when an entity or record is not found. |
any
|
onError([any event], [any rc], [any prc], [any faultAction=''], [any exception='[runtime expression]'], [any eventArguments='[runtime expression]'])
Implicit action that detects exceptions on your handlers and processes them. |
any
|
onExpectationFailed([any event='[runtime expression]'], [any rc='[runtime expression]'], [any prc='[runtime expression]'], [any message='An expectation for the request failed. Could not proceed'])
Utility method for when an expectation of the request fails ( e. |
any
|
onInvalidHTTPMethod([any event], [any rc], [any prc], [any faultAction], [any eventArguments])
Action used when the framework detects and Invalid HTTP method for the action. |
any
|
onInvalidRoute([any event], [any rc], [any prc])
Action for when a route is invalid or not found. |
any
|
onMissingAction([any event], [any rc], [any prc], [any missingAction], [any eventArguments])
Action used when the original action does not exist in a handler. |
any
|
onValidationException([any event], [any rc], [any prc], [any eventArguments], [any exception='[runtime expression]'])
Action that can be used when validation exceptions ocur. |
Methods inherited from class coldbox.system.EventHandler |
---|
_actionExists, _actionMetadata, _privateInvoker, init, onHandlerDIComplete |
Methods inherited from class lucee.Component |
---|
None |
Method Detail |
---|
Our Rest handler adds a nice around handler that will be active for all handlers that leverage it. So it can add uniformity, exception handling, tracking and more.
event
- The request contextrc
- The rc referenceprc
- The prc referencetargetAction
- The action UDF to executeeventArguments
- The original event argumentsAction for 'any' exceptions, ie when not caught by previous catch statements
event
- The request contextrc
- The rc referenceprc
- The prc referenceeventArguments
- The original event argumentsexception
- The thrown exceptionAction that can be used for authentication failures. You can point to this action from cbsecurity, cbauth, etc or call it a-la-carte. It also monitors cbsecurity convention of validator results for setting error messages into the data packet
event
- The request contextrc
- The rc referenceprc
- The prc referenceabort
- Hard abort the request if passed, defaults to falseexception
- The thrown exceptionAction that can be used for authorization failures. You can point to this action from cbsecurity, cbauth, etc or call it a-la-carte. It will check for cbsecurity validation results and set the appropriate error messages
event
- The request contextrc
- The rc referenceprc
- The prc referenceabort
- Hard abort the request if passed, defaults to falseexception
- The thrown exceptionAction that can be used when an entity or record is not found. Can be called manually or automatically via thrown exceptions in the around handler
event
- The request contextrc
- The rc referenceprc
- The prc referenceeventArguments
- The original event argumentsexception
- The thrown exceptionImplicit action that detects exceptions on your handlers and processes them
event
- The request contextrc
- The rc referenceprc
- The prc referencefaultAction
- The action that blew upexception
- The thrown exceptioneventArguments
- The original event argumentsUtility method for when an expectation of the request fails ( e.g. an expected parameter is not provided ) - It will output a 417 status code (event.STATUS.EXPECTATION_FAILED) - Add the error flag - Add an failure message to the data packet which you can customize
event
- The request contextrc
- The rc referenceprc
- The prc referencemessage
- The failure message sent in the request packageAction used when the framework detects and Invalid HTTP method for the action
event
- The request contextrc
- The rc referenceprc
- The prc referencefaultAction
- The action that was securedeventArguments
- The original event argumentsAction for when a route is invalid or not found. Usually you use this in your router as a catch all.
// Catch All Resource route( "/:anything" ).to( "MyHandler.onInvalidRoute" );
event
- The request contextrc
- The rc referenceprc
- The prc referenceAction used when the original action does not exist in a handler.
event
- The request contextrc
- The rc referenceprc
- The prc referencemissingAction
- The missing actioneventArguments
- The original event argumentsAction that can be used when validation exceptions ocur. Can be called manually or automatically via thrown exceptions in the around handler
event
- The request contextrc
- The rc referenceprc
- The prc referenceeventArguments
- The original event argumentsexception
- The thrown exception