commandbox.system.util

Class TaskDSL

lucee.Component
    extended by commandbox.system.util.TaskDSL

Copyright Since 2014 CommandBox by Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com I am a helper object for executing tasks via a DSL. Create me and call my methods to build up an execution, then .run() will execute me. I am a transient and hold state. Do not share me with your friends.

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
  • author : Brad Wood, Luis Majano
  •  
    Property Summary
    type property default serializable required
    any exitCode


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


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


    • access = public
    • returntype = any
    • inject = interactiveJob
    true false
    any params


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


    • access = public
    • returntype = any
    • inject = parser
    true false
    any rawParams


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


    • access = public
    • returntype = any
    • inject = shell
    true false
    any target


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


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


    • access = public
    • returntype = any
    • inject = wirebox
    true false
    any workingDirectory


    • access = public
    • returntype = any
    true false
    Constructor Summary
    init([any taskFile='task'])
          Create a new, executable task.
    Method Summary
    any flags()
         Add flags to the command.
    string getCommandString()
         Turn this CFC into a string representation.
    string getExitCode()
    string getFlags()
    string getJob()
    string getParams()
    string getParser()
    string getRawParams()
    string getShell()
    string getTarget()
    string getTaskFile()
    array getTokens()
         Turn this CFC into an array of command tokens.
    string getWirebox()
    string getWorkingDirectory()
    any inWorkingDirectory(any workingDirectory)
         Sets the directory to run the task in.
    any params()
         Add params to the command.
    private array processParams()
         Convert params to named or positional arguments.
    string run([any returnOutput='false'], [boolean echo='false'], [boolean rawParams='false'])
         Run this command.
    any setExitCode(any exitCode)
    any setFlags(any flags)
    any setJob(any job)
    any setParams(any params)
    any setParser(any parser)
    any setRawParams(any rawParams)
    any setShell(any shell)
    any setTarget(any target)
    any setTaskFile(any taskFile)
    any setWirebox(any wirebox)
    any setWorkingDirectory(any workingDirectory)
    any target([any target])
         Add params to the task.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init([any taskFile='task'])

    Create a new, executable task

    Parameters:
    taskFile - I am the task to execute

    Property Detail

    exitCode

    property any exitCode

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

    flags

    property any flags

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

    job

    property any job

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

    params

    property any params

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

    parser

    property any parser

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

    rawParams

    property any rawParams

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

    shell

    property any shell

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

    target

    property any target

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

    taskFile

    property any taskFile

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

    wirebox

    property any wirebox

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

    workingDirectory

    property any workingDirectory

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

    Method Detail

    flags

    public any flags()

    Add flags to the command


    getCommandString

    public string getCommandString()

    Turn this CFC into a string representation


    getExitCode

    public string getExitCode()


    getFlags

    public string getFlags()


    getJob

    public string getJob()


    getParams

    public string getParams()


    getParser

    public string getParser()


    getRawParams

    public string getRawParams()


    getShell

    public string getShell()


    getTarget

    public string getTarget()


    getTaskFile

    public string getTaskFile()


    getTokens

    public array getTokens()

    Turn this CFC into an array of command tokens


    getWirebox

    public string getWirebox()


    getWorkingDirectory

    public string getWorkingDirectory()


    inWorkingDirectory

    public any inWorkingDirectory(any workingDirectory)

    Sets the directory to run the task in

    Parameters:
    workingDirectory

    params

    public any params()

    Add params to the command


    processParams

    private array processParams()

    Convert params to named or positional arguments


    run

    public string run([any returnOutput='false'], [boolean echo='false'], [boolean rawParams='false'])

    Run this command

    Parameters:
    returnOutput
    echo
    rawParams

    setExitCode

    public any setExitCode(any exitCode)

    Parameters:
    exitCode

    setFlags

    public any setFlags(any flags)

    Parameters:
    flags

    setJob

    public any setJob(any job)

    Parameters:
    job

    setParams

    public any setParams(any params)

    Parameters:
    params

    setParser

    public any setParser(any parser)

    Parameters:
    parser

    setRawParams

    public any setRawParams(any rawParams)

    Parameters:
    rawParams

    setShell

    public any setShell(any shell)

    Parameters:
    shell

    setTarget

    public any setTarget(any target)

    Parameters:
    target

    setTaskFile

    public any setTaskFile(any taskFile)

    Parameters:
    taskFile

    setWirebox

    public any setWirebox(any wirebox)

    Parameters:
    wirebox

    setWorkingDirectory

    public any setWorkingDirectory(any workingDirectory)

    Parameters:
    workingDirectory

    target

    public any target([any target])

    Add params to the task

    Parameters:
    target