BBjAppConfig::buildApplication
Description
In BBj 12.0 and higher, this method returns a BBjApplication object with the values specified in this BBjAppConfig. This next step would normally be to publish the BBjApplication to the BBjAppServer.
Syntax
Return Value |
Method |
---|---|
buildApplication(string name) |
Parameters
Variable |
Description |
---|---|
name |
The name of the application to be published. |
Return Values
Returns a published BBjApplication with the values from this BBjAppConfig.
Remarks
None.
Example
Click here to download a zip file containing the required files to run this sample
rem ' BBjAppConfig::buildApplication 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() 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 "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$) iterator! = appServer!.getStaticResources().iterator() while iterator!.hasNext() resource! = iterator!.next() if resource!.getSourceFileName()<>filename$ then continue if resource!.getMimeType()<>mimetype$ then continue resource!.setSourceFileName(filename$) return resource! wend return appServer!.addStaticResource(filename$,mimetype$) fnend |
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.