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 interceptorService


    • access = public
    • returntype = any
    • inject = interceptorService
    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 getInterceptorService()
    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 logoutEndpointUser(string endpointName, string username='')
         A facade to logout a user with an interactive endpoint.
    any onCLIStart()
    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 them.
    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 setInterceptorService(any interceptorService)
    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

    interceptorService

    property any interceptorService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - interceptorService
    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()


    getInterceptorService

    public string getInterceptorService()


    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

    logoutEndpointUser

    public any logoutEndpointUser(string endpointName, string username='')

    A facade to logout 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. Passing no username should log out all users.

    Parameters:
    endpointName - The name of the endpoint
    username - The username

    onCLIStart

    public any onCLIStart()


    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 them 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

    setInterceptorService

    public any setInterceptorService(any interceptorService)

    Parameters:
    interceptorService

    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