contentbox.models.system

Class Response

lucee.Component
    extended by contentbox.models.system.Response

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- HTTP Response model, spice up as needed

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    boolean binary


    • access = public
    • returntype = any
    false true false
    boolean cachedResponse


    • access = public
    • returntype = any
    false true false
    string contentType


    • access = public
    • returntype = any
    true false
    any data


    • access = public
    • returntype = any
    true false
    boolean error


    • access = public
    • returntype = any
    false true false
    numeric errorCode


    • access = public
    • returntype = any
    0 true false
    string format


    • access = public
    • returntype = any
    json true false
    array headers


    • access = public
    • returntype = any
    true false
    string jsonCallback


    • access = public
    • returntype = any
    true false
    string jsonQueryFormat


    • access = public
    • returntype = any
    query true false
    string location


    • access = public
    • returntype = any
    true false
    array messages


    • access = public
    • returntype = any
    true false
    numeric responsetime


    • access = public
    • returntype = any
    0 true false
    numeric statusCode


    • access = public
    • returntype = any
    200 true false
    string statusText


    • access = public
    • returntype = any
    OK true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    any addHeader(string name, string value)
         Add a header.
    any addMessage(any message)
         Add some messages.
    string getBinary()
    string getCachedResponse()
    string getContentType()
    string getData()
    any getDataPacket()
         Returns a standard response formatted data packet.
    string getError()
    string getErrorCode()
    string getFormat()
    string getHeaders()
    string getJsonCallback()
    string getJsonQueryFormat()
    string getLocation()
    string getMessages()
    string getResponsetime()
    string getStatusCode()
    string getStatusText()
    any setBinary(boolean binary)
    any setCachedResponse(boolean cachedResponse)
    any setContentType(string contentType)
    any setData(any data)
    any setError(boolean error)
    any setErrorCode(numeric errorCode)
    any setFormat(string format)
    any setHeaders(array headers)
    any setJsonCallback(string jsonCallback)
    any setJsonQueryFormat(string jsonQueryFormat)
    any setLocation(string location)
    any setMessages(array messages)
    any setResponsetime(numeric responsetime)
    any setStatusCode(numeric statusCode)
    any setStatusText(string statusText)
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    binary

    property boolean binary = [false]

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    cachedResponse

    property boolean cachedResponse = [false]

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    contentType

    property string contentType

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    data

    property any data

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    error

    property boolean error = [false]

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    errorCode

    property numeric errorCode = [0]

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    format

    property string format = [json]

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    headers

    property array headers

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    jsonCallback

    property string jsonCallback

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    jsonQueryFormat

    property string jsonQueryFormat = [query]

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    location

    property string location

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    messages

    property array messages

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    responsetime

    property numeric responsetime = [0]

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    statusCode

    property numeric statusCode = [200]

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    statusText

    property string statusText = [OK]

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    Method Detail

    addHeader

    public any addHeader(string name, string value)

    Add a header

    Parameters:
    name - header name
    value - header value

    addMessage

    public any addMessage(any message)

    Add some messages

    Parameters:
    message - Array or string of message to incorporate

    getBinary

    public string getBinary()


    getCachedResponse

    public string getCachedResponse()


    getContentType

    public string getContentType()


    getData

    public string getData()


    getDataPacket

    public any getDataPacket()

    Returns a standard response formatted data packet


    getError

    public string getError()


    getErrorCode

    public string getErrorCode()


    getFormat

    public string getFormat()


    getHeaders

    public string getHeaders()


    getJsonCallback

    public string getJsonCallback()


    getJsonQueryFormat

    public string getJsonQueryFormat()


    getLocation

    public string getLocation()


    getMessages

    public string getMessages()


    getResponsetime

    public string getResponsetime()


    getStatusCode

    public string getStatusCode()


    getStatusText

    public string getStatusText()


    setBinary

    public any setBinary(boolean binary)

    Parameters:
    binary

    setCachedResponse

    public any setCachedResponse(boolean cachedResponse)

    Parameters:
    cachedResponse

    setContentType

    public any setContentType(string contentType)

    Parameters:
    contentType

    setData

    public any setData(any data)

    Parameters:
    data

    setError

    public any setError(boolean error)

    Parameters:
    error

    setErrorCode

    public any setErrorCode(numeric errorCode)

    Parameters:
    errorCode

    setFormat

    public any setFormat(string format)

    Parameters:
    format

    setHeaders

    public any setHeaders(array headers)

    Parameters:
    headers

    setJsonCallback

    public any setJsonCallback(string jsonCallback)

    Parameters:
    jsonCallback

    setJsonQueryFormat

    public any setJsonQueryFormat(string jsonQueryFormat)

    Parameters:
    jsonQueryFormat

    setLocation

    public any setLocation(string location)

    Parameters:
    location

    setMessages

    public any setMessages(array messages)

    Parameters:
    messages

    setResponsetime

    public any setResponsetime(numeric responsetime)

    Parameters:
    responsetime

    setStatusCode

    public any setStatusCode(numeric statusCode)

    Parameters:
    statusCode

    setStatusText

    public any setStatusText(string statusText)

    Parameters:
    statusText