ColdBox Platform Version 2.6.4

coldbox.system.interceptors
Class SES

WEB-INF.cftags.component
        extended by coldbox.system.FrameworkSupertype
            extended by coldbox.system.Interceptor
                extended by coldbox.system.interceptors.SES

public class SES
extends Interceptor

This interceptor provides complete SES and URL mappings support to ColdBox Applications


Method Summary
 void addModuleRoutes(string pattern, string module)
          Add modules routes in the specified position
 void addRoute(string pattern, [string handler], [any action], [boolean packageResolverExempt='false'], [string matchVariables], [string view], [boolean viewNoLayout='false'], [boolean valuePairTranslation='true'], [any constraints=''], [string module=''], [string moduleRouting=''])
          Adds a route to dispatch
private void checkForInvalidURL(any route, any script_name, any event)
          Check for invalid URL's
 void configure()
          This is where the ses plugin configures itself
private void findConventionNameValuePairs(string requestString, any match, struct params)
          Find the convention name value pairs
private Struct findRoute(any action, any event, [string module=''])
          Figures out which route matches this request
private string fixIISURLVars(any requestString, any rc)
          Clean up some IIS funkyness
 boolean getAutoReload()
          Set to auto reload the rules in each request
 string getBaseURL()
          Get BaseURL
private string getCGIElement(string cgielement)
          The cgi element facade method
private struct getCleanedPaths()
          Get and Clean the path_info and script names
private string getDefaultFrameworkAction()
          Get the default framework action
 boolean getEnabled()
          Get enabled
 boolean getLooseMatching()
          Get the current loose matching property
 array getModuleRoutes(string module='')
          Get a modules routes
 struct getModulesRoutingTable()
          Get the entire modules routing table
 Array getRoutes()
          Get the array containing all the routes
 boolean getUniqueURLs()
          Get uniqueURLs
private void importConfiguration()
          Import the routing configuration file
private any packageResolver(any routingString, any routeParams)
          Resolve handler packages
 void preProcess(any event, struct interceptData)
          This is the route dispatch
private void processRouteOptionals(struct thisRoute)
          Process route optionals
private string serializeURL([string formVars=''], any event)
          Serialize a URL
 void setAutoReload(boolean autoReload)
          Get the auto reload flag
 void setBaseURL(string baseURL)
          Set the base URL for the application
 void setEnabled(boolean enabled)
          Set whether the interceptor is enabled or not
 void setLooseMatching(boolean looseMatching)
          Set the loose matching property of the interceptor
private void setModuleRoutingTable(struct routes)
          Set the module routing table
private void setRoutes(Array routes)
          Internal override of the routes array
 void setUniqueURLs(boolean uniqueURLs)
          Set the uniqueURLs property
private void throwInvalidHTTP(string description)
          Throw an invalid HTTP exception
 
Methods inherited from class coldbox.system.Interceptor
appendToBuffer, clearBuffer, getBufferObject, getBufferString, getInterceptorService, getProperty, getproperties, init, propertyExists, setProperty, setproperties, unregister
 
Methods inherited from class coldbox.system.FrameworkSupertype
$abort, $dump, $htmlhead, $include, $rethrow, $throw, addAsset, announceInterception, getColdboxOCM, getController, getDatasource, getDebugMode, getHash, getInstance, getInterceptor, getMailSettings, getModel, getModuleSettings, getMyPlugin, getPlugin, getResource, getSetting, getSettingStructure, getSettingsBean, getfwLocale, includeUDF, locateDirectoryPath, locateFilePath, persistVariables, populateModel, relocate, renderExternalView, renderView, runEvent, setDebugMode, setNextEvent, setNextRoute, setSetting, setfwLocale, settingExists
 
Methods inherited from class WEB-INF.cftags.component
 

Method Detail

addModuleRoutes

public void addModuleRoutes(string pattern, string module)
Add modules routes in the specified position

Parameters:
pattern - The pattern to match against the URL.
module - The module to load routes for

addRoute

public void addRoute(string pattern, [string handler], [any action], [boolean packageResolverExempt='false'], [string matchVariables], [string view], [boolean viewNoLayout='false'], [boolean valuePairTranslation='true'], [any constraints=''], [string module=''], [string moduleRouting=''])
Adds a route to dispatch

