BBjAppConfig

Description

In BBj 12.00 and higher, a BBjAppConfig object is used to configure a BUI BBjApplication in preparation for publishing it to the BBjAppServer.

Creation

BBjAPI > BBjAdmin > BBjAppServer > BBjAppConfig

The BBjAppConfig object is created through the following BBjAppServer object method:

Return Value

Method

BBjAppConfig

makeEmptyAppConfig()

 

Methods of BBjAppConfig

Return Value

Method

BBjApplication

buildApplication(string name)

void

clearClientPollInterval()

void

clearDevelopmentMode()

void

clearDisallowConsole()

void

clearEndAction()

void

clearErrAction()

void

clearManageBrowserHistory()

void

clearOmitBasisCss()

void

clearSecure()

void

clearSessionTimeout()

void

clearShowBrowserWarning()

void

clearShowClientConfirmationDialog()

BBjResourceUrl

getApplicationIcon()

string

getApplicationUserName()

string

getBBjApplicationName()

string

getClasspathName()

int

getClientPollInterval()

boolean

getDevelopmentMode()

boolean

getDisallowConsole()

BBjBuiCloseAction

getEndAction()

BBjBuiCloseAction

getErrAction()

string

getConfigFile()

string

getInterpreterUser()

BBjResourceUrl

getLoadImage()

boolean

getManageBrowserHistory()

boolean

getOmitBasisCss()

BBjVector

getProgramArguments()

boolean

getManageBrowserHistory()

string

getProgramName()

boolean

getSecure()

int

getSessionTimeout()

boolean

getShowBrowserWarning()

boolean

getShowClientConfirmationDialog()

BBjResourceUrl

getStyleSheet()

string

getTerminal()

string

getWorkingDirectory()

boolean

isBuiEnabled()

boolean isDesktopEnabled()
boolean isDwcEnabled()

boolean

isQuiet()

BBjAppConfig

makeCopy()

void

setApplicationIcon(BBJREsourceUrl url)

void

setApplicationUserName(string username)

void

setBuiEnabled(boolean buiEnabled)

void

setBBjApplicationName(string name)

void

setClasspathName(string classpathName)

void

setClientPollInterval(int interval)

void

setConfigFile(string config)

void setDesktopEnabled(boolean desktopEnabled)

void

setDevelopmentMode(boolean development)

void

setDisallowConsole(boolean disallowConsole)

void setDwcEnabled(boolean DwcEnabled)

void

setEndAction(BBjBuiCloseAction action)

void

setErrAction(BBjBuiCloseAction action)

void

setInterpreterUser(string username)

void

setLoadImage(BBjResourceUrl url)

void

setOmitBasisCss(boolean omitBasisCss)

void

setProgramArguments(BBjVector vector)

void

setProgramName(string program)

void

setQuiet(boolean quiet)

void

setSecure(boolean secure)

void

setSessionTimeout(int timeout)

void

setShowBrowserWarning(boolean show)

void

setShowClientConfirmationDialog(boolean show)

void

setStyleSheet(BBjResourceUrl url)

void

setTerminal(string alias)

void

setWorkingDirectory(string dir)

 

Remarks

None.

Constants

None.

Example

Click here to download a zip file containing the required files to run this sample

rem ' BBjAppConfig: Register a BUI Application

app$ = "buisample"
admin! = bbjapi().getAdmin("admin","admin123")
appServer! = admin!.getWebAppServer()
appConfig! = appServer!.makeEmptyAppConfig()

icon! = fnStaticResource!(dsk("")+dir("")+app$+"icon.jpg","image/jpeg")
appConfig!.setApplicationIcon(icon!)

appConfig!.setApplicationUserName("admin")
appConfig!.setBBjApplicationName("BUI Sample")
appConfig!.setClientPollInterval(50)
appConfig!.setConfigFile(dsk("")+dir("")+"config.bbx")
appConfig!.setInterpreterUser(System.getProperty("user.name"))

image! = fnStaticResource!(dsk("")+dir("")+app$+".jpg","image/jpeg")
appConfig!.setLoadImage(image!)

args! = bbjapi().makeVector()args!.add("xyzzy")
appConfig!.setProgramArguments(args!)

appConfig!.setProgramName(dsk("")+dir("")+app$+".src")
appConfig!.setQuiet(1)
appConfig!.setSessionTimeout(300)
appConfig!.setShowBrowserWarning(0)
appConfig!.setShowClientConfirmationDialog(1)

css! = fnStaticResource!(dsk("")+dir("")+app$+".css","text/css")
appConfig!.setStyleSheet(css!)

appConfig!.setTerminal("T0")
appConfig!.setWorkingDirectory(dsk("")+dir(""))

print "BBjAppConfig ",app$,":"
print "getApplicationIcon: ",appConfig!.getApplicationIcon()
print "getApplicationUserName: ",appConfig!.getApplicationUserName()
print "getBBjApplicationName: ",appConfig!.getBBjApplicationName()

rem 'print "getClasspathName: ",appConfig!.getClasspathName()
rem 'print "getClientPollInterval:",appConfig!.getClientPollInterval()

print "getConfigFile: ",appConfig!.getConfigFile()
print "getInterpreterUser: ",appConfig!.getInterpreterUser()
print "getLoadImage: ",appConfig!.getLoadImage()
print "getProgramName: ",appConfig!.getProgramName()

rem 'print "getProgramArguments: ",appConfig!.getProgramArguments()
rem 'print "getSessionTimeout:",appConfig!.getSessionTimeout()
rem 'print "getShowBrowserWarning: ",appConfig!.getShowBrowserWarning()
rem 'print "getShowClientConfirmationDialog: ",appConfig!.getShowClientConfirmationDialog()

print "getStyleSheet: ",appConfig!.getStyleSheet()
print "getTerminal: ",appConfig!.getTerminal()
print "getWorkingDirectory: ",appConfig!.getWorkingDirectory()

rem 'print "isQuiet: ",appConfig!.isQuiet()

application! = appConfig!.buildApplication(app$)
appServer!.unpublish(app$,err=*next)
appServer!.publish(application!)
print "Published ",app$
stop

def fnStaticResource!(filename$,mimetype$)
    vector! = appServer!.getStaticResources()
    if (vector!.size()) then
        for i = 0 to vector!.size() - 1
            resource! = vector!.get(i)
            if resource!.getSourceFileName()<>filename$ then continue
            if resource!.getMimeType()<>mimetype$ then continue
            return resource!
        next i
    endif
    return appServer!.addStaticResource(filename$,mimetype$)
fnend

See Also

BBjAPI

BBjAPI

BBjAdmin

BBjAppServer

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.