ContentBox Core API 1.6.0

contentbox.model.updates
Class ForgeBox

WEB-INF.cftags.component
        extended by contentbox.model.updates.ForgeBox

public class ForgeBox
extends WEB-INF.cftags.component

ForgeBox API REST Wrapper

Property Summary
Type Property & Description Default Serializable Required
 any APIURL


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


Attributes:
  • 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
 any GETAPIURL()
          get:
 any GETLOGGER()
          get:
 ForgeBox SETAPIURL(any APIURL)
          set:
 ForgeBox SETLOGGER(any logger)
          set:
 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
 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
 
Methods inherited from class WEB-INF.cftags.component
None
 

Constructor Detail

init

public init()
Constructor

Property Detail

APIURL

any APIURL

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

logger

any logger

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

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 any GETAPIURL()
get:


GETLOGGER

public any GETLOGGER()
get:


SETAPIURL

public ForgeBox SETAPIURL(any APIURL)
set:

Parameters:
APIURL

SETLOGGER

public ForgeBox SETLOGGER(any logger)
set:

Parameters:
logger

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

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

ContentBox Core API 1.6.0