| 1 | <?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 | <!-- |
|---|
| 3 | Used within the circuit.xml page to contain the elements that define a circuit. |
|---|
| 4 | The <circuit></circuit> element can contain zero or more fuseactions as well as |
|---|
| 5 | the <prefuseaction></prefuseaction and <postfuseaction></postfuseaction> elements. |
|---|
| 6 | --> |
|---|
| 7 | <!ELEMENT circuit (fuseaction*, |
|---|
| 8 | ((prefuseaction?, fuseaction*, postfuseaction?) | |
|---|
| 9 | (postfuseaction?, fuseaction*, prefuseaction?)), |
|---|
| 10 | fuseaction*)> |
|---|
| 11 | <!ATTLIST circuit |
|---|
| 12 | access (internal | public | private) "internal" |
|---|
| 13 | permissions CDATA #IMPLIED |
|---|
| 14 | > |
|---|
| 15 | |
|---|
| 16 | <!-- |
|---|
| 17 | Provides a mechanism to execute a fuseaction at the beginning of every call to any |
|---|
| 18 | fuseaction in the circuit. Typically used to perform any processing that is required |
|---|
| 19 | to happen before each fuseaction in the circuit is triggered. |
|---|
| 20 | |
|---|
| 21 | Note: Items within a <prefuseaction></prefuseaction> container will execute with |
|---|
| 22 | each call to a fuseaction within its circuit. |
|---|
| 23 | |
|---|
| 24 | callsuper If this is set to true then the <prefuseaction /> in the parent circuit |
|---|
| 25 | (if any) will be triggered. The parent for a circuit is defined in the <circuit /> |
|---|
| 26 | definition in the fusebox.xml file. |
|---|
| 27 | --> |
|---|
| 28 | <!ELEMENT prefuseaction (set | xfa | do | include | relocate | loop | if | instantiate | invoke)*> |
|---|
| 29 | <!ATTLIST prefuseaction |
|---|
| 30 | callsuper (true | false) "false" |
|---|
| 31 | > |
|---|
| 32 | <!-- |
|---|
| 33 | Provides a mechanism to execute a fuseaction at the end of every call to any |
|---|
| 34 | fuseaction in the circuit. Typically used to perform any processing that is |
|---|
| 35 | required to happen after each fuseaction in the circuit is triggered. |
|---|
| 36 | |
|---|
| 37 | Note: Items within a <postfuseaction></postfuseaction> container will execute |
|---|
| 38 | at the end of each call to a fuseaction within its circuit. |
|---|
| 39 | |
|---|
| 40 | callsuper If this is set to true then the <postfuseaction /> in the parent |
|---|
| 41 | circuit (if any) will be triggered. The parent for a circuit is defined in |
|---|
| 42 | the <circuit /> definition in the fusebox.xml file. |
|---|
| 43 | --> |
|---|
| 44 | <!ELEMENT postfuseaction (set | xfa | do | include | relocate | loop | if | instantiate | invoke)*> |
|---|
| 45 | <!ATTLIST postfuseaction |
|---|
| 46 | callsuper (true | false) "false" |
|---|
| 47 | > |
|---|
| 48 | |
|---|
| 49 | <!-- |
|---|
| 50 | Every fuseaction is defined within a circuit.xml file within the |
|---|
| 51 | <circuits></circuits> container. A fuseaction defines at an architectural |
|---|
| 52 | level all of the functionality needed to execute. As an example, a fuseaction |
|---|
| 53 | of book.read might encompass ideas such as retrieve the book, find a chair, |
|---|
| 54 | open the book, etc. While the actual implementation of each of these items is |
|---|
| 55 | not explicitly defined in this fuseaction, these are the major functionalities |
|---|
| 56 | that are required to happen when executing these fuseactions. |
|---|
| 57 | |
|---|
| 58 | name Required. The name of the fuseaction. |
|---|
| 59 | access Optional. Defines the default access method for this specific fuseaction. |
|---|
| 60 | Can take one of three values: |
|---|
| 61 | |
|---|
| 62 | internal - fuseaction can only be accessed by other fuseactions; |
|---|
| 63 | private - fuseaction can only be accessed by other fuseactions in the |
|---|
| 64 | same circuit; |
|---|
| 65 | public - fuseaction can be accessed by any other fuseaction or directly |
|---|
| 66 | by URL or other non-fusebox invocation method |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | Note: This value overrides the access attribute in the circuit definition. |
|---|
| 70 | If it is not defined, the fuseaction inherits the access attribute defined |
|---|
| 71 | for its circuit. |
|---|
| 72 | |
|---|
| 73 | permissions Optional. Defines the default access method for each fuseaction |
|---|
| 74 | in the circuit. Can take a single text value or a comma-delimited list |
|---|
| 75 | of permissions. |
|---|
| 76 | |
|---|
| 77 | |
|---|
| 78 | |
|---|
| 79 | Note: Permissions can be used to implement security via a plugin. |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | --> |
|---|
| 83 | <!ELEMENT fuseaction (set | xfa | do | include | relocate | loop | if | instantiate | invoke)*> |
|---|
| 84 | <!ATTLIST fuseaction |
|---|
| 85 | name CDATA #REQUIRED |
|---|
| 86 | permissions CDATA #IMPLIED |
|---|
| 87 | access (internal | public | private) #IMPLIED |
|---|
| 88 | > |
|---|
| 89 | <!-- |
|---|
| 90 | Creates a variable, "name" having a "value. |
|---|
| 91 | |
|---|
| 92 | ATTRIBUTES |
|---|
| 93 | name Required if overwrite is present. Name of the variable. |
|---|
| 94 | value Required. The actual value that the variable should be set to. |
|---|
| 95 | evaluate Optional. defaults to false. If set to true, allows for dynamic |
|---|
| 96 | evaluation of a variable. See second example. |
|---|
| 97 | overwrite Optional, defaults to true. If set to false, evaluate will test |
|---|
| 98 | if this variable exists and if it does not exist, creates the variable |
|---|
| 99 | with the value provided. |
|---|
| 100 | --> |
|---|
| 101 | <!ELEMENT set EMPTY> |
|---|
| 102 | <!ATTLIST set |
|---|
| 103 | name CDATA #IMPLIED |
|---|
| 104 | value CDATA #REQUIRED |
|---|
| 105 | evaluate (true | false) "false" |
|---|
| 106 | overwrite (true | false) "true" |
|---|
| 107 | > |
|---|
| 108 | <!-- |
|---|
| 109 | Duplicates the functionality of the <set /> element, but automatically |
|---|
| 110 | puts the variable in the "xfa." scope for explicitly setting eXit FuseActions. |
|---|
| 111 | |
|---|
| 112 | Note: This should only (and always) be used to specify Fusebox XFAs. |
|---|
| 113 | Do not specify the xfa scope when using this tag, the variable will |
|---|
| 114 | automatically be created with it. |
|---|
| 115 | |
|---|
| 116 | |
|---|
| 117 | ATTRIBUTES |
|---|
| 118 | name Required. Name of the variable. It will automatically be put in the |
|---|
| 119 | Fusebox XFA structure (e.g. XFA.someExitFuseaction). XFA Scopes |
|---|
| 120 | are defined in the local scope. |
|---|
| 121 | value Required. The actual fuseaction that the xfa should be set to. |
|---|
| 122 | (includes both circuit and fuseaction name.) |
|---|
| 123 | |
|---|
| 124 | Note: If the fuseaction being called in the xfa is in the same circuit, |
|---|
| 125 | the circuit name can be omitted and just the fuseaction specified. |
|---|
| 126 | |
|---|
| 127 | evaluate Optional. defaults to false. If set to true, allows for dynamic |
|---|
| 128 | evaluation of a variable. See second example. |
|---|
| 129 | overwrite Optional, defaults to true. If set to false, evaluate will test |
|---|
| 130 | for a variable xfa.#name# and if it does not exist, creates |
|---|
| 131 | the xfa with the value provided. |
|---|
| 132 | --> |
|---|
| 133 | <!ELEMENT xfa EMPTY> |
|---|
| 134 | <!ATTLIST xfa |
|---|
| 135 | name CDATA #REQUIRED |
|---|
| 136 | value CDATA #REQUIRED |
|---|
| 137 | evaluate (true | false) "false" |
|---|
| 138 | overwrite (true | false) "true" |
|---|
| 139 | > |
|---|
| 140 | <!-- |
|---|
| 141 | Executes a fuseaction and optionally assigns the output of the fuseaction |
|---|
| 142 | to a variable specified in the contentvariable attribute. |
|---|
| 143 | |
|---|
| 144 | Note: Using <do /> commands can help with the replacement of recursive |
|---|
| 145 | fusebox calls. <do /> commands operate in the same memory space as the |
|---|
| 146 | currently executing fuseaction. <do /> commands can contain fuseactions |
|---|
| 147 | that also execute <do /> commands as well. |
|---|
| 148 | |
|---|
| 149 | |
|---|
| 150 | ATTRIBUTES |
|---|
| 151 | action Required. Defines the fuseaction to add to the Fuseaction queue. |
|---|
| 152 | Can be either a fully-qualified fuseaction (e.g. someCircuit.someFuseaction) |
|---|
| 153 | or another fuseaction in the same circuit (e.g. someOther). |
|---|
| 154 | contentvariable Optional. If a contentvariable name is specified, all the |
|---|
| 155 | output of the fuseaction in the action attribute will be saved to this |
|---|
| 156 | variable name. |
|---|
| 157 | append Optional, defaults to false. Determines whether output from the |
|---|
| 158 | fuseaction will be appended to (true) or overwrite (false) the |
|---|
| 159 | contentvariable specified in the contentvariable attribute. |
|---|
| 160 | --> |
|---|
| 161 | <!ELEMENT do (parameter*)> |
|---|
| 162 | <!ATTLIST do |
|---|
| 163 | action CDATA #REQUIRED |
|---|
| 164 | contentvariable CDATA #IMPLIED |
|---|
| 165 | append (true | false) "false" |
|---|
| 166 | overwrite (true | false) "true" |
|---|
| 167 | > |
|---|
| 168 | <!ELEMENT parameter EMPTY> |
|---|
| 169 | <!ATTLIST parameter |
|---|
| 170 | name CDATA #REQUIRED |
|---|
| 171 | value CDATA #REQUIRED |
|---|
| 172 | > |
|---|
| 173 | <!-- |
|---|
| 174 | Includes a template as part of the current fuseaction. |
|---|
| 175 | |
|---|
| 176 | Notes: If a filename with no extension is specified (e.g. dsp_myPage), |
|---|
| 177 | the fusebox scriptFileDelimiter will be automatically appended to the name. |
|---|
| 178 | |
|---|
| 179 | A circuits fuses should all exist in that circuit's directory. Although |
|---|
| 180 | a circuit's fuseactions can exist in other directories, this is a poor |
|---|
| 181 | programming practice since now the applications execution is now coupled |
|---|
| 182 | directly to the underlying directory structure. |
|---|
| 183 | |
|---|
| 184 | |
|---|
| 185 | ATTRIBUTES |
|---|
| 186 | template Required. The name of a file located in the circuit directory. |
|---|
| 187 | required Optional, defaults to true. If this attribute is set to true, |
|---|
| 188 | then an exception is thrown if the file does not exist. If the |
|---|
| 189 | value is set to false, the missing file will silently be ignored. |
|---|
| 190 | circuit Optional, defaults to current circuit. If this attribute is present, |
|---|
| 191 | Fusebox will look in the specified circuit's directory for the |
|---|
| 192 | included file. |
|---|
| 193 | overwrite Optional, defaults to true. If contentvariable is specified |
|---|
| 194 | and this attribute is "false", the template is only included if |
|---|
| 195 | the specified contentvariable is not already defined. |
|---|
| 196 | append Optional, defaults to false. If this attributes is set to true, |
|---|
| 197 | and contentvariable is specified, the output of the included |
|---|
| 198 | template will be appended to the current value of the contentvariable. |
|---|
| 199 | prepend Optional, defaults to false. If this attributes is set to true, |
|---|
| 200 | and contentvariable is specified, the output of the included |
|---|
| 201 | template will be prepended to the current value of the contentvariable. |
|---|
| 202 | contentvariable Optional. If present, specifies the name of a variable |
|---|
| 203 | into which the output of the included template will be stored. |
|---|
| 204 | Affected by the values of the append/prepend attributes if present. |
|---|
| 205 | --> |
|---|
| 206 | <!ELEMENT include (parameter*)> |
|---|
| 207 | <!ATTLIST include |
|---|
| 208 | template CDATA #REQUIRED |
|---|
| 209 | required (true | false) "true" |
|---|
| 210 | circuit CDATA #IMPLIED |
|---|
| 211 | overwrite (true | false) "true" |
|---|
| 212 | append (true | false) "false" |
|---|
| 213 | prepend (true | false) "false" |
|---|
| 214 | contentvariable CDATA #IMPLIED |
|---|
| 215 | > |
|---|
| 216 | <!-- |
|---|
| 217 | Used to instantiate an object defined in the <classes> tag |
|---|
| 218 | |
|---|
| 219 | ATTRIBUTES |
|---|
| 220 | arguments Optional, defaults to empty. This attribute may be |
|---|
| 221 | used to specify the arguments that should be passed to |
|---|
| 222 | the object's constructor, if one was specified. Alternately, |
|---|
| 223 | arguments may be specified using nested <argument> tags. |
|---|
| 224 | class Optional. Specifies the class name (declared in the |
|---|
| 225 | <classes> declaration of fusebox.xml). |
|---|
| 226 | webservice Optional. Specifies a URL for the WSDL file (Web |
|---|
| 227 | Service Description Language) that defines the web service |
|---|
| 228 | to be used. |
|---|
| 229 | object Required. The variable into which the instantiated class |
|---|
| 230 | or web service should be stored. |
|---|
| 231 | overwrite Optional, defaults to true. If this attribute is |
|---|
| 232 | "false", the instantiation only happens if the specified |
|---|
| 233 | object variable is not already defined. |
|---|
| 234 | |
|---|
| 235 | Note: one of "class" or "webservice" must be specified. |
|---|
| 236 | --> |
|---|
| 237 | <!ELEMENT instantiate (argument*)> |
|---|
| 238 | <!ATTLIST instantiate |
|---|
| 239 | arguments CDATA #IMPLIED |
|---|
| 240 | class CDATA #IMPLIED |
|---|
| 241 | webservice CDATA #IMPLIED |
|---|
| 242 | object CDATA #IMPLIED |
|---|
| 243 | overwrite (true | false) "true" |
|---|
| 244 | > |
|---|
| 245 | <!ELEMENT argument EMPTY> |
|---|
| 246 | <!ATTLIST argument |
|---|
| 247 | name CDATA #IMPLIED |
|---|
| 248 | value CDATA #REQUIRED |
|---|
| 249 | > |
|---|
| 250 | <!-- |
|---|
| 251 | Used to invoke an object defined in the <classes> tag |
|---|
| 252 | |
|---|
| 253 | ATTRIBUTES |
|---|
| 254 | object Optional. Specifies the object to be used for the method |
|---|
| 255 | invocation. |
|---|
| 256 | class Optional. Specifies a class to instantiate, to create the |
|---|
| 257 | object to be used for the method invocation. |
|---|
| 258 | webservice Optional. Specifies a URL for the WSDL file (Web |
|---|
| 259 | Service Description Language) that defines a web service |
|---|
| 260 | to be used, to create the object to be used for the method |
|---|
| 261 | invocation. |
|---|
| 262 | method Optional. Specifies the method name to be used. Arguments |
|---|
| 263 | are specified using nested <argument> verbs. |
|---|
| 264 | methodcall Optional. Specifies the method name and arguments to |
|---|
| 265 | be used for the method invocation, e.g., "setData('theData')". |
|---|
| 266 | overwrite Optional, defaults to true. Only meaningful if |
|---|
| 267 | returnvariable is also specified. If this attribute is "false", |
|---|
| 268 | the invocation only happens if the specified returnvariable |
|---|
| 269 | is not already defined. |
|---|
| 270 | returnvariable Optional. Specifies the variable into which the |
|---|
| 271 | value returned by the method invocation is stored. |
|---|
| 272 | |
|---|
| 273 | Note: one of "object" or "class" or "webservice" must be specified. |
|---|
| 274 | Note: one of "method" or "methodcall" must be specified. |
|---|
| 275 | --> |
|---|
| 276 | <!ELEMENT invoke (argument*)> |
|---|
| 277 | <!ATTLIST invoke |
|---|
| 278 | object CDATA #IMPLIED |
|---|
| 279 | class CDATA #IMPLIED |
|---|
| 280 | webservice CDATA #IMPLIED |
|---|
| 281 | method CDATA #IMPLIED |
|---|
| 282 | methodcall CDATA #IMPLIED |
|---|
| 283 | overwrite (true | false) "true" |
|---|
| 284 | returnvariable CDATA #IMPLIED |
|---|
| 285 | > |
|---|
| 286 | <!-- |
|---|
| 287 | Indicates a page redirect to another URL. Similar to <CFLOCATION> in CFML. |
|---|
| 288 | Can be used for both client-side and server-side redirections and the |
|---|
| 289 | CFID/CFTOKEN information can be appended to the URL automatically. |
|---|
| 290 | |
|---|
| 291 | ATTRIBUTES |
|---|
| 292 | url Required. Any URL. Web page target for redirection. |
|---|
| 293 | addtoken Optional. true|false. |
|---|
| 294 | |
|---|
| 295 | Defaults to false. |
|---|
| 296 | |
|---|
| 297 | If true, the CFID/CFTOKEN values are appended to the URL parameter. |
|---|
| 298 | |
|---|
| 299 | type Optional. client|server. Indicates whether the page redirection |
|---|
| 300 | should be server-side or client-side. |
|---|
| 301 | |
|---|
| 302 | server - CFMX only: uses page-forward for true server side only relocation. |
|---|
| 303 | client - Available on CF5 and CFMX - uses the <cflocation> tag for |
|---|
| 304 | relocation that hits the client browser before redirection takes place. |
|---|
| 305 | |
|---|
| 306 | Note: Client Side Relocation DOES NOT use JavaScript |
|---|
| 307 | --> |
|---|
| 308 | <!ELEMENT relocate EMPTY> |
|---|
| 309 | <!ATTLIST relocate |
|---|
| 310 | url CDATA #REQUIRED |
|---|
| 311 | type (client | server) "client" |
|---|
| 312 | addtoken (true | false) "false" |
|---|
| 313 | > |
|---|
| 314 | <!-- |
|---|
| 315 | Used to iterate through a series of fuses in the fuseaction based on the |
|---|
| 316 | same five basic loop types as ColdFusion: |
|---|
| 317 | condition - loop until the condition becomes false |
|---|
| 318 | query - loop over the records in the query |
|---|
| 319 | from/to/index/step - loop over the specified range of values |
|---|
| 320 | collection/item - loop over the keys in the specified structure |
|---|
| 321 | list/index - loop over the elements of the list |
|---|
| 322 | |
|---|
| 323 | Note: For the condition form of loop, you must provide a way for the |
|---|
| 324 | condition to reach a value of "false" or the loop will be endless. |
|---|
| 325 | |
|---|
| 326 | |
|---|
| 327 | ATTRIBUTES |
|---|
| 328 | see loop types above. |
|---|
| 329 | --> |
|---|
| 330 | <!ELEMENT loop (set | xfa | do | include | relocate | loop | if | instantiate | invoke)*> |
|---|
| 331 | <!ATTLIST loop |
|---|
| 332 | condition CDATA #IMPLIED |
|---|
| 333 | from CDATA #IMPLIED |
|---|
| 334 | to CDATA #IMPLIED |
|---|
| 335 | index CDATA #IMPLIED |
|---|
| 336 | item CDATA #IMPLIED |
|---|
| 337 | collection CDATA #IMPLIED |
|---|
| 338 | query CDATA #IMPLIED |
|---|
| 339 | list CDATA #IMPLIED |
|---|
| 340 | > |
|---|
| 341 | <!-- |
|---|
| 342 | Used to implement simple decisions inside of a fuseaction. Can include the |
|---|
| 343 | capability to execute actions based only on whether the condition is true or |
|---|
| 344 | false. There can only be one iteration of <true></true> and one iteration of |
|---|
| 345 | <false></false> within every <if></if> block. |
|---|
| 346 | |
|---|
| 347 | ATTRIBUTES |
|---|
| 348 | condition Required. Any logical expression that can evaluate to either true or false. |
|---|
| 349 | --> |
|---|
| 350 | <!ELEMENT if ((true, false?) | (false, true?))> |
|---|
| 351 | <!ATTLIST if |
|---|
| 352 | condition CDATA #REQUIRED |
|---|
| 353 | > |
|---|
| 354 | <!-- The <true/> tag is an optional subelement of the <if/> element. It contains |
|---|
| 355 | the logic to execute if the condition in the <if/> tag evaluates to "true". --> |
|---|
| 356 | <!ELEMENT true (set | xfa | do | include | relocate | loop | if | instantiate | invoke)*> |
|---|
| 357 | <!-- The <false/> tag is an optional subelement of the <if/> element. It contains |
|---|
| 358 | the logic to execute if the condition in the <if/> tag evaluates to "false". --> |
|---|
| 359 | <!ELEMENT false (set | xfa | do | include | relocate | loop | if | instantiate | invoke)*> |
|---|