Package com.basis.api.admin
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Deprecated.Removed as of release 25.00.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Deprecated.Removed as of release 25.00static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Deprecated.Removed as of release 25.00static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionCalled to build a Desktop App distribution.Returns the list of the program arguments for this application.getBuiUrl
(boolean ssl) Generates and returns a URL for the application that can be used to run the application from a Web browser.Used primarily by GUI applications like the Enterprise Manager to dynamically generate an admin UI.getDwcUrl
(boolean ssl) Generates and returns a URL for the application that can be used to run the application from a Web browser.Generates and returns a URL for the application that can be used to download an executable launcher for the application to be run from a remote desktop.Returns the list of the Java command line arguments for this application.getWebUiUrl
(boolean p_ssl) Generates and returns a URL for the application that can be used to run the application using the WebUI framework.void
setDescriptiveProperties
(BBjAdminList<BBjAdminProperty> p_descriptiveProps) Used primarily by GUI applications like the Enterprise Manager to dynamically generate an admin UI.Methods inherited from interface com.basis.api.admin.BBjAdminCommitPropertyWriter
getChangedProperties, getClearedProperties, getOriginalProperties
Methods inherited from interface com.basis.api.admin.BBjAdminCommitWriter
commit, rollback
Methods inherited from interface com.basis.api.admin.BBjAdminPropertyReader
checkValueEqual, contains, contains, getBoolean, getDouble, getInt, getList, getLong, getProperties, getString, getType, getTypes, getValue
Methods inherited from interface com.basis.api.admin.BBjAdminPropertyWriter
addType, canAddNewProperties, canClear, clear, clearProperties, clearProperty, getReadOnly, hasChanged, isReadOnly, setBoolean, setDouble, setInt, setList, setLong, setProperties, setString, setValue
Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
APPLICATION_USER
- See Also:
-
INTERPRETER_USER
- See Also:
-
APPLICATION_NAME_DASH_A
- See Also:
-
CLASSPATH
- See Also:
-
CLIENT_RESPONSE_TIMEOUT
- See Also:
-
CLIENT_RESPONSE_TIMEOUT_USE_DEFAULT
- See Also:
-
CONFIG_FILE
- See Also:
-
CONTEXT
- See Also:
-
CSS_RESOURCE_ID
- See Also:
-
DEVELOPMENT_MODE
- See Also:
-
DEVELOPMENT_MODE_USE_DEFAULT
- See Also:
-
DISALLOW_CONSOLE
- See Also:
-
DISALLOW_CONSOLE_USE_DEFAULT
- See Also:
-
LOAD_IMAGE_RESOURCE_ID
- See Also:
-
MANAGE_BROWSER_HISTORY
- See Also:
-
MANAGE_BROWSER_HISTORY_USE_DEFAULT
- See Also:
-
NAME
- See Also:
-
OMIT_BASIS_CSS
- See Also:
-
OMIT_BASIS_CSS_USE_DEFAULT
- See Also:
-
PROGRAM
- See Also:
-
QUIET
- See Also:
-
SECURE
- See Also:
-
SECURE_DESKTOP
- See Also:
-
SECURE_USE_DEFAULT
- See Also:
-
SECURE_DESKTOP_USE_DEFAULT
- See Also:
-
SHORTCUT_DESCRIPTION
- See Also:
-
SHORTCUT_ICON_RESOURCE_ID
- See Also:
-
SHORTCUT_NAME
- See Also:
-
SHOW_BROWSER_WARNING
- See Also:
-
SHOW_BROWSER_WARNING_USE_DEFAULT
- See Also:
-
SHOW_CONFIRM_CLOSE_DIALOG
- See Also:
-
SHOW_CONFIRM_CLOSE_DIALOG_USE_DEFAULT
- See Also:
-
TERMINAL
- See Also:
-
DESKTOP_TERMINAL
- See Also:
-
WORKING_DIRECTORY
- See Also:
-
WEBUI_ENABLED
- See Also:
-
EXE_ENABLED
- See Also:
-
BUI_ENABLED
- See Also:
-
DWC_ENABLED
- See Also:
-
REMOTE_HOST
- See Also:
-
REMOTE_PORT
- See Also:
-
REMOTE_HOST_DESKTOP
- See Also:
-
REMOTE_PORT_DESKTOP
- See Also:
-
LOCAL_PORT
- See Also:
-
LOOK_AND_FEEL
- See Also:
-
INF
Deprecated.Removed as of release 25.00. Use STANDALONE_JVM instead.- See Also:
-
STANDALONE_JVM
- See Also:
-
TCPS_PRELOAD
- See Also:
-
TCPS_TIMEOUT
- See Also:
-
TCPS_HEARTBEAT
- See Also:
-
HOST_OVERRIDE
- See Also:
-
PORT_OVERRIDE
- See Also:
-
DEBUG
- See Also:
-
CREATE_SHORTCUT
- See Also:
-
DISPLAY_LOAD_IMAGE
- See Also:
-
DISPLAY_LOAD_TEXT
- See Also:
-
RUN_AFTER_INSTALL
- See Also:
-
DISPLAY_RUN_MESSAGE
- See Also:
-
USE_SOCKET_COMPRESSION
- See Also:
-
PLATFORM_MAC
- See Also:
-
PLATFORM_MAC_AARCH64
- See Also:
-
PLATFORM_WIN32
Deprecated.Removed as of release 25.00- See Also:
-
PLATFORM_WIN64
- See Also:
-
PLATFORM_LINUX
- See Also:
-
MAC_JVM
- See Also:
-
MACOS_AARCH64_JVM
- See Also:
-
WINDOWS_JVM
- See Also:
-
WINDOWS_32_JVM
Deprecated.Removed as of release 25.00- See Also:
-
LINUX_JVM
- See Also:
-
LAST_CHANGED
- See Also:
-
DEMO
- See Also:
-
WEBUI_TERMINAL
- See Also:
-
WEBUI_GOODBYE_URL
- See Also:
-
WEBUI_WELCOME_URL
- See Also:
-
WEBUI_APPLICATION_NAME_DASH_A
- See Also:
-
WEBUI_APPLICATION_USER
- See Also:
-
WEBUI_REMOTE_HOST
- See Also:
-
WEBUI_REMOTE_PORT
- See Also:
-
WEBUI_LOCAL_PORT
- See Also:
-
WEBUI_LOOK_AND_FEEL
- See Also:
-
WEBUI_SECURE
- See Also:
-
WEBUI_SECURE_USE_DEFAULT
- See Also:
-
WEBUI_TCPS_PRELOAD
- See Also:
-
WEBUI_TCPS_TIMEOUT
- See Also:
-
WEBUI_TCPS_HEARTBEAT
- See Also:
-
WEBUI_DEBUG
- See Also:
-
WEBUI_USE_SOCKET_COMPRESSION
- See Also:
-
-
Method Details
-
getArguments
Returns the list of the program arguments for this application. This list of strings is mutable. So, to add/remove program arguments to/from the app configuration, call this method and then call the appropriate add()/remove() method to manipulate the list as needed. Make sure to call the commit() method to save the changes.- Returns:
- list of the program arguments.
- Throws:
BBjAdminException
-
getJavaArguments
Returns the list of the Java command line arguments for this application. NOTE: This only applies to EXE applications.- Returns:
- list of the Java command line arguments.
- Throws:
BBjAdminException
-
getDescriptiveProperties
Used primarily by GUI applications like the Enterprise Manager to dynamically generate an admin UI. To get property values for general purposes, you should call the getXXX() methods.- Returns:
- BBjAdminList containing BBjAdminProperty objects for each available property.
- Throws:
BBjAdminException
-
getBuiUrl
Generates and returns a URL for the application that can be used to run the application from a Web browser. It uses the name in combination with the host and port information from the Jetty server. This method returns null if the BUI_ENABLED property is set to false.- Returns:
- Application URL.
- Throws:
BBjAdminException
-
getDwcUrl
Generates and returns a URL for the application that can be used to run the application from a Web browser. It uses the name in combination with the host and port information from the Jetty server. This method returns null if the DWC_ENABLED property is set to false.- Returns:
- Application URL.
- Throws:
BBjAdminException
-
getExeUrl
Generates and returns a URL for the application that can be used to download an executable launcher for the application to be run from a remote desktop. It uses the name in combination with the host and port information from the Jetty server. This method returns null if the EXE_ENABLED property is set to false.- Parameters:
platform
- One of the following platform constants: PLATFORM_MAC, PLATFORM_WIN64, PLATFORM_LINUXssl
- True for an SSL URL- Returns:
- Application URL.
- Throws:
BBjAdminException
-
getWebUiUrl
Generates and returns a URL for the application that can be used to run the application using the WebUI framework. This method returns null if the WEBUI_ENABLED property is set to false.- Parameters:
ssl
- True for an SSL URL- Returns:
- Application URL.
- Throws:
BBjAdminException
-
setDescriptiveProperties
void setDescriptiveProperties(BBjAdminList<BBjAdminProperty> p_descriptiveProps) throws BBjAdminException Used primarily by GUI applications like the Enterprise Manager to dynamically generate an admin UI. To set property values for general purposes, you should call the setXXX() methods.- Throws:
BBjAdminException
-
buildDistribution
Called to build a Desktop App distribution.- Returns:
- Root directory of the built distribution.
- Throws:
BBjAdminException
-
getWebUiProgramArguments
- Throws:
BBjAdminException
-
getWebUiJavaArguments
- Throws:
BBjAdminException
-