ColdBox Platform Version 2.6.3

coldbox.system.services
Class InterceptorService

WEB-INF.cftags.component
        extended by coldbox.system.services.BaseService
            extended by coldbox.system.services.InterceptorService

public class InterceptorService
extends BaseService

The coldbox interceptor service


Constructor Summary
init(any controller)
          Constructor
 
Method Summary
private void RegisterInterceptionPoint(string interceptorKey, string state, any oInterceptor)
          Register an Interception point into a new or created interception state.
 void appendInterceptionPoints(string customPoints)
          Append a list of custom interception points to the CORE interception points
private void createInterceptionStates()
          Create the interception states container
 any getInterceptor(string interceptorClass)
          Get an interceptor according to its class name from cache, not from a state. If retrieved, it does not mean that the interceptor is registered still. It just means, that it is in cache.
 any getRequestBuffer()
          Get a coldbox request buffer: coldbox.system.util.RequestBuffer
 any getStateContainer(string state)
          Get a State Container, it will return a blank structure if the state is not found.
 string getinterceptionPoints()
          Get the interceptionPoints ENUM
 struct getinterceptionStates()
          Get interceptionStates
private struct parseMetadata(any metadata, struct points)
          I get a components valid interception points
 void processState(string state, [struct interceptData='[runtime expression]'])
          Process an interception state announcement
 void registerInterceptor([string interceptorClass], [any interceptorObject], [struct interceptorProperties='[runtime expression]'], [string customPoints=''])
          Register an interceptor. This method is here for runtime additions. If the interceptor is already in a state, it will not be added again. You can register an interceptor by class or with an already instantiated and configured object.
 void registerInterceptors()
          Register all the interceptors according to configuration. All interception states are lazy loaded in.
 boolean unregister(string interceptorClass, string state)
          Unregister an interceptor from an interception state. If the state does not exists, it returns false
 
Methods inherited from class coldbox.system.services.BaseService
debug, getColdboxOCM, getUtil, getcontroller, setcontroller
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any controller)

Method Detail

RegisterInterceptionPoint

private void RegisterInterceptionPoint(string interceptorKey, string state, any oInterceptor)
Register an Interception point into a new or created interception state.

Parameters:
interceptorKey - The interceptor key in the cache.
state - The state to create
oInterceptor - The interceptor to register

appendInterceptionPoints

public void appendInterceptionPoints(string customPoints)
Append a list of custom interception points to the CORE interception points

Parameters:
customPoints - A comma delimmited list of custom interception points to append. If they already exists, then they will not be added again.

createInterceptionStates

private void createInterceptionStates()
Create the interception states container


getInterceptor

public any getInterceptor(string interceptorClass)
Get an interceptor according to its class name from cache, not from a state. If retrieved, it does not mean that the interceptor is registered still. It just means, that it is in cache.

Parameters:
interceptorClass - The qualified class of the interceptor to retrieve

getRequestBuffer

public any getRequestBuffer()
Get a coldbox request buffer: coldbox.system.util.RequestBuffer


getStateContainer

public any getStateContainer(string state)
Get a State Container, it will return a blank structure if the state is not found.

Parameters:
state - The state to retrieve

getinterceptionPoints

public string getinterceptionPoints()
Get the interceptionPoints ENUM


getinterceptionStates

public struct getinterceptionStates()
Get interceptionStates


parseMetadata

private struct parseMetadata(any metadata, struct points)
I get a components valid interception points

Parameters:
metadata - The recursive metadata
points - The active points

processState

public void processState(string state, [struct interceptData='[runtime expression]'])
Process an interception state announcement

Parameters:
state - An interception state to process
interceptData - A data structure used to pass intercepted information.

registerInterceptor

public void registerInterceptor([string interceptorClass], [any interceptorObject], [struct interceptorProperties='[runtime expression]'], [string customPoints=''])
Register an interceptor. This method is here for runtime additions. If the interceptor is already in a state, it will not be added again. You can register an interceptor by class or with an already instantiated and configured object.

Parameters:
interceptorClass - Mutex with interceptorObject, this is the qualified class of the interceptor to register
interceptorObject - Mutex with interceptor Class, this is used to register an already instantiated object as an interceptor
interceptorProperties - The structure of properties to register this interceptor with.
customPoints - A comma delimmited list of custom interception points, if the object or class sent in observes them.

registerInterceptors

public void registerInterceptors()
Register all the interceptors according to configuration. All interception states are lazy loaded in.


unregister

public boolean unregister(string interceptorClass, string state)
Unregister an interceptor from an interception state. If the state does not exists, it returns false

Parameters:
interceptorClass - The qualified class of the interceptor to unregister
state - The named state to unregister this interceptor from

ColdBox Platform Version 2.6.3