contentbox.model.system

Class SettingService

railo-context.Component
        extended by coldbox.system.orm.hibernate.BaseORMService
            extended by coldbox.system.orm.hibernate.VirtualEntityService
                extended by contentbox.model.system.SettingService
Class Attributes:
  • 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. Setting Service for contentbox

    Property Summary
    type property default serializable required
    any appMapping


    • inject = coldbox:setting:appMapping
    true false
    any cache


    • inject = cachebox:default
    true false
    any moduleSettings


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


    • inject = coldbox:requestService
    true false
    string settingsCacheKey


    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    any activateCB()
         Mark cb as ready to serve.
    struct buildFileBrowserSettings()
         Build file browser settings structure.
    any bulkSave([struct memento])
         Bulk saving of options using a memento structure of options.
    boolean deleteDSNCreator()
         Delete the dsn creator module.
    boolean deleteInstaller()
         Delete the installer module.
    any flushSettingsCache()
         flush settings cache.
    array getAllForExport()
         Get all data prepared for export.
    any getAllSettings([any asStruct='false'])
         Get all settings.
    string getAppMapping()
    string getCache()
    string getModuleSettings()
    string getRequestService()
    any getSetting(any name, [any defaultValue])
         Get a setting.
    string getSettingsCacheKey()
    string importFromData(any importData, [boolean override='false'], [any importLog])
         Import data from an array of structures of settings.
    string importFromFile(any importFile, [boolean override='false'])
         Import data from a ContentBox JSON file.
    boolean isCBReady()
         Check if contentbox has been installed by checking if there are no settings and no cb_active ONLY.
    struct isInstallationPresent()
         Check if the installer and dsn creator modules are present.
    struct search([any search=''], [any max='0'], [any offset='0'], [any sortOrder='name asc'])
         setting search returns struct with keys [settings,count].
    any setAppMapping(any appMapping)
    any setCache(any cache)
    any setModuleSettings(any moduleSettings)
    any setRequestService(any requestService)
    any setSettingsCacheKey(string settingsCacheKey)
     
    Methods inherited from class coldbox.system.orm.hibernate.VirtualEntityService
    clear, convertIDValueToJavaType, convertValueToJavaType, count, countWhere, criteriaCount, criteriaQuery, deleteAll, deleteByID, deleteByQuery, deleteWhere, evict, executeQuery, exists, findAllWhere, findWhere, get, getAll, getDatasource, getEntityName, getKey, getPropertyNames, getSessionStatistics, getTableName, isSessionDirty, list, new, newCriteria, onMissingMethod, setDatasource, setEntityName
     
    Methods inherited from class coldbox.system.orm.hibernate.BaseORMService
    $delete, $deleteAll, $deleteByID, $deleteByQuery, $deleteWhere, $save, $saveAll, $transactioned, compileHQLFromDynamicMethod, createCriteriaQuery, createService, delete, evictEntity, evictQueries, findAll, findByExample, findDynamically, findIt, getDefaultAsQuery, getEntityGivenName, getEventHandling, getHQLDynamicCache, getORM, getORMEventHandler, getQueryCacheRegion, getRestrictions, getUseQueryCaching, getUseTransactions, merge, populate, populateFromJSON, populateFromQuery, populateFromXML, populateWithPrefix, refresh, save, saveAll, sessionContains, setDefaultAsQuery, setEventHandling, setHQLDynamicCache, setORM, setORMEventHandler, setQueryCacheRegion, setUseQueryCaching, setUseTransactions
     
    Methods inherited from class railo-context.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    appMapping

    property any appMapping

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

    cache

    property any cache

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

    moduleSettings

    property any moduleSettings

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

    requestService

    property any requestService

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

    settingsCacheKey

    property string settingsCacheKey

    Attributes:
    required - false
    serializable - true

    Method Detail

    activateCB

    public any activateCB()

    Mark cb as ready to serve


    buildFileBrowserSettings

    public struct buildFileBrowserSettings()

    Build file browser settings structure


    bulkSave

    public any bulkSave([struct memento])

    Bulk saving of options using a memento structure of options

    Parameters:
    memento

    deleteDSNCreator

    public boolean deleteDSNCreator()

    Delete the dsn creator module


    deleteInstaller

    public boolean deleteInstaller()

    Delete the installer module


    flushSettingsCache

    public any flushSettingsCache()

    flush settings cache


    getAllForExport

    public array getAllForExport()

    Get all data prepared for export


    getAllSettings

    public any getAllSettings([any asStruct='false'])

    Get all settings

    Parameters:
    asStruct

    getAppMapping

    public string getAppMapping()


    getCache

    public string getCache()


    getModuleSettings

    public string getModuleSettings()


    getRequestService

    public string getRequestService()


    getSetting

    public any getSetting(any name, [any defaultValue])

    Get a setting

    Parameters:
    name
    defaultValue

    getSettingsCacheKey

    public string getSettingsCacheKey()


    importFromData

    public string importFromData(any importData, [boolean override='false'], [any importLog])

    Import data from an array of structures of settings

    Parameters:
    importData
    override
    importLog

    importFromFile

    public string importFromFile(any importFile, [boolean override='false'])

    Import data from a ContentBox JSON file. Returns the import log

    Parameters:
    importFile
    override

    isCBReady

    public boolean isCBReady()

    Check if contentbox has been installed by checking if there are no settings and no cb_active ONLY


    isInstallationPresent

    public struct isInstallationPresent()

    Check if the installer and dsn creator modules are present


    search

    public struct search([any search=''], [any max='0'], [any offset='0'], [any sortOrder='name asc'])

    setting search returns struct with keys [settings,count]

    Parameters:
    search
    max
    offset
    sortOrder

    setAppMapping

    public any setAppMapping(any appMapping)

    Parameters:
    appMapping

    setCache

    public any setCache(any cache)

    Parameters:
    cache

    setModuleSettings

    public any setModuleSettings(any moduleSettings)

    Parameters:
    moduleSettings

    setRequestService

    public any setRequestService(any requestService)

    Parameters:
    requestService

    setSettingsCacheKey

    public any setSettingsCacheKey(string settingsCacheKey)

    Parameters:
    settingsCacheKey