contentbox.model.ui

Class WidgetService

railo-context.Component
        extended by contentbox.model.ui.WidgetService
Class Attributes:
  • threadsafe
  •  
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  

    ContentBox - A Modular Content Platform Copyright 2012 by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com Apache License, Version 2.0 Copyright Since [2012] [Luis Majano and Ortus Solutions,Corp] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

    Property Summary
    type property default serializable required
    any coldbox


    • inject = coldbox
    true false
    any layoutService


    • inject = LayoutService@cb
    true false
    any log


    • inject = logbox:logger:{this}
    true false
    any moduleService


    • inject = ModuleService@cb
    true false
    any moduleSettings


    • inject = coldbox:setting:modules
    true false
    any settingService


    • inject = id:settingService@cb
    true false
    string widgetsIconsIncludePath


    true false
    string widgetsIconsPath


    true false
    string widgetsPath


    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    WidgetService createNewWidget(Widget widget)
         Create new core widget.
    string getColdbox()
    string getLayoutService()
    string getLog()
    string getModuleService()
    string getModuleSettings()
    string getSettingService()
    any getWidget(any name, string type='core')
         Get a widget by name.
    query getWidgetCategories()
         Get unique, sorted widget categories from main widget query.
    string getWidgetCategory(any name, string type='core')
         Get a widget category.
    string getWidgetCode(string name, string type)
         Get widget code.
    string getWidgetFilePath(string name, string type)
         Gets widget file path by name and type.
    string getWidgetIcon(any name, string type='core')
         Get a widget icon representation.
    array getWidgetIcons()
         Get a list of widget icons available in the system.
    any getWidgetRenderArgs([any udf], [any widget], [any type])
    query getWidgets()
         Get installed widgets.
    string getWidgetsIconsIncludePath()
    string getWidgetsIconsPath()
    string getWidgetsList()
         Get installed widgets as a list of names.
    string getWidgetsPath()
    any onDIComplete()
         onDIComplete.
    boolean removeWidget(any widgetFile)
         Remove widget.
    string ripExtension(any filename)
    WidgetService saveWidgetCode(string name, string code, string type)
         Save widget code.
    any setColdbox(any coldbox)
    any setLayoutService(any layoutService)
    any setLog(any log)
    any setModuleService(any moduleService)
    any setModuleSettings(any moduleSettings)
    any setSettingService(any settingService)
    any setWidgetsIconsIncludePath(string widgetsIconsIncludePath)
    any setWidgetsIconsPath(string widgetsIconsPath)
    any setWidgetsPath(string widgetsPath)
    struct uploadWidget(any fileField)
         Upload Widget.
     
    Methods inherited from class railo-context.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    coldbox

    property any coldbox

    Attributes:
    required - false
    inject - coldbox
    serializable - true

    layoutService

    property any layoutService

    Attributes:
    required - false
    inject - LayoutService@cb
    serializable - true

    log

    property any log

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

    moduleService

    property any moduleService

    Attributes:
    required - false
    inject - ModuleService@cb
    serializable - true

    moduleSettings

    property any moduleSettings

    Attributes:
    required - false
    inject - coldbox:setting:modules
    serializable - true

    settingService

    property any settingService

    Attributes:
    required - false
    inject - id:settingService@cb
    serializable - true

    widgetsIconsIncludePath

    property string widgetsIconsIncludePath

    Attributes:
    required - false
    serializable - true

    widgetsIconsPath

    property string widgetsIconsPath

    Attributes:
    required - false
    serializable - true

    widgetsPath

    property string widgetsPath

    Attributes:
    required - false
    serializable - true

    Method Detail

    createNewWidget

    public WidgetService createNewWidget(Widget widget)

    Create new core widget

    Parameters:
    widget

    getColdbox

    public string getColdbox()


    getLayoutService

    public string getLayoutService()


    getLog

    public string getLog()


    getModuleService

    public string getModuleService()


    getModuleSettings

    public string getModuleSettings()


    getSettingService

    public string getSettingService()


    getWidget

    public any getWidget(any name, string type='core')

    Get a widget by name

    Parameters:
    name - true
    type - This can be one of the following: core, layout, module

    getWidgetCategories

    public query getWidgetCategories()

    Get unique, sorted widget categories from main widget query returns Query


    getWidgetCategory

    public string getWidgetCategory(any name, string type='core')

    Get a widget category

    Parameters:
    name - The name of the widget
    type - This can be one of the following: core, layout, module

    getWidgetCode

    public string getWidgetCode(string name, string type)

    Get widget code return String

    Parameters:
    name - {String}
    type - {String}

    getWidgetFilePath

    public string getWidgetFilePath(string name, string type)

    Gets widget file path by name and type return String

    Parameters:
    name - {String}
    type - {String}

    getWidgetIcon

    public string getWidgetIcon(any name, string type='core')

    Get a widget icon representation

    Parameters:
    name - The name of the widget
    type - This can be one of the following: core, layout, module

    getWidgetIcons

    public array getWidgetIcons()

    Get a list of widget icons available in the system


    getWidgetRenderArgs

    public any getWidgetRenderArgs([any udf], [any widget], [any type])

    Parameters:
    udf
    widget
    type

    getWidgets

    public query getWidgets()

    Get installed widgets


    getWidgetsIconsIncludePath

    public string getWidgetsIconsIncludePath()


    getWidgetsIconsPath

    public string getWidgetsIconsPath()


    getWidgetsList

    public string getWidgetsList()

    Get installed widgets as a list of names


    getWidgetsPath

    public string getWidgetsPath()


    onDIComplete

    public any onDIComplete()

    onDIComplete


    removeWidget

    public boolean removeWidget(any widgetFile)

    Remove widget

    Parameters:
    widgetFile

    ripExtension

    public string ripExtension(any filename)

    Parameters:
    filename

    saveWidgetCode

    public WidgetService saveWidgetCode(string name, string code, string type)

    Save widget code return WidgetService

    Parameters:
    name - {String}
    code - {String}
    type - {String}

    setColdbox

    public any setColdbox(any coldbox)

    Parameters:
    coldbox

    setLayoutService

    public any setLayoutService(any layoutService)

    Parameters:
    layoutService

    setLog

    public any setLog(any log)

    Parameters:
    log

    setModuleService

    public any setModuleService(any moduleService)

    Parameters:
    moduleService

    setModuleSettings

    public any setModuleSettings(any moduleSettings)

    Parameters:
    moduleSettings

    setSettingService

    public any setSettingService(any settingService)

    Parameters:
    settingService

    setWidgetsIconsIncludePath

    public any setWidgetsIconsIncludePath(string widgetsIconsIncludePath)

    Parameters:
    widgetsIconsIncludePath

    setWidgetsIconsPath

    public any setWidgetsIconsPath(string widgetsIconsPath)

    Parameters:
    widgetsIconsPath

    setWidgetsPath

    public any setWidgetsPath(string widgetsPath)

    Parameters:
    widgetsPath

    uploadWidget

    public struct uploadWidget(any fileField)

    Upload Widget

    Parameters:
    fileField