ColdBox Platform Version 2.6.3

coldbox.system.plugins
Class cfcViewer

WEB-INF.cftags.component
        extended by coldbox.system.frameworkSupertype
            extended by coldbox.system.plugin
                extended by coldbox.system.plugins.cfcViewer

public class cfcViewer
extends plugin

This components provides functionality to obtain information about cfcs via introspection.


Constructor Summary
init(any controller)
 
Method Summary
 string buildLink(string package)
          Build a link for a package name
private array buildPackages(Array aPackages, string directory, string parentName)
          Create an array of package names
 string buildRootLink()
          Build a link for a root name
private string getAbsolutePath(string targetPath)
          Get an absolute path
 any getCFCMetaData(string cfcName)
          returns a structure with information about the given component. This structure contains information about returntype, methods, parameters, etc.
 string getDirpath()
          Get the dirpath of where the cfc's reside. This is expanded.
 string getLinkBaseURL()
 string getRenderingTemplate()
          Get rendering template to use
 string getStyleSheet()
          Get the stylesheet to use when rendering the documentation.
 array getaCFC()
          returns an array with the names of all components within the current directory
 array getaPacks()
          Get aPacks
 string getlinkString()
          Get linkString
 string getlinkType()
          Get linkType
 string getlstAccessTypes()
          Get lstAccessTypes
 string getrootPath()
          Get rootPath
private array inheritanceRecursion(array tree, struct md)
          Inheritance Recursion
 any renderit()
          Render the content
 void setLinkBaseURL(string LinkBaseURL)
 void setRenderingTemplate(string RenderingTemplate)
          Set the rendering template to use
 void setStyleSheet(string styleSheet)
          Set the stylesheet to use when rendering the documentation
 void setaCFC(array aCFC)
          Set CFCs
 void setaPacks(array aPacks)
          Set aPacks
 void setdirpath(string dirpath)
          Set the dirpath
 void setlinkString(string linkString)
          Set linkString
 void setlinkType(string linkType)
          Set linkType
 void setlstAccessTypes(string lstAccessTypes)
          Set lstAccessTypes
 void setrootPath(string rootPath)
          Set rootPath
 cfcViewer setup(string dirpath, [string accessTypesFilter=''], [string dirLink], [string jsLink], [string RenderingTemplate], [string LinkBaseURL])
          Use this method to initialize for documentation. You must persist it in your request so you can do renderings and interact with the object.
 
Methods inherited from class coldbox.system.plugin
getPluginDescription, getPluginName, getPluginVersion, getpluginPath, setPluginDescription, setPluginName, setPluginVersion
 
Methods inherited from class coldbox.system.frameworkSupertype
abort, announceInterception, dump, getColdboxOCM, getDatasource, getDebugMode, getHash, getInstance, getInterceptor, getMailSettings, getModel, getMyPlugin, getPlugin, getResource, getSetting, getSettingStructure, getSettingsBean, getcontroller, getfwLocale, htmlhead, include, includeUDF, locateDirectoryPath, locateFilePath, persistVariables, populateModel, relocate, renderExternalView, renderView, rethrowit, runEvent, setDebugMode, setNextEvent, setNextRoute, setSetting, setcontroller, settingExists, throw
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any controller)

Method Detail

buildLink

public string buildLink(string package)
Build a link for a package name

Parameters:
package -

buildPackages

private array buildPackages(Array aPackages, string directory, string parentName)
Create an array of package names

Parameters:
aPackages - The array to append to
directory - The target directory to recurse
parentName - The parent package

buildRootLink

public string buildRootLink()
Build a link for a root name


getAbsolutePath

private string getAbsolutePath(string targetPath)
Get an absolute path

Parameters:
targetPath -

getCFCMetaData

public any getCFCMetaData(string cfcName)
returns a structure with information about the given component. This structure contains information about returntype, methods, parameters, etc.

Parameters:
cfcName - The name of the cfc

getDirpath

public string getDirpath()
Get the dirpath of where the cfc's reside. This is expanded.


getLinkBaseURL

public string getLinkBaseURL()


getRenderingTemplate

public string getRenderingTemplate()
Get rendering template to use


getStyleSheet

public string getStyleSheet()
Get the stylesheet to use when rendering the documentation.


getaCFC

public array getaCFC()
returns an array with the names of all components within the current directory


getaPacks

public array getaPacks()
Get aPacks


getlinkString

public string getlinkString()
Get linkString


getlinkType

public string getlinkType()
Get linkType


getlstAccessTypes

public string getlstAccessTypes()
Get lstAccessTypes


getrootPath

public string getrootPath()
Get rootPath


inheritanceRecursion

private array inheritanceRecursion(array tree, struct md)
Inheritance Recursion

Parameters:
tree - The array
md - The extends md

renderit

public any renderit()
Render the content


setLinkBaseURL

public void setLinkBaseURL(string LinkBaseURL)

Parameters:
LinkBaseURL

setRenderingTemplate

public void setRenderingTemplate(string RenderingTemplate)
Set the rendering template to use

Parameters:
RenderingTemplate

setStyleSheet

public void setStyleSheet(string styleSheet)
Set the stylesheet to use when rendering the documentation

Parameters:
styleSheet

setaCFC

public void setaCFC(array aCFC)
Set CFCs

Parameters:
aCFC

setaPacks

public void setaPacks(array aPacks)
Set aPacks

Parameters:
aPacks

setdirpath

public void setdirpath(string dirpath)
Set the dirpath

Parameters:
dirpath

setlinkString

public void setlinkString(string linkString)
Set linkString

Parameters:
linkString

setlinkType

public void setlinkType(string linkType)
Set linkType

Parameters:
linkType

setlstAccessTypes

public void setlstAccessTypes(string lstAccessTypes)
Set lstAccessTypes

Parameters:
lstAccessTypes

setrootPath

public void setrootPath(string rootPath)
Set rootPath

Parameters:
rootPath

setup

public cfcViewer setup(string dirpath, [string accessTypesFilter=''], [string dirLink], [string jsLink], [string RenderingTemplate], [string LinkBaseURL])
Use this method to initialize for documentation. You must persist it in your request so you can do renderings and interact with the object.

Parameters:
dirpath - The directory path to which is the root of what you want the cfcviewer to report on. This must be a valid instantiation path: ex: /coldbox/system
accessTypesFilter - Use this argument to only display methods with the access types given. If empty, displays all methods (public, private, remote, package).
dirLink - If you pass this. it will create a linkable directory or package structure according to the link provided and append an internal package variable.
jsLink - If you pass this, it will create a linkable package according to the js provided. Also, place a @package@ on your link, so it can correctly identify where to place the url parameter for the package choosen
RenderingTemplate - Override the rendering template with yours
LinkBaseURL - The base url to use for anchors

ColdBox Platform Version 2.6.3