ContentBox Core API 1.6.0

contentbox.model.ui
Class WidgetService

WEB-INF.cftags.component
        extended by contentbox.model.ui.WidgetService

public class WidgetService
extends WEB-INF.cftags.component

******************************************************************************* ContentBox - A Modular Content Platform Copyright 2012 by Luis Majano and Ortus Solutions, Corp www.gocontentbox.org | www.luismajano.com | 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 & Description Default Serializable Required
 any coldbox


Attributes:
  • inject = coldbox
true false
 any layoutService


Attributes:
  • inject = LayoutService@cb
true false
 any log


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


Attributes:
  • inject = ModuleService@cb
true false
 any moduleSettings


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


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


Attributes:
true false
 string widgetsIconsPath


Attributes:
true false
 string widgetsPath


Attributes:
true false
 
Constructor Summary
init()
 
Method Summary
 any GETCOLDBOX()
          get:
 any GETLAYOUTSERVICE()
          get:
 any GETLOG()
          get:
 any GETMODULESERVICE()
          get:
 any GETMODULESETTINGS()
          get:
 any GETSETTINGSERVICE()
          get:
 string GETWIDGETSICONSINCLUDEPATH()
          get:
 string GETWIDGETSICONSPATH()
          get:
 string GETWIDGETSPATH()
          get:
 WidgetService SETCOLDBOX(any coldbox)
          set:
 WidgetService SETLAYOUTSERVICE(any layoutService)
          set:
 WidgetService SETLOG(any log)
          set:
 WidgetService SETMODULESERVICE(any moduleService)
          set:
 WidgetService SETMODULESETTINGS(any moduleSettings)
          set:
 WidgetService SETSETTINGSERVICE(any settingService)
          set:
 WidgetService SETWIDGETSICONSINCLUDEPATH(string widgetsIconsIncludePath)
          set:
 WidgetService SETWIDGETSICONSPATH(string widgetsIconsPath)
          set:
 WidgetService SETWIDGETSPATH(string widgetsPath)
          set:
 WidgetService createNewWidget(Widget widget)
          Create new core widget
 any getWidget(any name, string type='core')
          Get a widget by name
 query getWidgetCategories()
          Get unique, sorted widget categories from main widget query returns Query
 string getWidgetCategory(any name, string type='core')
 string getWidgetCode(string name, string type)
          Get widget code return String
 string getWidgetFilePath(string name, string type)
          Gets widget file path by name and type return String
 string getWidgetIcon(any name, string type='core')
 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 getWidgetsList()
          Get installed widgets as a list of names
 any onDIComplete()
          onDIComplete
 boolean removeWidget(any widgetFile)
          Remove widget
 string ripExtension(any filename)
 WidgetService saveWidgetCode(string name, string code, string type)
          Save widget code return WidgetService
 struct uploadWidget(any fileField)
          Upload Widget
 
Methods inherited from class WEB-INF.cftags.component
None
 

Constructor Detail

init

public init()

Property Detail

coldbox

any coldbox

Attributes:
inject - coldbox
required - false
serializable - true
default -

layoutService

any layoutService

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

log

any log

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

moduleService

any moduleService

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

moduleSettings

any moduleSettings

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

settingService

any settingService

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

widgetsIconsIncludePath

string widgetsIconsIncludePath

Attributes:
default -
serializable - true
required - false

widgetsIconsPath

string widgetsIconsPath

Attributes:
default -
serializable - true
required - false

widgetsPath

string widgetsPath

Attributes:
default -
serializable - true
required - false

Method Detail

GETCOLDBOX

public any GETCOLDBOX()
get:


GETLAYOUTSERVICE

public any GETLAYOUTSERVICE()
get:


GETLOG

public any GETLOG()
get:


GETMODULESERVICE

public any GETMODULESERVICE()
get:


GETMODULESETTINGS

public any GETMODULESETTINGS()
get:


GETSETTINGSERVICE

public any GETSETTINGSERVICE()
get:


GETWIDGETSICONSINCLUDEPATH

public string GETWIDGETSICONSINCLUDEPATH()
get:


GETWIDGETSICONSPATH

public string GETWIDGETSICONSPATH()
get:


GETWIDGETSPATH

public string GETWIDGETSPATH()
get:


SETCOLDBOX

public WidgetService SETCOLDBOX(any coldbox)
set:

Parameters:
coldbox

SETLAYOUTSERVICE

public WidgetService SETLAYOUTSERVICE(any layoutService)
set:

Parameters:
layoutService

SETLOG

public WidgetService SETLOG(any log)
set:

Parameters:
log

SETMODULESERVICE

public WidgetService SETMODULESERVICE(any moduleService)
set:

Parameters:
moduleService

SETMODULESETTINGS

public WidgetService SETMODULESETTINGS(any moduleSettings)
set:

Parameters:
moduleSettings

SETSETTINGSERVICE

public WidgetService SETSETTINGSERVICE(any settingService)
set:

Parameters:
settingService

SETWIDGETSICONSINCLUDEPATH

public WidgetService SETWIDGETSICONSINCLUDEPATH(string widgetsIconsIncludePath)
set:

Parameters:
widgetsIconsIncludePath

SETWIDGETSICONSPATH

public WidgetService SETWIDGETSICONSPATH(string widgetsIconsPath)
set:

Parameters:
widgetsIconsPath

SETWIDGETSPATH

public WidgetService SETWIDGETSPATH(string widgetsPath)
set:

Parameters:
widgetsPath

createNewWidget

public WidgetService createNewWidget(Widget widget)
Create new core widget

Parameters:
widget

getWidget

public any getWidget(any name, string type='core')
Get a widget by name

Parameters:
name
type

getWidgetCategories

public query getWidgetCategories()
Get unique, sorted widget categories from main widget query returns Query


getWidgetCategory

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

Parameters:
name
type

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')

Parameters:
name
type

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


getWidgetsList

public string getWidgetsList()
Get installed widgets as a list of names


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}

uploadWidget

public struct uploadWidget(any fileField)
Upload Widget

Parameters:
fileField

ContentBox Core API 1.6.0