commandbox.system.services

Class EndpointService

lucee.Component
    extended by commandbox.system.services.EndpointService

Copyright Since 2014 CommandBox by Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com I handle working with Endpoints

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


    • access = public
    • returntype = any
    • inject = configService
    true false
    any consoleLogger


    • access = public
    • returntype = any
    • inject = logbox:logger:console
    true false
    struct endpointRegistry


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


    • access = public
    • returntype = any
    /commandbox/system/endpoints true false
    any fileSystemUtil


    • access = public
    • returntype = any
    • inject = FileSystem
    true false
    any logger


    • access = public
    • returntype = any
    • inject = logbox:logger:{this}
    true false
    any tempDir


    • access = public
    • returntype = any
    • inject = tempDir@constants
    true false
    any wirebox


    • access = public
    • returntype = any
    • inject = wirebox
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    any buildEndpointRegistry([string rootDirectory='[runtime expression]'])
         Inspect the endpoints folder and register them.
    any createEndpointUser(string endpointName, string username, string password, string email, string firstName, string lastName)
         A facade to create a user with an interactive endpoint.
    any forgeboxEndpointNameComplete()
    string getConfigService()
    string getConsoleLogger()
    commandbox.system.services.IEndpoint getEndpoint(string endpointName)
         Returns the endpoint object.
    string getEndpointRegistry()
    string getEndpointRootPath()
    string getFileSystemUtil()
    string getLogger()
    string getTempDir()
    string getWirebox()
    any loginEndpointUser(string endpointName, string username, string password)
         A facade to login a user with an interactive endpoint.
    any onDIComplete()
    any publishEndpointPackage(string endpointName, string directory, [boolean upload='false'], [boolean forceUpload='false'])
         A facade to publish a package with an interactive endpoint.
    any registerCustomForgeboxEndpoints()
         Look for custom ForgeBox endpoints that are in the config and register themm.
    any registerEndpoint(any oEndPoint)
         Register a single CFC instance as an endpoint.
    struct resolveEndpoint(string ID, string currentWorkingDirectory)
         Inspects ID and returns endpoint object, endpointName, and ID (with endpoint stripped).
    struct resolveEndpointData(string ID, string currentWorkingDirectory)
         Inspects ID and returns name of endpoint.
    any setConfigService(any configService)
    any setConsoleLogger(any consoleLogger)
    any setEndpointRegistry(struct endpointRegistry)
    any setEndpointRootPath(string endpointRootPath)
    any setFileSystemUtil(any fileSystemUtil)
    any setLogger(any logger)
    any setTempDir(any tempDir)
    any setWirebox(any wirebox)
    any unpublishEndpointPackage(string endpointName, string directory, [string version=''])
         A facade to unpublish a package with an interactive endpoint.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    configService

    property any configService

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

    consoleLogger

    property any consoleLogger

    Attributes:
    access - public
    required - false
    returntype - any
    inject - logbox:logger:console
    serializable - true

    endpointRegistry

    property struct endpointRegistry

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

    endpointRootPath

    property string endpointRootPath = [/commandbox/system/endpoints]

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

    fileSystemUtil

    property any fileSystemUtil

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

    logger

    property any logger

    Attributes:
    access - public
    required - false
    returntype - any
    inject - logbox:logger:{this}
    serializable - true

    tempDir

    property any tempDir

    Attributes:
    access - public
    required - false
    returntype - any
    inject - tempDir@constants
    serializable - true

    wirebox

    property any wirebox

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

    Method Detail

    buildEndpointRegistry

    public any buildEndpointRegistry([string rootDirectory='[runtime expression]'])

    Inspect the endpoints folder and register them.

    Parameters:
    rootDirectory

    createEndpointUser

    public any createEndpointUser(string endpointName, string username, string password, string email, string firstName, string lastName)

    A facade to create a user with an interactive endpoint. Keeping this logic here so I can standardize the storage of the APIToken and make it reusable outside of the command.

    Parameters:
    endpointName - The name of the endpoint
    username - ForgeBox username
    password - The password
    email - ForgeBox email
    firstName - First name
    lastName - Last Name

    forgeboxEndpointNameComplete

    public any forgeboxEndpointNameComplete()


    getConfigService

    public string getConfigService()


    getConsoleLogger

    public string getConsoleLogger()


    getEndpoint

    public commandbox.system.services.IEndpoint getEndpoint(string endpointName)

    Returns the endpoint object.

    Parameters:
    endpointName - The name of the endpoint to retrieve

    getEndpointRegistry

    public string getEndpointRegistry()


    getEndpointRootPath

    public string getEndpointRootPath()


    getFileSystemUtil

    public string getFileSystemUtil()


    getLogger

    public string getLogger()


    getTempDir

    public string getTempDir()


    getWirebox

    public string getWirebox()


    loginEndpointUser

    public any loginEndpointUser(string endpointName, string username, string password)

    A facade to login a user with an interactive endpoint. Keeping this logic here so I can standardize the storage of the APIToken and make it reusable outside of the command.

    Parameters:
    endpointName - The name of the endpoint
    username - The username
    password - The password to use

    onDIComplete

    public any onDIComplete()


    publishEndpointPackage

    public any publishEndpointPackage(string endpointName, string directory, [boolean upload='false'], [boolean forceUpload='false'])

    A facade to publish a package with an interactive endpoint.

    Parameters:
    endpointName - The name of the endpoint to publish to
    directory - The directory to publish
    upload
    forceUpload

    registerCustomForgeboxEndpoints

    public any registerCustomForgeboxEndpoints()

    Look for custom ForgeBox endpoints that are in the config and register themm These will use the same base ForgeBox.cfc endpoint but with custom data


    registerEndpoint

    public any registerEndpoint(any oEndPoint)

    Register a single CFC instance as an endpoint

    Parameters:
    oEndPoint - An instance of a CFC implementing IEndPoint

    resolveEndpoint

    public struct resolveEndpoint(string ID, string currentWorkingDirectory)

    Inspects ID and returns endpoint object, endpointName, and ID (with endpoint stripped).

    Parameters:
    ID - The id of the endpoint
    currentWorkingDirectory - Where we are working from

    resolveEndpointData

    public struct resolveEndpointData(string ID, string currentWorkingDirectory)

    Inspects ID and returns name of endpoint. If none is specified, tests for local file or folder. Defaults to forgebox.

    Parameters:
    ID - The id of the endpoint
    currentWorkingDirectory - Where we are working from

    setConfigService

    public any setConfigService(any configService)

    Parameters:
    configService

    setConsoleLogger

    public any setConsoleLogger(any consoleLogger)

    Parameters:
    consoleLogger

    setEndpointRegistry

    public any setEndpointRegistry(struct endpointRegistry)

    Parameters:
    endpointRegistry

    setEndpointRootPath

    public any setEndpointRootPath(string endpointRootPath)

    Parameters:
    endpointRootPath

    setFileSystemUtil

    public any setFileSystemUtil(any fileSystemUtil)

    Parameters:
    fileSystemUtil

    setLogger

    public any setLogger(any logger)

    Parameters:
    logger

    setTempDir

    public any setTempDir(any tempDir)

    Parameters:
    tempDir

    setWirebox

    public any setWirebox(any wirebox)

    Parameters:
    wirebox

    unpublishEndpointPackage

    public any unpublishEndpointPackage(string endpointName, string directory, [string version=''])

    A facade to unpublish a package with an interactive endpoint.

    Parameters:
    endpointName - The name of the endpoint to publish to
    directory - The directory to publish
    version - The version to unpublish