Parameters:
pattern - The pattern to match against the URL.
handler - The handler to execute if pattern matched.
action - The action in a handler to execute if a pattern is matched. This can also be a structure or JSON structured based on the HTTP method(GET,POST,PUT,DELETE). ex: {GET:'show', PUT:'update', DELETE:'delete', POST:'save'}
packageResolverExempt - If this is set to true, then the interceptor will not try to do handler package resolving. Else a package will always be resolved. Only works if :handler is in a pattern
matchVariables - A string of name-value pair variables to add to the request collection when this pattern matches. This is a comma delimmitted list. Ex: spaceFound=true,missingAction=onTest
view - The view to dispatch if pattern matches. No event will be fired, so handler,action will be ignored.
viewNoLayout - If view is choosen, then you can choose to override and not display a layout with the view. Else the view renders in the assigned layout.
valuePairTranslation - Activate convention name value pair translations or not. Turned on by default
constraints - A structure or JSON structure of regex constraint overrides for variable placeholders. The key is the name of the variable, the value is the regex to try to match.
module - The module to add this route to
moduleRouting - Called internally by addModuleRoutes to add a module routing route.

checkForInvalidURL

private void checkForInvalidURL(any route, any script_name, any event)
Check for invalid URL's

Parameters:
route
script_name
event - The event object.

configure

public void configure()
This is where the ses plugin configures itself.


findConventionNameValuePairs

private void findConventionNameValuePairs(string requestString, any match, struct params)
Find the convention name value pairs

Parameters:
requestString - The request string
match - The regex matcher
params - The parameter structure

findRoute

private Struct findRoute(any action, any event, [string module=''])
Figures out which route matches this request

Parameters:
action - The action evaluated by the path_info
event - The event object.
module - Find a route on a module

fixIISURLVars

private string fixIISURLVars(any requestString, any rc)
Clean up some IIS funkyness

Parameters:
requestString - The request string
rc - The request collection

getAutoReload

public boolean getAutoReload()
Set to auto reload the rules in each request


getBaseURL

public string getBaseURL()
Get BaseURL


getCGIElement

private string getCGIElement(string cgielement)
The cgi element facade method

Parameters:
cgielement - The cgi element to retrieve

getCleanedPaths

private struct getCleanedPaths()
Get and Clean the path_info and script names


getDefaultFrameworkAction

private string getDefaultFrameworkAction()
Get the default framework action


getEnabled

public boolean getEnabled()
Get enabled


getLooseMatching

public boolean getLooseMatching()
Get the current loose matching property


getModuleRoutes

public array getModuleRoutes(string module='')
Get a modules routes

Parameters:
module - The name of the module

getModulesRoutingTable

public struct getModulesRoutingTable()
Get the entire modules routing table


getRoutes

public Array getRoutes()
Get the array containing all the routes


getUniqueURLs

public boolean getUniqueURLs()
Get uniqueURLs


importConfiguration

private void importConfiguration()
Import the routing configuration file


packageResolver

private any packageResolver(any routingString, any routeParams)
Resolve handler packages

Parameters:
routingString - The routing string
routeParams - The route params array

preProcess

public void preProcess(any event, struct interceptData)
This is the route dispatch

Parameters:
event - The event object.
interceptData - interceptData of intercepted info.

processRouteOptionals

private void processRouteOptionals(struct thisRoute)
Process route optionals

Parameters:
thisRoute - The route struct

serializeURL

private string serializeURL([string formVars=''], any event)
Serialize a URL

Parameters:
formVars
event - The event object.

setAutoReload

public void setAutoReload(boolean autoReload)
Get the auto reload flag.

Parameters:
autoReload

setBaseURL

public void setBaseURL(string baseURL)
Set the base URL for the application.

Parameters:
baseURL

setEnabled

public void setEnabled(boolean enabled)
Set whether the interceptor is enabled or not.

Parameters:
enabled

setLooseMatching

public void setLooseMatching(boolean looseMatching)
Set the loose matching property of the interceptor

Parameters:
looseMatching

setModuleRoutingTable

private void setModuleRoutingTable(struct routes)
Set the module routing table

Parameters:
routes

setRoutes

private void setRoutes(Array routes)
Internal override of the routes array

Parameters:
routes

setUniqueURLs

public void setUniqueURLs(boolean uniqueURLs)
Set the uniqueURLs property

Parameters:
uniqueURLs

throwInvalidHTTP

private void throwInvalidHTTP(string description)
Throw an invalid HTTP exception

Parameters:
description - The throw description

ColdBox Platform Version 2.6.4