logbox.system.core.util

Class Util

lucee.Component
    extended by logbox.system.core.util.Util

The main ColdBox utility library filled with lots of nice goodies.

Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Method Summary
    Util addMapping(string name, string path)
         Add a CFML Mapping.
    struct arrayToStruct(array in)
         Convert an array to struct argument notation.
    void convertToColdBox(any family, any target)
         Decorate an object as a ColdBox Family object.
    string fileLastModified(any filename)
         Get the last modified date of a file.
    string getAbsolutePath(any path)
         Turn any system path, either relative or absolute, into a fully qualified one.
    any getEnv(string key, [any defaultValue])
         Retrieve a Java System environment value by name.
    any getInheritedMetaData(any component, [any stopRecursions='[runtime expression]'], [any md='[runtime expression]'])
         Returns a single-level metadata struct that includes all items inhereited from extending classes.
    any getJavaSystem()
         Retrieve an instance of Java System.
    any<MixerUtil> getMixerUtil()
         Get the mixer utility.
    any getSystemProperty(string key, [any defaultValue])
         Retrieve a Java System property value by name.
    any getSystemSetting(string key, [any defaultValue])
         Retrieve a Java System property or env value by name.
    boolean inThread()
         Check if you are in cfthread or not for any CFML Engine.
    boolean isFamilyType(any family, any target)
         Checks if an object is of the passed in family type.
    any placeHolderReplacer(any str, any settings)
         PlaceHolder Replacer for strings containing ${} patterns.
    string ripExtension(any filename)
         Rip the extension of a filename.
    private any stopClassRecursion(any classname, any stopRecursions)
         Should we stop recursion or not due to class name found: Boolean.
     
    Methods inherited from class lucee.Component
    None

    Method Detail

    addMapping

    public Util addMapping(string name, string path)

    Add a CFML Mapping

    Parameters:
    name - The name of the mapping
    path - The path to the mapping

    arrayToStruct

    public struct arrayToStruct(array in)

    Convert an array to struct argument notation

    Parameters:
    in - The array to convert

    convertToColdBox

    public void convertToColdBox(any family, any target)

    Decorate an object as a ColdBox Family object

    Parameters:
    family - The family to covert it to: handler, interceptor
    target - The target object

    fileLastModified

    public string fileLastModified(any filename)

    Get the last modified date of a file

    Parameters:
    filename

    getAbsolutePath

    public string getAbsolutePath(any path)

    Turn any system path, either relative or absolute, into a fully qualified one

    Parameters:
    path

    getEnv

    public any getEnv(string key, [any defaultValue])

    Retrieve a Java System environment value by name.

    Parameters:
    key - The name of the environment variable to look up.
    defaultValue - The default value to use if the key does not exist in the env

    getInheritedMetaData

    public any getInheritedMetaData(any component, [any stopRecursions='[runtime expression]'], [any md='[runtime expression]'])

    Returns a single-level metadata struct that includes all items inhereited from extending classes.

    Parameters:
    component - A component instance, or the path to one
    stopRecursions - An array of classes to stop recursion
    md - A structure containing a copy of the metadata for this level of recursion.

    getJavaSystem

    public any getJavaSystem()

    Retrieve an instance of Java System


    getMixerUtil

    public any<MixerUtil> getMixerUtil()

    Get the mixer utility


    getSystemProperty

    public any getSystemProperty(string key, [any defaultValue])

    Retrieve a Java System property value by name.

    Parameters:
    key - The name of the java property to look up.
    defaultValue - The default value to use if the key does not exist in the system properties

    getSystemSetting

    public any getSystemSetting(string key, [any defaultValue])

    Retrieve a Java System property or env value by name. It looks at properties first then environment variables

    Parameters:
    key - The name of the setting to look up.
    defaultValue - The default value to use if the key does not exist in the system properties or the env

    inThread

    public boolean inThread()

    Check if you are in cfthread or not for any CFML Engine


    isFamilyType

    public boolean isFamilyType(any family, any target)

    Checks if an object is of the passed in family type

    Parameters:
    family - The family to covert it to: handler, interceptor
    target - The target object

    placeHolderReplacer

    public any placeHolderReplacer(any str, any settings)

    PlaceHolder Replacer for strings containing ${} patterns

    Parameters:
    str - The string variable to look for replacements
    settings - The structure of settings to use in replacing

    ripExtension

    public string ripExtension(any filename)

    Rip the extension of a filename.

    Parameters:
    filename

    stopClassRecursion

    private any stopClassRecursion(any classname, any stopRecursions)

    Should we stop recursion or not due to class name found: Boolean

    Parameters:
    classname - The class name to check
    stopRecursions - An array of classes to stop processing at