contentbox.model.updates

Class UpdateService

railo-context.Component
        extended by contentbox.model.updates.UpdateService
Class Attributes:
  • threadsafe
  •  
  • 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 appPath


    • inject = coldbox:setting:ApplicationPath
    true false
    any moduleConfig


    • inject = coldbox:moduleConfig:contentbox
    true false
    any patchesLocation


    true false
    any wirebox


    • inject = wirebox
    true false
    any zipUtil


    • inject = coldbox:plugin:Zip
    true false
    Constructor Summary
    init()
          CONSTRUCTOR ********************************************.
    Method Summary
    UpdateService activateORMUpdate()
         Activate ORM Update.
    struct applyUpdateFromUpload(any fileField)
    struct applyUpdateFromURL(string downloadURL)
         PUBLIC ********************************************.
    private boolean applyUpdateOnDisk(any log)
         PRIVATE ********************************************.
    IUpdate buildUpdater()
    UpdateService deactivateORMUpdate()
         Deactivate ORM Update.
    boolean downloadPatch(string downloadURL, any log)
    boolean extractPatch(string filename, any log)
    string getAppPath()
    string getModuleConfig()
    string getPatchesLocation()
    string getWirebox()
    string getZipUtil()
    any isNewVersion([any cVersion], [any nVersion])
         Check for version updates.
    void onDIComplete()
         onDIComplete startup the layouting services.
    private struct parseSemanticVersion(string version)
         Parse the semantic version.
    any processRemovals(any path, any log)
         Process patch update removals if any.
    any processUpdates(any path, any log)
         Process updated files.
    any setAppPath(any appPath)
    any setModuleConfig(any moduleConfig)
    any setPatchesLocation(any patchesLocation)
    any setWirebox(any wirebox)
    any setZipUtil(any zipUtil)
    struct uploadUpdate(any fileField)
         Upload an update file to disk.
     
    Methods inherited from class railo-context.Component
    None

    Constructor Detail

    init

    public init()

    CONSTRUCTOR ********************************************


    Property Detail

    appPath

    property any appPath

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

    moduleConfig

    property any moduleConfig

    Attributes:
    required - false
    inject - coldbox:moduleConfig:contentbox
    serializable - true

    patchesLocation

    property any patchesLocation

    Attributes:
    required - false
    serializable - true

    wirebox

    property any wirebox

    Attributes:
    required - false
    inject - wirebox
    serializable - true

    zipUtil

    property any zipUtil

    Attributes:
    required - false
    inject - coldbox:plugin:Zip
    serializable - true

    Method Detail

    activateORMUpdate

    public UpdateService activateORMUpdate()

    Activate ORM Update


    applyUpdateFromUpload

    public struct applyUpdateFromUpload(any fileField)

    Parameters:
    fileField

    applyUpdateFromURL

    public struct applyUpdateFromURL(string downloadURL)

    PUBLIC ********************************************

    Parameters:
    downloadURL

    applyUpdateOnDisk

    private boolean applyUpdateOnDisk(any log)

    PRIVATE ********************************************

    Parameters:
    log

    buildUpdater

    public IUpdate buildUpdater()


    deactivateORMUpdate

    public UpdateService deactivateORMUpdate()

    Deactivate ORM Update


    downloadPatch

    public boolean downloadPatch(string downloadURL, any log)

    Parameters:
    downloadURL
    log

    extractPatch

    public boolean extractPatch(string filename, any log)

    Parameters:
    filename
    log

    getAppPath

    public string getAppPath()


    getModuleConfig

    public string getModuleConfig()


    getPatchesLocation

    public string getPatchesLocation()


    getWirebox

    public string getWirebox()


    getZipUtil

    public string getZipUtil()


    isNewVersion

    public any isNewVersion([any cVersion], [any nVersion])

    Check for version updates cVersion.hint The current version of the system nVersion.hint The newer version received

    Parameters:
    cVersion
    nVersion

    onDIComplete

    public void onDIComplete()

    onDIComplete startup the layouting services


    parseSemanticVersion

    private struct parseSemanticVersion(string version)

    Parse the semantic version

    Parameters:
    version
    Returns:
    struct:{major,minor,revision,beid,buildid}

    processRemovals

    public any processRemovals(any path, any log)

    Process patch update removals if any

    Parameters:
    path
    log

    processUpdates

    public any processUpdates(any path, any log)

    Process updated files

    Parameters:
    path
    log

    setAppPath

    public any setAppPath(any appPath)

    Parameters:
    appPath

    setModuleConfig

    public any setModuleConfig(any moduleConfig)

    Parameters:
    moduleConfig

    setPatchesLocation

    public any setPatchesLocation(any patchesLocation)

    Parameters:
    patchesLocation

    setWirebox

    public any setWirebox(any wirebox)

    Parameters:
    wirebox

    setZipUtil

    public any setZipUtil(any zipUtil)

    Parameters:
    zipUtil

    uploadUpdate

    public struct uploadUpdate(any fileField)

    Upload an update file to disk

    Parameters:
    fileField