BBjAppServer::unpublish

Description

In BBj 12.0 and higher, this method removes the named BBjApplication from the set of published applications.

Syntax

Return Value

Method

BBjApplication

unpublish(string appName)

Parameters

Variable

Description

appName

The name of the BBjApplication to unpublish.

Return Value

Returns the unpublished BBjApplication.

Remarks

None.

Example

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


rem ' BBjAppServer::unpublish

app$ = "buisample"

admin! = bbjapi().getAdmin("admin","admin123")

appServer! = admin!.getWebAppServer()

appConfig! = appServer!.makeEmptyAppConfig()

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

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/jpg")

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

BBjAPI

BBjAppServer

BBjAppServer::publish

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