BBjspCommandForward


Creation Path

BBjAPI| +--BBjAdmin| +--BBjJettyServerConfiguration| +--BBjJettyContextConfiguration| +--BBjspCommandConfig| +--BBjspCommandForward

 

Description

In BBJ 16.20 and higher, this class provides information about the redirects in a BBjspCommand.

Creation

The BBjspCommandForward is created through the following BBjspCommandConfig method:

Return Value

Method

BBjspCommandForward

getCommandForward(string forwardName)

Methods of BBjspCommandForward

Return Value

Method

string

getName()

string

getPath()

string

getPipelineName()

boolean

getRedirect()

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