Interface BBjAdminAppDeploymentApplication

All Superinterfaces:
BBjAdminCommitPropertyWriter, BBjAdminCommitWriter, BBjAdminPropertyReader, BBjAdminPropertyWriter, Comparable<BBjAdminAppDeploymentApplication>, Remote

public interface BBjAdminAppDeploymentApplication extends BBjAdminCommitPropertyWriter, Comparable<BBjAdminAppDeploymentApplication>
Configuration for a BUI and/or desktop app deployment application on the server.

Do not directly create a BBjAdminAppDeploymentApplication instance from one of its implementation classes. Instead, use the com.basis.api.admin.BBjAdminAppDeploymentConfiguration.createApplication() method class to create a new application or the getRemoteConfiguration() method to gain access to the remote app configurations and then get the app instance from there. See the sample code below for details.

Java Sample

import com.basis.api.admin.BBjAdminFactory;
import com.basis.api.admin.BBjAdminBase;
import com.basis.api.admin.BBjAdminDatabase;
import com.basis.api.admin.BBjAdminAppDeploymentApplication;
import com.basis.api.admin.BBjAdminJRE;
import java.net.InetAddress;
...
BBjAdminBase api = BBjAdminFactory.getBBjAdmin(InetAddress.getByName("myserver"), 2002, true, "admin", "admin123");
BBjAdminAppDeploymentConfiguration config = api.getRemoteConfiguration();

// Create a resource entry for a shortcut icon
BBjAdminAppDeploymentResource resource = config.createResource();
resource.setString(BBjAdminAppDeploymentResource.SOURCE_FILE_NAME, "/path/to/image.png");
config.getResources().add(resource);
config.commit();

// Add a JRE to include for the desktop app (required for desktop apps)
api.getWebAppServer().addJRE("/path/to/jre/mac-jre-installer.tgz", BBjAdminJRE.OS_MAC);
api.getWebAppServer().addJRE("/path/to/jre/windows-jre-installer.tgz", BBjAdminJRE.OS_WINDOWS);
api.getWebAppServer().addJRE("/path/to/jre/linux-jre-installer.tgz", BBjAdminJRE.OS_LINUX);

// Create the application
BBjAdminAppDeploymentApplication newApp = config.createApplication();
newApp.setString(BBjAdminAppDeploymentApplication.NAME, "MyApp");
newApp!.setString(BBjAdminAppDeploymentApplication.PROGRAM, "myapp.bbj");
newApp.setString(BBjAdminAppDeploymentApplication.CONFIG_FILE, "/path/to/config.bbx");
newApp.setString(BBjAdminAppDeploymentApplication.WORKING_DIRECTORY, "/path/to/directory");
newApp.setBoolean(BBjAdminAppDeploymentApplication.EXE_ENABLED, true);
newApp.setBoolean(BBjAdminAppDeploymentApplication.BUI_ENABLED, true);

// Set the JVMs that will be available to the apps (optional as it can use the defaults added above)
newApp.setString(BBjAdminAppDeploymentApplication.MAC_JVM, "mac-jre-installer.tgz");
newApp.setString(BBjAdminAppDeploymentApplication.WINDOWS_JVM, "win-jre-installer.tgz");
newApp.setString(BBjAdminAppDeploymentApplication.LINUX_JVM, "linux-jre-installer.tgz");

// Set the shortcut icon to the resource we created above
newApp.setString(BBjAdminAppDeploymentApplication.SHORTCUT_ICON_RESOURCE_ID, resource.getString(BBjAdminAppDeploymentResource.RESOURCE_ID));
newApp.commit();

BBjAdminList apps = config.getApplications();
for (BBjAdminAppDeploymentApplication app: apps)
{
    System.out.println(app.getString(BBjAdminAppDeploymentApplication.NAME));
    System.out.println(app.getBuiUrl(false));
    System.out.println(app.getExeUrl(BBjAdminAppDeploymentApplication.PLATFORM_MAC, false));
}
...

BBj Sample

use com.basis.api.admin.BBjAdminFactory
use com.basis.api.admin.BBjAdminBase
use com.basis.api.admin.BBjAdminDatabase
use com.basis.api.admin.BBjAdminAppDeploymentApplication
use com.basis.api.admin.BBjAdminAppDeploymentResource
use com.basis.api.admin.BBjAdminJRE
use java.net.InetAddress
...
api! = BBjAdminFactory.getBBjAdmin("admin", "admin123")
config! = api!.getRemoteConfiguration()

REM Create a resource entry for a shortcut icon
resource! = config!.createResource()
resource!.setString(BBjAdminAppDeploymentResource.SOURCE_FILE_NAME, "/path/to/image.png")
config!.getResources().add(resource!)
config!.commit()

REM Add a JRE to include for the desktop app (required for desktop apps)
api!.getWebAppServer().addJRE("/path/to/jre/mac-jre-installer.tgz", BBjAdminJRE.OS_MAC)
api!.getWebAppServer().addJRE("/path/to/jre/windows-jre-installer.tgz", BBjAdminJRE.OS_WINDOWS)
api!.getWebAppServer().addJRE("/path/to/jre/linux-jre-installer.tgz", BBjAdminJRE.OS_LINUX)

REM Create the application
newApp! = config!.createApplication()
newApp!.setString(BBjAdminAppDeploymentApplication.NAME, "MyApp")
newApp!.setString(BBjAdminAppDeploymentApplication.PROGRAM, "myapp.bbj")
newApp!.setString(BBjAdminAppDeploymentApplication.CONFIG_FILE, "/path/to/config.bbx")
newApp!.setString(BBjAdminAppDeploymentApplication.WORKING_DIRECTORY, "/path/to/directory")
newApp!.setBoolean(BBjAdminAppDeploymentApplication.EXE_ENABLED, 1)
newApp!.setBoolean(BBjAdminAppDeploymentApplication.BUI_ENABLED, 1)

REM Set the JVMs that will be available to the apps (optional as it can use the defaults added above)
newApp!.setString(BBjAdminAppDeploymentApplication.MAC_JVM, "mac-jre-installer.tgz")
newApp!.setString(BBjAdminAppDeploymentApplication.WINDOWS_JVM, "win-jre-installer.tgz")
newApp!.setString(BBjAdminAppDeploymentApplication.LINUX_JVM, "linux-jre-installer.tgz")

REM Set the shortcut icon to the resource we created above
newApp!.setString(BBjAdminAppDeploymentApplication.SHORTCUT_ICON_RESOURCE_ID, resource!.getString(BBjAdminAppDeploymentResource.RESOURCE_ID))
newApp!.commit()

apps! = config!.getApplications()
for i = 0 to apps!.size() - 1
    app! = apps!.get(i)
    print app!.getString(BBjAdminAppDeploymentApplication.NAME)
    print app!.getBuiUrl(false)
    print app!.getExeUrl(BBjAdminAppDeploymentApplication.PLATFORM_MAC, false)
next i
...
Since:
19.20