Transfer version 1.1

transfer.com.dynamic.definition
Class DefinitionBuffer

WEB-INF.cftags.component
        extended by transfer.com.dynamic.definition.DefinitionBuffer

public class DefinitionBuffer
extends WEB-INF.cftags.component

A Buffer specifically for writing a Transfer Object definition


Constructor Summary
init()
          Constructor
 
Method Summary
 void append(string string)
          Appends the string
 void cfScript(boolean open)
          Writes a cfscript
private any getStringBuffer()
          return: java.lang.StringBuffer
private string nl()
          return new line char
private string q()
          returns a quote
private void setStringBuffer(any StringBuffer)
 string toDefintionString()
          Method to push out contents to the string
 void writeCFArgument(string name, [string type='any'], [string hint=''], [boolean required='no'], [string default])
          Writes an argument to the buffer
 void writeCFFunctionClose()
          Writes the closing part of a cffunction
 void writeCFFunctionOpen(string name, string access, string returnType, [string hint=''])
          Writes the opening part of a CFFunction
 void writeCFScriptBlock(string body)
          Writes a block of cfscript
 void writeCopyOpenFunction(any function, [string defaultHint=''])
          copies the open function call for a given function
 void writeDoubleCheckLockClose()
          Writes a double check lock end
 void writeDoubleCheckLockOpen(string condition, string lockName)
          Writes a double check lock start
 void writeLazyLoad(string name)
          writes the check if it's loaded, and calls its load method
 void writeLazyUnLoad(string name)
          writes the check if it's loaded, and calls its unload method
 void writeLine(string text)
          Writes a line with a carriage return at the end
 void writeNamedLockClose()
          writes a named lock
 void writeNamedLockOpen(string lockName)
          writes a named lock
 void writeSetIsDirty(boolean isDirty)
          Writes the functoin call to setIsDirty()
 void writeSetIsLoaded(string name, boolean loaded)
          Writes a set is loaded function
 void writeTransferClassCheck(string transferScript, string className)
          Writes the code to check a class type
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init()
Constructor

Method Detail

append

public void append(string string)
Appends the string

Parameters:
string - The string to append

cfScript

public void cfScript(boolean open)
Writes a cfscript

Parameters:
open - Is it open, or close?

getStringBuffer

private any getStringBuffer()
return: java.lang.StringBuffer


nl

private string nl()
return new line char


q

private string q()
returns a quote


setStringBuffer

private void setStringBuffer(any StringBuffer)

Parameters:
StringBuffer - java.lang.StringBuffer

toDefintionString

public string toDefintionString()
Method to push out contents to the string


writeCFArgument

public void writeCFArgument(string name, [string type='any'], [string hint=''], [boolean required='no'], [string default])
Writes an argument to the buffer

Parameters:
name - The name of the argument
type - The type of the argument
hint - the hint to add to the argument
required - Whether the argument is required
default - Default value for the argument

writeCFFunctionClose

public void writeCFFunctionClose()
Writes the closing part of a cffunction


writeCFFunctionOpen

public void writeCFFunctionOpen(string name, string access, string returnType, [string hint=''])
Writes the opening part of a CFFunction

Parameters:
name - The name of the function
access - The access of the funtion
returnType - The return Type of the function
hint - The hint for the function

writeCFScriptBlock

public void writeCFScriptBlock(string body)
Writes a block of cfscript

Parameters:
body - The body of the script block

writeCopyOpenFunction

public void writeCopyOpenFunction(any function, [string defaultHint=''])
copies the open function call for a given function

Parameters:
function - The function coming through
defaultHint - the default hint value

writeDoubleCheckLockClose

public void writeDoubleCheckLockClose()
Writes a double check lock end


writeDoubleCheckLockOpen

public void writeDoubleCheckLockOpen(string condition, string lockName)
Writes a double check lock start

Parameters:
condition - The condition to check
lockName - The name of the lock

writeLazyLoad

public void writeLazyLoad(string name)
writes the check if it's loaded, and calls its load method

Parameters:
name - The name of the Loaded

writeLazyUnLoad

public void writeLazyUnLoad(string name)
writes the check if it's loaded, and calls its unload method

Parameters:
name - The name of the Loaded

writeLine

public void writeLine(string text)
Writes a line with a carriage return at the end

Parameters:
text - The text

writeNamedLockClose

public void writeNamedLockClose()
writes a named lock


writeNamedLockOpen

public void writeNamedLockOpen(string lockName)
writes a named lock

Parameters:
lockName - The name of the lock

writeSetIsDirty

public void writeSetIsDirty(boolean isDirty)
Writes the functoin call to setIsDirty()

Parameters:
isDirty - boolean if it is dirty or not

writeSetIsLoaded

public void writeSetIsLoaded(string name, boolean loaded)
Writes a set is loaded function

Parameters:
name - The name of the isLoaded
loaded - If it's loaded or not

writeTransferClassCheck

public void writeTransferClassCheck(string transferScript, string className)
Writes the code to check a class type

Parameters:
transferScript - The reference to the transfer object to check
className - The className to check against

Transfer version 1.1