Changes between Initial Version and Version 1 of ReferenceMaterials/ControllerApi

Show
Ignore:
Timestamp:
04/15/09 19:43:31 (17 years ago)
Author:
trac (IP: 127.0.0.1)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ReferenceMaterials/ControllerApi

    v1 v1  
     1[[PageOutline]] 
     2 
     3= Controller API = 
     4 
     5A Controller in a Model-Glue application extends the !ModelGlue.Core.Controller CFC. 
     6 
     7The base controller contains a set of functions known as the Controller API. These functions are available inside all controllers and provide controller-related functionality. 
     8 
     9== Adding a Message Listener Function == 
     10 
     11To add a function that can be registered via a <message-listener> tag, the function must have a RETURNTYPE attribute of VOID, and a single argument of type "any". 
     12 
     13== !AddToCache(name:string, value:any, [timeout:numeric]) == 
     14 
     15==== Description ==== 
     16 
     17Adds the value passed to the controllers internal cache, using the name passed as a key.  If timeout is passed, it is the lifespan, in minutes, of the value passed. 
     18 
     19==== Returns ==== 
     20 
     21Void 
     22 
     23==== Arguments ==== 
     24 
     25Name (Required) - The key by which to identify this value in the cache. 
     26 
     27Value (Required) - The value to cache 
     28 
     29Timeout (Optional) - The number of minutes to store the value in the cache.  Defaults to the !DefaultCacheTimeout setting set the !ModelGlueConfiguration bean in !ColdSpring.xml. 
     30 
     31== !GetFromCache(name:string) == 
     32 
     33==== Description ==== 
     34 
     35Gets a value from the cache with a matching name. If the value does not exist, an error of type !ModelGlue.Util.!TimedCache.!ItemNotFound will be thrown. 
     36 
     37==== Returns ==== 
     38 
     39Any 
     40 
     41==== Arguments ==== 
     42 
     43Name (Required) - The key of the value to retrieve. 
     44 
     45== !GetModelGlue() == 
     46 
     47==== Description ==== 
     48 
     49Returns the Model-Glue framework itself 
     50 
     51==== Returns ==== 
     52 
     53!ModelGlue.unity.framework.!ModelGlue 
     54 
     55==== Arguments ==== 
     56 
     57None