BBjspCommandConfig (Deprecated)

The BBJSP system is deprecated. For new development, use BBxServlet.

Description

In BBj 17.0 and higher, this class provides configuration detail about a BBjspCommand

Creation

BBjAPI > BBjAdmin > BBjJettyServerConfiguration > BBjJettyContextConfiguration > BBjspCommandConfig

The BBjspCommandConfig is created through the following BBjJettyContextConfiguration methods:

Return Value

Method

BBjspCommandConfig

addCommandConfig(string path, string className, string source)

BBjVector

getCommandConfigs()

Methods of BBjspCommandConfig

Return Value

Method

BBjspCommandForward

addForward(string name, string path, boolean redirect)

BBjspCommandForward

addForward(string name, string path, string pipeline, boolean redirect)

void

addParameter(string name, string value)

string

getClassName()

BBjspCommandForward

getCommandForward(string forwardName)

BBjVector

getCommandForwardNames()

string

getInputPage()

string

getParameter(string name)

BBjVector

getParameterNames()

string

getPath()

string

getPipelineName()

string

getSource()

BBjspCommandForward

removeForward(string name)

void

removeParameter(string name)

void

setClassName(string classname)

void

setInputPage(string page)

void

setPath(string path)

void

setPipelineName(string pipeline)

void

setSource(string source)

Example

declare BBjAPI api!
declare BBjAdmin admin!
declare BBjJettyServerConfiguration config!
declare BBjJettyContextConfiguration context!
declare BBjspCommandConfig commandCfg!

api! = BBJAPI()
admin! = api!.getAdmin("admin","admin123")
config! = admin!.getJettyServerConfig()
context! = config!.getRootContextInfo()

commands! = context!.getCommandConfigs()

if (commands!.size()) then
    for i = 0 to commands!.size()-1
        commandCfg! = cast(BBjspCommandConfig,commands!.get(i))

        print commandCfg!.getPath() + " -> " + commandCfg!.getSource() + "::" + commandCfg!.getClassName()
        print " PIPELINE:" + commandCfg!.getPipelineName()

        cfg! = commandCfg!.getCommandForwardNames()
        if (cfg!.size()) then
            for j = 0 to cfg!.size()-1
                declare BBjspCommandForward fwd!
                n$ = cfg!.get(j)
                fwd! = commandCfg!.getCommandForward(n$)
                print " FORWARD:" + fwd!.getName() + " -> " + fwd!.getPath()
            next j
        endif
    next i
endif

See Also