contentbox.model.updates

Class ForgeBox

railo-context.Component
        extended by contentbox.model.updates.ForgeBox
Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  

    ForgeBox API REST Wrapper

    Property Summary
    type property default serializable required
    any APIURL


    • inject = coldbox:setting:updatesURL@contentbox
    true false
    any logger


    • inject = logbox:logger:{this}
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    void $abort()
         Facade for cfabort.
    void $dump(any var, [boolean isAbort='false'])
         Facade for cfmx dump.
    any $throw(string message, [string detail=''], [string type='Framework'])
         Facade for cfthrow.
    string getAPIURL()
    query getEntries([string orderBy='[runtime expression]'], [numeric maxrows='0'], [numeric startRow='1'], [string typeSlug=''])
         Get entries.
    struct getEntry(string slug='')
         Get an entry from forgebox by slug.
    string getLogger()
    query getTypes()
         Get an array of entry types.
    struct install(string downloadURL, string destinationDir)
         Install Code Entry.
    private struct makeRequest([string method='GET'], [string resource=''], [any body=''], [struct headers='[runtime expression]'], [struct parameters='[runtime expression]'], [numeric timeout='30'])
         Invoke a ForgeBox REST Call.
    any setAPIURL(any APIURL)
    any setLogger(any logger)
     
    Methods inherited from class railo-context.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    APIURL

    property any APIURL

    Attributes:
    required - false
    inject - coldbox:setting:updatesURL@contentbox
    serializable - true

    logger

    property any logger

    Attributes:
    required - false
    inject - logbox:logger:{this}
    serializable - true

    Method Detail

    $abort

    public void $abort()

    Facade for cfabort


    $dump

    public void $dump(any var, [boolean isAbort='false'])

    Facade for cfmx dump

    Parameters:
    var
    isAbort - Abort also

    $throw

    public any $throw(string message, [string detail=''], [string type='Framework'])

    Facade for cfthrow

    Parameters:
    message
    detail
    type

    getAPIURL

    public string getAPIURL()


    getEntries

    public query getEntries([string orderBy='[runtime expression]'], [numeric maxrows='0'], [numeric startRow='1'], [string typeSlug=''])

    Get entries

    Parameters:
    orderBy - The type to order by, look at this.ORDERBY
    maxrows - Max rows to return
    startRow - StartRow
    typeSlug - The tye slug to filter on

    getEntry

    public struct getEntry(string slug='')

    Get an entry from forgebox by slug

    Parameters:
    slug - The entry slug to retreive

    getLogger

    public string getLogger()


    getTypes

    public query getTypes()

    Get an array of entry types


    install

    public struct install(string downloadURL, string destinationDir)

    Install Code Entry

    Parameters:
    downloadURL
    destinationDir

    makeRequest

    private struct makeRequest([string method='GET'], [string resource=''], [any body=''], [struct headers='[runtime expression]'], [struct parameters='[runtime expression]'], [numeric timeout='30'])

    Invoke a ForgeBox REST Call

    Parameters:
    method - The HTTP method to invoke
    resource - The resource to hit in the forgebox service.
    body - The body content of the request if passed.
    headers - An struct of HTTP headers to send
    parameters - An struct of HTTP URL parameters to send in the request
    timeout - The default call timeout

    setAPIURL

    public any setAPIURL(any APIURL)

    Parameters:
    APIURL

    setLogger

    public any setLogger(any logger)

    Parameters:
    logger