coldbox.system.core.util

Class Util

railo-context.Component
        extended by coldbox.system.core.util.Util
Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  

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

    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 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<MixerUtil> getMixerUtil()
         Get the mixer utility.
    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<Boolean> stopClassRecursion(any classname, any stopRecursions)
         Should we stop recursion or not due to class name found: Boolean.
    void throwInvalidHTTP(any className, any detail, any statusText, any statusCode)
         Throw an invalid HTTP exception.
     
    Methods inherited from class railo-context.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

    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.

    getMixerUtil

    public any<MixerUtil> getMixerUtil()

    Get the mixer utility


    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<Boolean> 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

    throwInvalidHTTP

    public void throwInvalidHTTP(any className, any detail, any statusText, any statusCode)

    Throw an invalid HTTP exception

    Parameters:
    className - The class producing the exception
    detail - The throw detail argument to send out
    statusText - Invalid exception status text
    statusCode - The status code to send out.