Interface BBjAdminBase
- All Superinterfaces:
BBjAdminCommitPropertyWriter
,BBjAdminCommitWriter
,BBjAdminPropertyReader
,BBjAdminPropertyWriter
,Remote
,Serializable
- All Known Implementing Classes:
BBjAdminRemoteWrapper
This is the main interface and entry point for accessing BBj administration functionality. Server information and configuration settings are all expressed as properties for simplicity and to allow for easy extension. Constants are declared in the API so that properties can be easily addressed even though they are all Strings at the base level. Changes to property values or setting values for new properties must be committed. This allows the user to completely configure property settings and then commit or roll back all of the changes as a group.
Do not directly create a BBjAdminBase instance from one of its implementation classes. Instead, use the com.basis.api.admin.BBjAdminFactory class to acquire an instance/connection. The following sample code shows how to acquire a connection using Java and BBj code:
Java Sample
import com.basis.api.admin.BBjAdminFactory;
import com.basis.api.admin.BBjAdminBase;
import com.basis.api.admin.BBjAdminDatabase;
import java.net.InetAddress;
...
BBjAdminBase api = BBjAdminFactory.getBBjAdmin(InetAddress.getByName("myserver"), 2002, true, "admin", "mypassword");
BBjAdminSet databases = api.getDatabases();
...
BBj Sample
use com.basis.api.admin.BBjAdminFactory
use com.basis.api.admin.BBjAdminBase
use com.basis.api.admin.BBjAdminDatabase
use java.net.InetAddress
...
declare BBjAdminBase api!
declare BBjAdminSet databases!
api! = BBjAdminFactory.getBBjAdmin(InetAddress.getByName("myserver"), 2002, true, "admin", "mypassword")
databases! = api!.getDatabases()
...
- Since:
- 10.00
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final Logger
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Permission flag to allow user to add a new user account.static final int
Permission flag to allow user to use the Enterprise Manager.static final int
Permission flag to allow user to perform all administrative related tasks on a server.static final int
Permission flag to allow user to manage asynchronous triggers.static final int
Permission flag to allow user to attach to an existing data dictionary.static final int
Permission flag to allow user to manage change audit jobs.static final int
Permission flag to allow user to force-close currently open file channels.static final int
Permission flag to allow user to view/manage the list of connection pools.static final int
Permission flag to allow user to view/manage the list of currently configured online copy jobs.static final int
Permission flag to allow user to create a new database including new data dictionary.static final int
Permission flag to allow user to create a new file trigger.static final int
Permission flag to allow user to drop a database.static final int
Permission flag to allow user to delete a user account.static final int
Permission flag to allow user to manage document indexes.static final int
Permission flag to allow user to manage email services.static final int
Permission flag to allow user to view/manage the list of currently open JDBC/ODBC connections.static final int
Permission flag to allow user to view current metrics page.static final int
Permission flag to allow user to view the currently open file channels.static final int
Permission flag to allow user to view/manage the currently running BBj processes.static final int
Permission flag to allow user to manage replication jobs.static final int
Permission flag to allow user to configure scheduled and autorun jobs.static final int
Permission flag to allow user to configure the server.static final int
Permission flag to allow user to change a user's password other than their own.static final int
Permission flag to allow user to set permissions for other users.static final int
Permission flag to allow user to view/manage the table analysis queue.static final String
Company name to use when sending a support upload to BASIS.static final String
Email address to use to let BASIS support know who sent a support upload.static final String
Support incident ID to use when sending a support upload to BASIS. -
Method Summary
Modifier and TypeMethodDescriptionvoid
abortSupportUploadJob
(String p_uploadId) Cancels the specified support upload job.void
acceptLdapCertificate
(String p_certificate) Called to accept the LDAP certificate and add it to the accepted certificate list.void
Add the specified replication job to the list of running jobs.Create a new user (committed).attachDatabaseOnDisk
(String p_name, String p_dictionary) Attach to an existing database on disk.attachDatabaseOnDisk
(String p_name, String p_dictionary, boolean p_errorOnBadDictionary) Attach to an existing database on disk.void
changePassword
(String p_user, String p_password) Change user password.boolean
check2FACode
(String p_secretKey, String p_code, long p_validitySeconds) Checks to see if the specified code is valid given the specified secret key and the validity in seconds used to generate the secret key.boolean
checkUserPermission
(int p_permission) Returns true if the user logged into the API has the specified permission.void
Clear the BBj program cache.void
Clears the file open statistics gathered when a file is opened.void
Specify a specific commit message that will accompany the commit to the configuration Git archive.void
convertFiles
(String[] p_files, int p_targetType) Converts the list of full paths to files on the BBjServices server to the specified file type.void
copyDictionaryToTarget
(String p_sourceDb, String p_targetDirectory, String p_targetHost, int p_targetPort, boolean p_targetSsl, String p_targetAuthToken) Copies all the data dictionary files from the source database to the target directory.createAsynchTriggerJob
(String p_name, String p_address, int p_port, double p_kbps, boolean p_ssl, String p_user, String p_password, String p_workingDir, String p_config, boolean p_useDefaultAlias, String p_writeProgram, String p_removeProgram) Creates a new asynchronous trigger job.createAsynchTriggerJob
(String p_name, String p_user, String p_password, String p_workingDir, String p_config, boolean p_useDefaultAlias, String p_writeProgram, String p_removeProgram) Creates a new asynchronous trigger job that will run on the same machine.createAuditReplicationJob
(String p_name, String p_dbRoot, boolean p_synchronous, int p_rolloverType, int p_rolloverFrequency) Creates a new filesystem audit job.<E> BBjAdminList<E>
Create a new BBjAdminList instance.<K,
V> BBjAdminMap<K, V> Create a BBjAdminMap.<E> BBjAdminSet<E>
Create a BBjAdminSet.createBBjReplicationJob
(String p_name, boolean p_synchronous) Creates a new BBj replication job.createBBjReplicationJob
(String p_name, String p_address, int p_port, boolean p_ssl, String p_user, String p_pwd, boolean p_synchronous) Creates a new BBj replication job with the specified configuration info.createBBjReplicationJob
(String p_name, String p_address, int p_port, double p_kbps, boolean p_ssl, String p_user, String p_pwd, boolean p_synchronous) Creates a new BBj replication job with the specified configuration info.createBBjReplicationJob
(String p_name, String p_address, int p_port, double p_kbps, boolean p_ssl, String p_user, String p_pwd, boolean p_synchronous, String p_eventHandlerProgram, String p_eventHandlerUser, String p_eventHandlerPassword, String p_eventHandlerConfig, String p_eventHandlerWorkingDir, String p_eventHandlerClasspath, String p_eventEmailService, String p_eventEmailRecipients) Creates a new BBj replication job with the specified configuration info.Deprecated.createDatabaseOnDisk
(String p_name, String p_dictionary, BBjAdminDatabase.DatabaseType p_type) Create a new database and create the data dictionary files.void
createDirectory
(String p_fullPath, boolean p_recursive) Creates the specified directory on the server.createDocumentIndex
(String p_name, String p_type) Creates a new BBjAdminDocumentIndex with the given name.createDownloadPackage
(List<String> p_files) Used to combine the specified list of files into a zip file that can be downloaded from the returned URL.Create an empty OnlineCopyJob.createOnlineCopyJobConfig
(String p_file) Create an OnlineCopyJob from a file.Create a new remote application configuration.Create an empty server configuration of the specified type.Creates a new SQL replication job.Returns a new instance of a Web service.void
dropDatabase
(String p_name, boolean p_deleteAllFiles) Drop a database by name, optionally deleting all files.void
dropDocumentIndex
(String p_name) Drops the specified document index.void
dropSecurityGroup
(String p_group) Drops the specified security group (committed).void
Drop a user (committed).void
dumpHeap()
Dump the memory heap to the log.void
Dump the properties currently in memory to a file in the log directory.void
Dump JVM threads to the log.void
duplicateDatabaseConfig
(String p_sourceDb, String p_newName) Creates a copy of the specified database configuration.void
exportReplicationJob
(BBjAdminReplicationJob p_job, String p_filename) Exports the replication job in a format that can then be read in using the import() method.int
forceCloseOpenFiles
(String p_filenameMatchRegex, Map<String, String> p_modeMatchRegex) Forces any open files matching the p_filenameMatchRegex value (null means ignore this match) and/or open files with MODE information matching p_modeMatchRegex.Generates a secret key to use for TOTP and the Google Authenticator app.generateKeyPair
(String p_user, String p_description) Generates a public/private key pair.void
generateWebStartCertificate
(String p_company, String p_host, int p_port) Tells BBj Services to have BASIS generate the Web Start certificates on the server.get2FACode
(String p_secretKey, long p_validitySeconds) Generates a new TOTP code based on the secret key and validity in seconds.getAbsolutePath
(String p_filename) Returns the absolute path for the specified file or directory as a string.Returns all the information about active authorization tokens.Deprecated.Returns a list of all the asynchronous trigger jobs currently configured on the system.Returns a list of all the asynchronous trigger job targets on this machine.getAuditDatabase
(String p_dbName) Returns a list of all the audit jobs currently configured on the server.Returns a list of all the audit target currently on this server.Get the autorun configuration.Returns a list of the system permissions that are available on the server.getBBjFile
(String p_path) Returns a BBjAdminBBjFile for the specified full path.byte[]
getBBjFileRecord
(String p_path, int p_recNum) Reads the record at the specified record location and returns the contents of the record as a byte[].getBBjProcess
(String p_id) Returns the BBjAdminBBjProcess for the specified ID.Get the set of BBj processes (read-only).Returns a Map containing all the properties and their values found in the BBj.properties file.Returns a read-only copy of the contents of the BBj.properties file.Deprecated.getClasspath
(String p_cpName) Returns the list of items that make up the specified classpath.Returns a list of the session specific classpaths on the server.getClientBBjProcess
(String p_id) Returns the BBjAdminBBjProcess for the specified ID.Get the set of BBj processes (read-only).Get the list of open files (read-only).getClientOpenFiles
(int p_field, int p_operator, String p_value) Get the list of open files (read-only).Returns a list of the replication jobs currently running on the system.getConfigCommitDiffText
(String p_commitId1, String p_commitId2) Returns the Git diff patch text between two commits.getConfigCommits
(int startDate, int endDate) Returns a list of the config directory commits that have occurred during the optional range of dates.Returns an object which provides access to server configuration settings.getConnectionPool
(String p_poolName) Returns the specified connection pool for administration purposes.Returns a list of available connection pools for administration purposes.getDatabase
(String p_name) Get a single existing database.Get the names of all accessible databases.Get all accessible databases.getDocumentIndex
(String p_name) Returns a document index for the specified name.Returns a list of all the document indexes available on the server.getEmailService
(String p_name) Get the email service with the specified name.Returns a list of the currently configured email services on the server.Returns a list of all the currently enabled replication jobs.The event manager manages the system events that may occur on the server.Returns a BBjAdminFile for the specified full path.Returns the file open statistics gathered when a file is opened.long
getFreeSpace
(String p_path) Returns the number of free bytes availableReturns a list of the currently running index builder jobs on the server.getJarIndexJars
(String p_jarFilePath) Returns a list of the jars referenced in a JarIndex if one is present in the specified jar file.getJavaInfo
(String p_javaHome, boolean p_server) Returns the information about the Java Virtual Machine located at the specified location.Returns the configuration object for managing the JNLP applications and settings on the server.getKeyTemplateForFile
(String p_filename, int p_keyNum) Returns a string template (if one can be found) for the specified data file defining the layout of the key specified in p_keyNum.Returns the configuration information for the BBj Language Server.getLicenseFeatureInfo
(String p_feature) Deprecated.Returns information about the license used by BBjServices.Returns the Locale as a string.getMemoryUsageData
(String p_alternateLocation) Returns a list of the trigger directories that are currently mounted by the server.Get all currently running Online Copy Jobs.getOpenFile
(String p_id) Get the open file (read-only) with the specified ID.Get the set of open files (read-only).getOSFiles
(BBjAdminClientOSFile p_parent, String[] p_filenameFilter, Date p_modifiedFilterStart, Date p_modifiedFilterEnd) Returns a list of files from the operating system.Deprecated.Returns a list of all the public key info available on the server for all users.getPublicKeys
(String p_username) Returns a list of all the public key info available on the server for the specified user.Returns the configuration object for managing the remote-launch applications (including BUI) and settings on the server.getReplicationJob
(String p_uuid) Returns the replication job running on the system that has the specified UUID.Returns a list of the replication jobs currently running on the system.Returns a list of the replication targets on the system.getRoots()
Returns a list of all the roots or drives on the machine.Returns a list of available security group names.Returns a list of available security groups.Deprecated.Deprecated.Get the services configurations.getSingleUserPermissions
(String p_user) Get the permissions for a single user.Get the set of SQL connections (read-only).Returns the time that the currently running BBjServices was started as a formatted timestamp string including the timezone.Returns a list of any startup exceptions that occured while BBj Services was attempting to start.getSupportUploadJob
(String p_uploadId) Returns an instance of BBjAdminSupportUploadJob containing the information about the current status of the specified upload job ID.Returns a list of all the currently running support upload jobs.getSystemProperty
(String p_property, String p_default) Returns a system property from the server.Returns a list of the currently queued and/or running table analysis jobs on the server.Returns a list of all the currently configured task groups on the server.getTemplateForFile
(String p_filename) Returns a string template (if one can be found) for the specified data file.getTextFileContents
(String p_fullPath) Returns the contents of the specified file from the remote machine as a string.getTokenInfo
(String p_tokenOrTokenId) Takes the specified token and returns the BBjAdminTokenInfo object containing the payload for the token.Returns the authorization token that was used to acquire this connection to the Admin API.long
getTotalSpace
(String p_path) Returns the total space available on the specified root or drive.getTriggers
(String p_filename) Get the trigger configuration for a file.getUser()
Get the name of the user who got this BBjAdmin instance.getUserInfo
(String p_user) Returns additional user info for the specified user.Get the names of users.Get the permissions for all users.getUsers()
Returns a list of all users including their additional info such as name, email, etc.Get the Web App Server configuration.getWebService
(String p_name) Returns the BBjAdminWebService instance for the specified service, or null if no service by that name exists.Returns a list of available web services.void
hardResetConfigCommit
(String p_commitId, String p_name, String p_email) Performs a hard reset of the configuration, returning it to the specified commit ID state.importReplicationJob
(String p_filename, String p_user, String p_password) Loads the contents of a replication job export file into the object.void
invalidateToken
(String p_tokenOrTokenId) Invalidates the specified token.boolean
isAddressSameAsServer
(String p_address) Returns true if the specified host address resolves to the same address as the machine running the Admin Server.boolean
Asks the server if it is currently set to admin only mode.boolean
Returns true if the server side OS is MS Windows of some type.Asks the server if it is allowed to peform replication jobs.boolean
Asks the server if it is currently RUNNING in admin only mode.boolean
isSAM()
Checks to verify that the server has a valid Software Asset Management license available.boolean
isServiceRunning
(BBjAdminServerConfig p_config) Returns true if the specified service is running.boolean
Returns true or false as to whether the SQL engine server is using SSL.boolean
Checks to see if the specified user is using TOTP 2 factor authentication.boolean
Checks if Version 3 WebServices are available.jsonExecute
(String json) Executes some server-side processing defined by the supplied JSON string.void
migrateToEnhancedDatabase
(String p_sourceDatabase, String p_destinationDatabase, String p_destinationDirectory) Creates a new data dictionary in the specified format at the specified destination location using the dictionary at p_sourceDictionary.void
mountTriggerDirectory
(String p_fullPath) Mounts a directory to be listed when asking for a list of mounted trigger directories.Returns a new connection pool definition.newDatabaseInstance
(Map<String, Object> p_map) Returns a new, empty database instance.Creates and returns a new Email Service that provides the ability to send email messages using the Admin API or easily configure various parts of the system to send notifications via email such as replication problems, etc.Returns a new, blank LDAP search instance.newSecurityGroup
(String p_groupName) Returns a new SecurityGroup instance.newTask
(BBjAdminTask.TaskType p_type) Returns a new task of the specified type.Returns a new task group from the server.void
notifyAllProcesses
(String p_message, String p_title) Sends a notification to all running processes where it will pop up a message box to display to display the provided message and title to the user of that process.void
notifyProcess
(int p_id, String p_message, String p_title) Sends a notification to the specified process where it will pop up a message box to display to display the provided message and title to the user of that process.void
receiveDictionaryFiles
(byte[] p_bytes, String p_targetDirectory) void
This method can be called to reconfigure the services.void
refresh()
Refresh properties that may have changed on the server, locally changed properties will not be overridden.void
release()
Release resources held.void
Reload the Database configuration file.void
removeAllPublicKeys
(String p_username) Removes all the public keys for the specified user.void
removeAsynchTriggerJob
(String p_uuidOrName) Removes the asynchronous trigger job identified by the specified UUID or name.void
removeBuiApplication
(String p_name) Removes the specified BUI application configuration.void
removeConnectionPool
(String p_poolName) Removes the specified connection pool from the server.void
removeEmailService
(String p_name) Removes the specified email service configuration from the server.void
removePublicKey
(String p_username, String p_publicKeyId) Removes the specified public key if present.void
removeReplicationJob
(String p_uuidOrName, boolean p_erase) Removes the replication job identified by the specified UUID or name.void
removeReplicationTarget
(String p_uuid, boolean p_erase) Removes the replication target identified by the specified UUID.void
removeService
(BBjAdminServerConfig p_service) Removes the specified service configuration.void
removeTaskGroup
(BBjAdminTaskGroup p_group) Removes the specified task group from the server.void
removeTriggers
(String p_filename) Removes the trigger from the specified file.void
removeWebService
(String p_name) Removes the specified web service from the server.renewToken
(long p_duration) Renews the current token for that Admin API connection setting the duration of validity to the value specified in p_duration.renewToken
(long p_duration, boolean p_invalidateOld) Renews the current token for that Admin API connection setting the duration of validity to the value specified in p_duration.renewToken
(String p_token, long p_duration) Renews the current token for that Admin API connection setting the duration of validity to the value specified in p_duration.void
restartBBjServices
(boolean p_waitForClients) Tells the remote BBj Services to shutdown and restart.boolean
send2FACode
(String p_user) Sends the specified user a 2-factor authentication code via email.void
send2FASetupEmail
(String p_subject, Set<String> p_usernames) Once 2-factor authorization is enabled in the EM or Admin API, this call will send an email to each user in the specified list of usernames with any setup instructions (e.g.void
setAdminOnlyMode
(boolean p_adminOnly) Tells the server to set itself into admin only mode the next time it is restarted.void
setAutoRenewToken
(boolean p_autorenew) void
setAutorunConfiguration
(BBjAdminAutorun p_autorun) Set the autorun configuration (not committed).void
setClasspath
(String p_cpName, List<String> p_values) Sets the list of items that make up the specified named classpath.void
Updates the configuration for the BBj Language Server.void
setReplicationJobEnabled
(String p_replicationID, boolean p_enabled) Enables/Disables the specified replication job.void
setServerConfigurations
(BBjAdminMap<BBjAdminServer.ServerType, BBjAdminSet<BBjAdminServer>> p_config) Deprecated.void
setServerConfigurations
(BBjAdminServer.ServerType p_type, BBjAdminSet<BBjAdminServer> p_servers) Deprecated.void
setServices
(List<BBjAdminServerConfig> p_configs) Sets the services configurations.void
setSingleUserPermissions
(BBjAdminUserPermissions p_permissions) Set an individual user's permissions (not committed).void
setTableAnalysisEnabled
(String p_database, boolean p_enabled) Enables or disabled the ability to perform a table analysis on the specified database.void
setTriggers
(BBjAdminTriggers p_triggers) Set the trigger configuration for a file (not committed).void
setUser2FASettings
(String p_user, String p_secretKey, boolean p_enabled) Enables/disables TOTP 2 factor authentication for the specified user.void
setUserInfo
(BBjAdminUser p_info) Sets additional user info such as first/last/middle name, email, text number, etc.void
setUserInfo
(List<BBjAdminUser> p_infos) Sets additional user info such as first/last/middle name, email, text number, etc.void
setUserPermissions
(BBjAdminSet<BBjAdminUserPermissions> p_permissions) Set permissions for a whole set of users (not committed).void
shutdownBBjServices
(boolean p_waitForClients) Tells BBj Services to shutdown.void
startDatabaseReloadHelper
(String p_dbName) void
Start the BBj Language Server using the current configuration.Start an online copy job.void
startService
(BBjAdminServerConfig p_config) Deprecated.void
Stop the BBj Language Server.void
stopService
(BBjAdminServerConfig p_config) Stops the specified service if running.void
testJdbcConnection
(String p_driver, String p_url, String p_user, String p_password) Tests connecting with the specified JDBC driver, URL, user and password from the server.void
testRemoteFilesystemAccessibility
(String p_host, int p_port, boolean p_ssl, String p_user, String p_password) Called to test and see if the server can connect to the specified remote filesystem.void
unmountTriggerDirectory
(String p_fullPath) Unmounts a trigger directory.void
Unpin all programs.void
updateEventManager
(BBjAdminEventManager p_manager) void
Updates the replication job on the server with the same ID, with the information in the specified replication job.uploadSupportFiles
(BBjAdminSet<String> p_files, BBjAdminMap<String, String> p_properties) Send the specified list of files to support.void
useExistingWebStartCertificate
(String p_keystore, String p_keystorePassword, String p_privateKey, String p_privateKeyPassword) Configures BBj Services to use the specified certificate for Web start applications.boolean
validate2FACode
(String p_code) Validates the specified 2FA code for the user who created this Admin API object.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
-
Field Details
-
LOG
-
PERMISSION_ATTACH_EXISTING_DB
static final int PERMISSION_ATTACH_EXISTING_DBPermission flag to allow user to attach to an existing data dictionary.- See Also:
-
PERMISSION_CREATE_NEW_DB
static final int PERMISSION_CREATE_NEW_DBPermission flag to allow user to create a new database including new data dictionary.- See Also:
-
PERMISSION_DELETE_DB
static final int PERMISSION_DELETE_DBPermission flag to allow user to drop a database.- See Also:
-
PERMISSION_ADD_USER
static final int PERMISSION_ADD_USERPermission flag to allow user to add a new user account.- See Also:
-
PERMISSION_DELETE_USER
static final int PERMISSION_DELETE_USERPermission flag to allow user to delete a user account.- See Also:
-
PERMISSION_SET_PERMISSIONS
static final int PERMISSION_SET_PERMISSIONSPermission flag to allow user to set permissions for other users.- See Also:
-
PERMISSION_SET_PASSWORDS
static final int PERMISSION_SET_PASSWORDSPermission flag to allow user to change a user's password other than their own.- See Also:
-
PERMISSION_PROCESSES
static final int PERMISSION_PROCESSESPermission flag to allow user to view/manage the currently running BBj processes.- See Also:
-
PERMISSION_OPEN_FILES
static final int PERMISSION_OPEN_FILESPermission flag to allow user to view the currently open file channels. Users with this permission need PERMISSION_CLOSE_FILES in order to force-close an open file.- See Also:
-
PERMISSION_JDBC_CONNECTIONS
static final int PERMISSION_JDBC_CONNECTIONSPermission flag to allow user to view/manage the list of currently open JDBC/ODBC connections.- See Also:
-
PERMISSION_SERVER_CONFIG
static final int PERMISSION_SERVER_CONFIGPermission flag to allow user to configure the server.- See Also:
-
PERMISSION_ALLOW_ADMIN
static final int PERMISSION_ALLOW_ADMINPermission flag to allow user to use the Enterprise Manager.- See Also:
-
PERMISSION_CREATE_NEW_TRIGGER
static final int PERMISSION_CREATE_NEW_TRIGGERPermission flag to allow user to create a new file trigger.- See Also:
-
PERMISSION_CONNECTION_POOLS
static final int PERMISSION_CONNECTION_POOLSPermission flag to allow user to view/manage the list of connection pools.- See Also:
-
PERMISSION_COPY_JOBS
static final int PERMISSION_COPY_JOBSPermission flag to allow user to view/manage the list of currently configured online copy jobs.- See Also:
-
PERMISSION_TABLE_ANALYSIS_QUEUE
static final int PERMISSION_TABLE_ANALYSIS_QUEUEPermission flag to allow user to view/manage the table analysis queue.- See Also:
-
PERMISSION_CLOSE_FILES
static final int PERMISSION_CLOSE_FILESPermission flag to allow user to force-close currently open file channels.- See Also:
-
PERMISSION_REPLICATION
static final int PERMISSION_REPLICATIONPermission flag to allow user to manage replication jobs.- See Also:
-
PERMISSION_SCHEDULING
static final int PERMISSION_SCHEDULINGPermission flag to allow user to configure scheduled and autorun jobs.- See Also:
-
PERMISSION_AUDITING
static final int PERMISSION_AUDITINGPermission flag to allow user to manage change audit jobs.- See Also:
-
PERMISSION_ASYNCH_TRIGGER
static final int PERMISSION_ASYNCH_TRIGGERPermission flag to allow user to manage asynchronous triggers.- See Also:
-
PERMISSION_DOCUMENT_INDEXES
static final int PERMISSION_DOCUMENT_INDEXESPermission flag to allow user to manage document indexes.- See Also:
-
PERMISSION_EMAIL_SERVICES
static final int PERMISSION_EMAIL_SERVICESPermission flag to allow user to manage email services.- See Also:
-
PERMISSION_METRICS
static final int PERMISSION_METRICSPermission flag to allow user to view current metrics page.- See Also:
-
PERMISSION_ALLOW_ALL
static final int PERMISSION_ALLOW_ALLPermission flag to allow user to perform all administrative related tasks on a server.- See Also:
-
SUPPORT_UPLOAD_SENDER_EMAIL
Email address to use to let BASIS support know who sent a support upload.- See Also:
-
SUPPORT_UPLOAD_COMPANY
Company name to use when sending a support upload to BASIS.- See Also:
-
SUPPORT_UPLOAD_SUPPORT_INCIDENT_ID
Support incident ID to use when sending a support upload to BASIS.- See Also:
-
OPEN_FILE_FILTER_FILENAME
static final int OPEN_FILE_FILTER_FILENAME- See Also:
-
OPEN_FILE_FILTER_OPEN_ID
static final int OPEN_FILE_FILTER_OPEN_ID- See Also:
-
OPEN_FILE_FILTER_USER
static final int OPEN_FILE_FILTER_USER- See Also:
-
OPEN_FILE_FILTER_IP_ADDRESS
static final int OPEN_FILE_FILTER_IP_ADDRESS- See Also:
-
OPEN_FILE_FILTER_LOCKED
static final int OPEN_FILE_FILTER_LOCKED- See Also:
-
OPEN_FILE_FILTER_EXTRACTED
static final int OPEN_FILE_FILTER_EXTRACTED- See Also:
-
OPEN_FILE_FILTER_ADVISORY
static final int OPEN_FILE_FILTER_ADVISORY- See Also:
-
OPEN_FILE_FILTER_READ_ONLY
static final int OPEN_FILE_FILTER_READ_ONLY- See Also:
-
OPEN_FILE_FILTER_OPEN_TYPE
static final int OPEN_FILE_FILTER_OPEN_TYPE- See Also:
-
OPEN_FILE_FILTER_MESSAGE
static final int OPEN_FILE_FILTER_MESSAGE- See Also:
-
FILTER_OP_EQ
static final int FILTER_OP_EQ- See Also:
-
FILTER_OP_GT
static final int FILTER_OP_GT- See Also:
-
FILTER_OP_LT
static final int FILTER_OP_LT- See Also:
-
FILTER_OP_CONTAINS
static final int FILTER_OP_CONTAINS- See Also:
-
FILTER_OP_REGEX
static final int FILTER_OP_REGEX- See Also:
-
-
Method Details
-
abortSupportUploadJob
Cancels the specified support upload job.- Parameters:
p_uploadId
-- Throws:
BBjAdminException
-
acceptLdapCertificate
Called to accept the LDAP certificate and add it to the accepted certificate list.- Parameters:
p_certificate
-- Throws:
BBjAdminException
-
addReplicationJob
Add the specified replication job to the list of running jobs. The job will also be started.- Parameters:
job
-- Throws:
BBjAdminException
-
addUser
Create a new user (committed).- Parameters:
p_user
-p_password
-- Throws:
BBjAdminException
-
attachDatabaseOnDisk
Attach to an existing database on disk. An existing database consists of a data dictionary and the table's data files. In this step you only specify the data dictionary location. To set the location of the data files, set the DATABASE property on the BBjAdminDatabase instance.- Parameters:
p_name
- Name of the new database.p_dictionary
- Existing dictionary directory for the new database.- Returns:
- A new BBjAdminDatabase instance with the given name and dictionary location.
- Throws:
BBjAdminException
-
attachDatabaseOnDisk
BBjAdminDatabase attachDatabaseOnDisk(String p_name, String p_dictionary, boolean p_errorOnBadDictionary) throws BBjAdminException Attach to an existing database on disk. An existing database consists of a data dictionary and the table's data files. In this step you only specify the data dictionary location. To set the location of the data files, set the DATABASE property on the BBjAdminDatabase instance.- Parameters:
p_name
- Name of the new database.p_dictionary
- Existing dictionary directory for the new database.p_errorOnBadDictionary
- True if you want the method to error if the specified dictionary location does not contain a valid data dictionary.- Returns:
- A new BBjAdminDatabase instance with the given name and dictionary location.
- Throws:
BBjAdminException
-
changePassword
Change user password. This call immediately changes the user's password and does not require commit() to be called.- Parameters:
p_user
- User to change the password for.p_password
- New password for the user.- Throws:
BBjAdminException
-
checkUserPermission
boolean checkUserPermission(int p_permission) Returns true if the user logged into the API has the specified permission.- Parameters:
p_permission
-
-
clearCache
Clear the BBj program cache.- Throws:
BBjAdminException
-
clearFileOpenInfo
Clears the file open statistics gathered when a file is opened. These stats contain information about the prefix examined during the open and the path that it decided to use to open the file. This information is not persisted through BBjServices restart but only contained in memory.- Throws:
BBjAdminException
-
commit
Specify a specific commit message that will accompany the commit to the configuration Git archive.- Parameters:
p_message
- Message to accompany the commit.- Throws:
BBjAdminException
-
copyDictionaryToTarget
void copyDictionaryToTarget(String p_sourceDb, String p_targetDirectory, String p_targetHost, int p_targetPort, boolean p_targetSsl, String p_targetAuthToken) throws BBjAdminException Copies all the data dictionary files from the source database to the target directory.- Parameters:
p_sourceDb
-p_targetDirectory
-p_targetHost
-p_targetPort
-p_targetSsl
-p_targetAuthToken
-- Throws:
BBjAdminException
-
createAsynchTriggerJob
BBjAdminAsynchTriggerJob createAsynchTriggerJob(String p_name, String p_address, int p_port, double p_kbps, boolean p_ssl, String p_user, String p_password, String p_workingDir, String p_config, boolean p_useDefaultAlias, String p_writeProgram, String p_removeProgram) throws BBjAdminException Creates a new asynchronous trigger job. See getAsynchTriggerJobs() for complete details on asynchronous trigger jobs.- Parameters:
p_name
- Name of the job to display in the Enterprise Manager.p_address
- Host name or IP address of the BBj Services installation to use as a target for this job.p_port
- Port number of the Filesystem Server running on the specified BBj Services installation.p_kbps
- Bandwidth in KBPS that the system should be allowed to use for processing job operations. If zero, it will use all that it needs to.p_ssl
- True if the Filesystem Server of the target is configured to use SSL or false otherwise.p_user
- User to use to connect to the job's target machine.p_password
- Password for the user.p_workingDir
- Optional working directory to use when executing the configured BBj write/remove programs.p_config
- Optional location of the config.bbx file used by the interpreter running the BBj write/remove programs.p_useDefaultAlias
-p_writeProgram
- Absolute path to the location of the program to be executed when any write operation occurs on a monitored file.p_removeProgram
- Absolute path to the location of the program to be executed when any remove operation occurs on a monitored file.- Returns:
- Instance of a new BBjAdminAsynchTriggerJob.
- Throws:
BBjAdminException
-
createAsynchTriggerJob
BBjAdminAsynchTriggerJob createAsynchTriggerJob(String p_name, String p_user, String p_password, String p_workingDir, String p_config, boolean p_useDefaultAlias, String p_writeProgram, String p_removeProgram) throws BBjAdminException Creates a new asynchronous trigger job that will run on the same machine. See getAsynchTriggerJobs() for complete details on asynchronous trigger jobs.- Parameters:
p_name
- Name of the job to display in the Enterprise Manager.p_user
- User to use to connect to the job's target machine.p_password
- Password for the user.p_workingDir
- Optional working directory to use when executing the configured BBj write/remove programs.p_config
- Optional location of the config.bbx file used by the interpreter running the BBj write/remove programs.p_useDefaultAlias
-p_writeProgram
- Absolute path to the location of the program to be executed when any write operation occurs on a monitored file.p_removeProgram
- Absolute path to the location of the program to be executed when any remove operation occurs on a monitored file.- Returns:
- Instance of a new BBjAdminAsynchTriggerJob.
- Throws:
BBjAdminException
-
createAuditReplicationJob
BBjAdminAuditReplicationJob createAuditReplicationJob(String p_name, String p_dbRoot, boolean p_synchronous, int p_rolloverType, int p_rolloverFrequency) throws BBjAdminException Creates a new filesystem audit job. Audit jobs allow you to monitor a list of files and/or directories for changes to files. When a change occurs, that change will be logged to the audit database. See Auditing in the BBj Enterprise Manager documentation for more information.- Parameters:
p_name
- Name of the audit job.p_dbRoot
- A directory where the audit database will be created. The audit database is a standard BBj database containing special tables that hold the audit data. This location is where the audit database and any subsequent audit databases for this job (when they rollover) will be created.p_synchronous
- Always set this to false.p_rolloverType
- Rollover type is the when the audit log should rollover. Valid options are in the BBjAdminAuditReplicationJob interface and are: ROLLOVER_NONE, ROLLOVER_DAILY, ROLLOVER_WEEKLY, ROLLOVER_MONTHLY, ROLLOVER_YEARLY.- Returns:
- A new BBjAdminAuditReplicationJob.
- Throws:
BBjAdminException
-
createBBjAdminList
Create a new BBjAdminList instance. Always use this method to create a new BBjAdminList rather than directly using one of its implementation classes.- Type Parameters:
E
-- Returns:
- New BBjAdminList.
- Throws:
BBjAdminException
-
createBBjAdminMap
Create a BBjAdminMap. Always use this method to create a new BBjAdminMap rather than directly using one of its implementation classes.- Returns:
- New BBjAdminMap
- Throws:
BBjAdminException
-
createBBjAdminSet
Create a BBjAdminSet. Always use this method to create a new BBjAdminSet rather than directly using one of its implementation classes.- Type Parameters:
E
-- Returns:
- New BBjAdminSet.
- Throws:
BBjAdminException
-
createBBjReplicationJob
BBjAdminBBjReplicationJob createBBjReplicationJob(String p_name, boolean p_synchronous) throws BBjAdminException Creates a new BBj replication job.- Parameters:
p_name
- Name of the replication job.p_synchronous
- Whether the job's replication operations should occur synchronously or asynchronously. This value SHOULD ALMOST ALWAYS BE false.- Returns:
- New BBjAdminReplicationJob.
- Throws:
BBjAdminException
-
createBBjReplicationJob
BBjAdminBBjReplicationJob createBBjReplicationJob(String p_name, String p_address, int p_port, boolean p_ssl, String p_user, String p_pwd, boolean p_synchronous) throws BBjAdminException Creates a new BBj replication job with the specified configuration info. Target is the machine destination for the replicated data while the source is the machine where the data being replicated resides.- Parameters:
p_name
- Name of the replication job.p_address
- Host name of the target filesystem server to connect to.p_port
- Port number for the target filesystem server to connect to. Usually 2000.p_ssl
- Whether the target filesystem server you are connecting to uses SSL. Must match the server's configuration.p_user
- Username to use to connect to the target filesystem server.p_pwd
- Password to use to connect to the target filesystem server.p_synchronous
- Whether the job's replication operations should occur synchronously or asynchronously. This value SHOULD ALMOST ALWAYS BE false.- Returns:
- New BBjAdminReplication job.
- Throws:
BBjAdminException
-
createBBjReplicationJob
BBjAdminBBjReplicationJob createBBjReplicationJob(String p_name, String p_address, int p_port, double p_kbps, boolean p_ssl, String p_user, String p_pwd, boolean p_synchronous) throws BBjAdminException Creates a new BBj replication job with the specified configuration info.- Parameters:
p_name
- Name of the replication job.p_address
- Host name of the target filesystem server to connect to.p_port
- Port number for the target filesystem server to connect to. Usually 2000.p_kbps
- Optional way to limit the rate of replication. Kilobits per seconds to send replication operations.p_ssl
- Whether the target filesystem server you are connecting to uses SSL. Must match the server's configuration.p_user
- Username to use to connect to the target filesystem server.p_pwd
- Password to use to connect to the target filesystem server.p_synchronous
- Whether the job's replication operations should occur synchronously or asynchronously. This value SHOULD ALMOST ALWAYS BE false.- Returns:
- New BBjAdminReplication job.
- Throws:
BBjAdminException
-
createBBjReplicationJob
BBjAdminBBjReplicationJob createBBjReplicationJob(String p_name, String p_address, int p_port, double p_kbps, boolean p_ssl, String p_user, String p_pwd, boolean p_synchronous, String p_eventHandlerProgram, String p_eventHandlerUser, String p_eventHandlerPassword, String p_eventHandlerConfig, String p_eventHandlerWorkingDir, String p_eventHandlerClasspath, String p_eventEmailService, String p_eventEmailRecipients) throws BBjAdminException Creates a new BBj replication job with the specified configuration info. This method allows you to specify an event hanlder BBj program. The event handler will be executed when a change occurs in the status of the replication job such as when it is paused, resumed, etc.- Parameters:
p_name
- Name of the replication job.p_address
- Host name of the target filesystem server to connect to.p_port
- Port number for the target filesystem server to connect to. Usually 2000.p_kbps
- Optional way to limit the rate of replication. Kilobits per seconds to send replication operations.p_ssl
- Whether the target filesystem server you are connecting to uses SSL. Must match the server's configuration.p_user
- Username to use to connect to the target filesystem server.p_pwd
- Password to use to connect to the target filesystem server.p_synchronous
- Whether the job's replication operations should occur synchronously or asynchronously. This value SHOULD ALMOST ALWAYS BE false.p_eventHandlerProgram
- BBj program to use to handle replication events. This program will be executed when each replication operation occurs. The program should decide how to handle each operation.p_eventHandlerUser
- User to use to run the handler program.p_eventHandlerPassword
- Password to use to run the handler program.p_eventHandlerConfig
- config.bbx file to use for the interpreter that runs the handler program.p_eventHandlerWorkingDir
- Working directory to use for the handler program.p_eventHandlerClasspath
- Optional session specific classpath (SSCP) to use for the handler program.p_eventEmailService
- Email service to be used to send notifications. See Email Services for more info.p_eventEmailRecipients
- Comma separated list of email recipients for notifications.- Returns:
- New replication job.
- Throws:
BBjAdminException
-
createBuiApplication
Deprecated.Create a new BUI application configuration. Make changes to the application configuration object and then call the commit() method to save the changes.- Throws:
BBjAdminException
-
createDatabaseOnDisk
BBjAdminDatabase createDatabaseOnDisk(String p_name, String p_dictionary, BBjAdminDatabase.DatabaseType p_type) throws BBjAdminException Create a new database and create the data dictionary files. Used for creating a new database entirely from scratch.- Parameters:
p_name
- Name of the new database.p_dictionary
- Dictionary directory for the new database data dictionary files. Must be empty.p_type
- Type of database to create. Valid types are in BBjAdminDatabase.DatabaseType enum and include LEGACY, ENHANCED, and LINKED.- Returns:
- New BBjAdminDatabase instance.
- Throws:
BBjAdminException
-
createDirectory
Creates the specified directory on the server. This uses the BBj Filesystem to create the directory which means it supports using the data server syntax in file names (i.e. /<myhost, port=2100>/mypath)- Parameters:
p_fullPath
- Full path to data file. Supports BBj data server syntax.p_recursive
- True if it should create all parent directories. If false and one of the parent directories does not exist, it will throw an exception.- Throws:
BBjAdminException
-
createDocumentIndex
Creates a new BBjAdminDocumentIndex with the given name. If the name is already in use it will throw an exception.- Parameters:
p_name
- Name of the document index. Must be unique to the server.p_type
- Type of index. Use one of the types from BBjAdminDocumentIndex.- Returns:
- New BBjAdminDocumentIndex with the given name.
- Throws:
BBjAdminException
- If there is a problem or if the name is already in use.
-
createOnlineCopyJobConfig
Create an empty OnlineCopyJob. To run the copy job, call the startOnlineCopyJob() method, passing in the BBjAdminOnlineCopyJobConfig instance returned by this method.- Throws:
BBjAdminException
-
createOnlineCopyJobConfig
Create an OnlineCopyJob from a file. To run the copy job, call the startOnlineCopyJob() method, passing in the BBjAdminOnlineCopyJobConfig instance returned by this method.- Parameters:
p_file
- Name of the file.- Throws:
BBjAdminException
-
createRemoteApplication
Create a new remote application configuration. Make changes to the application configuration object and then call the commit() method to save the changes. This includes BUI and remote-launch exe application.- Throws:
BBjAdminException
-
createServerConfiguration
Create an empty server configuration of the specified type.- Parameters:
p_type
-- Throws:
BBjAdminException
-
createSQLReplicationJob
Creates a new SQL replication job.- Throws:
BBjAdminException
-
createWebService
Returns a new instance of a Web service. Use commit() to save the changes to the web service.- Throws:
BBjAdminException
-
dropDatabase
Drop a database by name, optionally deleting all files.- Parameters:
p_name
-p_deleteAllFiles
-- Throws:
BBjAdminException
-
dropDocumentIndex
Drops the specified document index.- Parameters:
p_name
- Name of the document index to drop.- Throws:
BBjAdminException
-
dropSecurityGroup
Drops the specified security group (committed). This does not affect any of the users who are members of the group.- Parameters:
p_group
-- Throws:
BBjAdminException
-
dropUser
Drop a user (committed).- Parameters:
p_user
-- Throws:
BBjAdminException
-
dumpHeap
Dump the memory heap to the log.- Throws:
BBjAdminException
-
dumpProperties
Dump the properties currently in memory to a file in the log directory.- Throws:
BBjAdminException
-
dumpThreads
Dump JVM threads to the log.- Throws:
BBjAdminException
-
duplicateDatabaseConfig
Creates a copy of the specified database configuration. This does not copy the database files such as the table data files or data dictionary but rather, only the configuration.- Parameters:
p_sourceDb
- Name of database to duplicate it's configuration.p_newName
- New name for the new database configuration.- Throws:
BBjAdminException
-
exportReplicationJob
Exports the replication job in a format that can then be read in using the import() method. This provides a means for creating an exported replication job that can be imported into another installation.- Parameters:
p_job
- Replication job to export.p_filename
- Full path to the replication job export file. The path will be server side.- Throws:
BBjAdminException
-
forceCloseOpenFiles
int forceCloseOpenFiles(String p_filenameMatchRegex, Map<String, String> p_modeMatchRegex) throws BBjAdminExceptionForces any open files matching the p_filenameMatchRegex value (null means ignore this match) and/or open files with MODE information matching p_modeMatchRegex.- Parameters:
p_filenameMatchRegex
- Regular expression to determine filename matches. Null to ignore the filename.p_modeMatchRegex
- Map of MODE names to a regular expression to determine matches on open files. Null to ignore the MODEs.- Returns:
- The number of matching files found and thus closed.
- Throws:
BBjAdminException
-
generateWebStartCertificate
void generateWebStartCertificate(String p_company, String p_host, int p_port) throws BBjAdminException Tells BBj Services to have BASIS generate the Web Start certificates on the server. This will replace any certificates already in place.- Parameters:
p_company
- Your company or organization name that will appear to clients when they run your application.p_host
- Specify the BBj application Jetty server name as seen by your clients (external to the server itself). This can be an IP address. Do not use ‘localhost’ or local IP address if clients on other computers will use Web Start to run applications on this server.p_port
- Port number of the BBj Jetty web server.- Throws:
BBjAdminException
-
getAbsolutePath
Returns the absolute path for the specified file or directory as a string. Use this method to ask the server to resolve the file path according to its current working directory and OS.- Parameters:
p_filename
-- Throws:
BBjAdminException
-
getActiveTokens
Returns all the information about active authorization tokens. It does not return the token itself.- Returns:
- List of all the active authorization tokens.
- Throws:
BBjAdminException
-
getAllLicenseFeatureInfo
Deprecated.Returns a list of BBjAdminLicenseFeatureInfo object for each feature the license uses.- Throws:
BBjAdminException
-
getAsynchTriggerJobs
Returns a list of all the asynchronous trigger jobs currently configured on the system. An asynchronous trigger job consists of a list of directories and/or files to monitor for changes, a BBj program to be run when a monitored file is written to, and another program to execute when a file has a record removed from it.
These triggers differ from standard file triggers in that the file operation does not wait for the trigger operation to complete, before continuing. This means there is almost no overhead on the file system. Further, these triggers can be configured to run on a remote BBj Services installation to allow the administrator to distribute the interpreter workload to another machine.- Returns:
- List of all the asynchronous trigger jobs.
- Throws:
BBjAdminException
-
getAsynchTriggerTargets
Returns a list of all the asynchronous trigger job targets on this machine. See getAsynchTriggerJobs() for information about asynchronous triggers.- Returns:
- List of all the asynchronous trigger job targets on this machine.
- Throws:
BBjAdminException
-
getAuditDatabase
- Throws:
BBjAdminException
-
getAuditJobs
Returns a list of all the audit jobs currently configured on the server.- Throws:
BBjAdminException
-
getAuditTargets
Returns a list of all the audit target currently on this server.- Throws:
BBjAdminException
-
getAutorunConfiguration
Get the autorun configuration.- Throws:
BBjAdminException
-
getAvailableSystemPermissions
Returns a list of the system permissions that are available on the server. This information is used to find out which permissions the server supports getting and setting.- Throws:
BBjAdminException
-
getBBjFile
Returns a BBjAdminBBjFile for the specified full path. This type of object is generated by examining the file using the BBj file system so the information is related to the specific types of BBj data and program files.- Parameters:
p_path
-- Throws:
BBjAdminException
-
getBBjFileRecord
Reads the record at the specified record location and returns the contents of the record as a byte[]. Access to the file is granted based on the Admin API connected user's access permissions to the file.- Parameters:
p_path
- Full path to the data file. This does not take into account any prefixes defined.p_recNum
- Zero-based record number for the record of interest.- Returns:
- Contents of the record. Returns null if there is no record at the specified record number.
- Throws:
BBjAdminException
- If there is a problem accessing the file.
-
getBBjProcess
Returns the BBjAdminBBjProcess for the specified ID. Use this to get a current fresh copy of the process information.- Parameters:
p_id
-- Throws:
BBjAdminException
-
getBBjProcesses
Get the set of BBj processes (read-only).- Throws:
BBjAdminException
-
getBBjProperties
Returns a Map containing all the properties and their values found in the BBj.properties file.- Throws:
BBjAdminException
-
getBBjPropertiesFile
Returns a read-only copy of the contents of the BBj.properties file.- Throws:
BBjAdminException
-
getBuiConfiguration
Deprecated.Returns the configuration object for managing the BUI applications and settings on the server.- Throws:
BBjAdminException
-
getClasspath
Returns the list of items that make up the specified classpath. Use empty string for the default classpath or specify a valid sessions specific classpath (SSCP) name.- Parameters:
p_cpName
-- Throws:
BBjAdminException
-
getClasspathNames
Returns a list of the session specific classpaths on the server.- Throws:
BBjAdminException
-
getClientBBjProcess
Returns the BBjAdminBBjProcess for the specified ID. Use this to get a current fresh copy of the process information.- Parameters:
p_id
-- Throws:
BBjAdminException
-
getClientBBjProcesses
Get the set of BBj processes (read-only).- Throws:
BBjAdminException
-
getClientOpenFiles
Get the list of open files (read-only). This is different from getOpenFiles() in that it returns a list of objects that are not connected to the server making calls on these objects much faster.- Throws:
BBjAdminException
-
getClientOpenFiles
List<BBjAdminClientOpenFile> getClientOpenFiles(int p_field, int p_operator, String p_value) throws BBjAdminException Get the list of open files (read-only). This is different from getOpenFiles() in that it returns a list of objects that are not connected to the server making calls on these objects much faster.- Throws:
BBjAdminException
-
getClientReplicationJobs
Returns a list of the replication jobs currently running on the system. The objects returned are read-only and only contain data but do not implement functionality for any method calls. These are used for display purposes to optimize network performance.- Throws:
BBjAdminException
-
getConfigCommitDiffText
Returns the Git diff patch text between two commits.- Parameters:
p_commitId1
-p_commitId2
-- Throws:
BBjAdminException
-
getConfigCommits
Returns a list of the config directory commits that have occurred during the optional range of dates.- Parameters:
startDate
- Number of seconds since the epoch start time range or zero for none.endDate
- Number of seconds since the epoch end time range or zero for none.- Throws:
BBjAdminException
-
getConfiguration
Returns an object which provides access to server configuration settings.- Throws:
BBjAdminException
-
getConnectionPool
Returns the specified connection pool for administration purposes.- Parameters:
p_poolName
-- Throws:
BBjAdminException
-
getConnectionPools
Returns a list of available connection pools for administration purposes.- Throws:
BBjAdminException
-
getDatabase
Get a single existing database.- Parameters:
p_name
-- Throws:
BBjAdminException
-
getDatabaseNames
Get the names of all accessible databases.- Throws:
BBjAdminException
-
getDatabases
Get all accessible databases.- Throws:
BBjAdminException
-
getDocumentIndex
Returns a document index for the specified name. A document index is one or more directories and filters that are monitored for new or modified documents. All documents in a monitored directory that match a filter will be indexed in one of the supported index types such as Lucene or elasticsearch.- Parameters:
p_name
- The name of the document index to retrieve.- Returns:
- The index or null if not found.
- Throws:
BBjAdminException
-
getDocumentIndexes
Returns a list of all the document indexes available on the server. A document index is one or more directories and filters that are monitored for new or modified documents. All documents in a monitored directory that match a filter will be indexed in one of the supported index types such as Lucene or elasticsearch.- Returns:
- List of all the document indexes on the server.
- Throws:
BBjAdminException
-
getEmailService
Get the email service with the specified name.- Parameters:
p_name
-- Returns:
- The BBjAdminEmailService instance by the specified name.
- Throws:
BBjAdminException
-
getEmailServices
Returns a list of the currently configured email services on the server.- Returns:
- List of email services.
- Throws:
BBjAdminException
-
getEnabledReplicationJobs
Returns a list of all the currently enabled replication jobs. Any jobs currently paused (disabled) will not show in this list.- Returns:
- List of all enabled replication jobs.
- Throws:
BBjAdminException
-
getEventManager
The event manager manages the system events that may occur on the server. There are numerous types of events that can be configured. Events will optionally notify a specified program or send an email notification through a configured email service (see getEmailServices() method). Each type of event may have different configuration options since each event is unique in its requirements. The available events cannot be modified, only the settings of those events returned by calling this method.- Returns:
- The event manager from the server.
- Throws:
BBjAdminException
-
getFile
Returns a BBjAdminFile for the specified full path. If null, the object will contain all the roots for the file system on the remote machine.- Parameters:
p_fullPath
-- Throws:
BBjAdminException
-
getFileOpenInfo
BBjAdminMap<BBjAdminFileOpenInfoKey,BBjAdminFileOpenInfoValue> getFileOpenInfo() throws BBjAdminExceptionReturns the file open statistics gathered when a file is opened. These stats contain information about the prefix examined during the open and the path that it decided to use to open the file. This information is not persisted through BBjServices restart but only contained in memory.- Throws:
BBjAdminException
-
getFreeSpace
Returns the number of free bytes available- Throws:
BBjAdminException
-
getIndexBuilderJobs
Returns a list of the currently running index builder jobs on the server.- Returns:
- List of running index builder jobs.
- Throws:
BBjAdminException
-
getJarIndexJars
Returns a list of the jars referenced in a JarIndex if one is present in the specified jar file. To be completely honest, it is highly unlikely anyone will ever use this method outside the BBj Enterprise Manager user interface as this information is not particularly useful in other contexts.- Parameters:
p_jarFilePath
- Full path to the jar file to examine.- Returns:
- List of jars present in the INDEX.LIST file within the specified jar if such file exists.
- Throws:
BBjAdminException
-
getJavaInfo
Returns the information about the Java Virtual Machine located at the specified location.- Parameters:
p_javaHome
-p_server
-- Throws:
BBjAdminException
-
getJnlpConfiguration
Returns the configuration object for managing the JNLP applications and settings on the server.- Throws:
BBjAdminException
-
getKeyTemplateForFile
Returns a string template (if one can be found) for the specified data file defining the layout of the key specified in p_keyNum. It searches all the databases to see if there is a table that points to the data file. If if finds one, it returns the string template for that table's key based on the index definitions present for the table. NOTE: This does not apply to ESQL files.- Parameters:
p_filename
-p_keyNum
-- Throws:
BBjAdminException
-
getLicenseFeatureInfo
@Deprecated BBjAdminLicenseFeatureInfo getLicenseFeatureInfo(String p_feature) throws BBjAdminException Deprecated.Returns the license information for the specified feature.- Parameters:
p_feature
-- Throws:
BBjAdminException
-
getLicenseInformation
Returns information about the license used by BBjServices.- Returns:
- The license information.
- Throws:
BBjAdminException
- If there is a problem.
-
getLocaleString
Returns the Locale as a string.- Throws:
BBjAdminException
-
getMemoryUsageData
- Throws:
BBjAdminException
-
getMountedTriggerDirectories
Returns a list of the trigger directories that are currently mounted by the server. We keep track of directories that are mounted for triggers so that we can provide a nice interface to the user for looking at triggers. We only show those that are mounted because it would be too difficult to search the entire drive for all files that have a trigger on them. So, this is a convenience method.- Throws:
BBjAdminException
-
getOnlineCopyJobs
Get all currently running Online Copy Jobs.- Throws:
BBjAdminException
-
getOpenFile
Get the open file (read-only) with the specified ID.- Throws:
BBjAdminException
-
getOpenFiles
Get the set of open files (read-only).- Throws:
BBjAdminException
-
getOSFiles
List<BBjAdminClientOSFile> getOSFiles(BBjAdminClientOSFile p_parent, String[] p_filenameFilter, Date p_modifiedFilterStart, Date p_modifiedFilterEnd) throws BBjAdminException Returns a list of files from the operating system. This does NOT use the BBj filesystem handling code, but rather, looks at the files on the operating system.- Parameters:
p_parent
-p_filenameFilter
-p_modifiedFilterStart
-p_modifiedFilterEnd
-- Throws:
BBjAdminException
-
getPassword
Deprecated.Get the password of the user who got this BBjAdmin instance. THIS IS DEPRECATED. You should no longer use this method as it presents a security vulnerability to provide access to a user password once they've been authenticated.- Throws:
BBjAdminException
-
getRemoteConfiguration
Returns the configuration object for managing the remote-launch applications (including BUI) and settings on the server. This replaces the previous (and now deprecated) getBuiConfiguration() method.- Throws:
BBjAdminException
-
getReplicationJob
Returns the replication job running on the system that has the specified UUID.- Parameters:
p_uuid
-- Throws:
BBjAdminException
-
getReplicationJobs
Returns a list of the replication jobs currently running on the system.- Throws:
BBjAdminException
-
getReplicationTargets
Returns a list of the replication targets on the system. A replication target is a job that is replicating from a machine, to this machine.- Throws:
BBjAdminException
-
getRoots
Returns a list of all the roots or drives on the machine.- Throws:
BBjAdminException
-
getSecurityGroupNames
Returns a list of available security group names.- Throws:
BBjAdminException
-
getSecurityGroups
Returns a list of available security groups.- Throws:
BBjAdminException
-
getServerConfigurations
@Deprecated BBjAdminMap<BBjAdminServer.ServerType,BBjAdminSet<BBjAdminServer>> getServerConfigurations() throws BBjAdminExceptionDeprecated.Get the server configuration. Deprecated. @see BBjAdminBase.getServices()- Throws:
BBjAdminException
-
getServerConfigurations
@Deprecated BBjAdminSet<BBjAdminServer> getServerConfigurations(BBjAdminServer.ServerType p_type) throws BBjAdminException Deprecated.Get the server configurations for a single type of server. Deprecated. @see BBjAdminBase.getServices()- Parameters:
p_type
-- Throws:
BBjAdminException
-
getServices
Get the services configurations.- Throws:
BBjAdminException
-
getSingleUserPermissions
Get the permissions for a single user.- Parameters:
p_user
-- Throws:
BBjAdminException
-
getSQLConnections
Get the set of SQL connections (read-only).- Throws:
BBjAdminException
-
getStartTime
Returns the time that the currently running BBjServices was started as a formatted timestamp string including the timezone.- Throws:
BBjAdminException
-
getStartupExceptions
Returns a list of any startup exceptions that occured while BBj Services was attempting to start. If any server fails to start, a startup exception will be in this list for it.- Throws:
BBjAdminException
-
getSupportUploadJob
Returns an instance of BBjAdminSupportUploadJob containing the information about the current status of the specified upload job ID.- Parameters:
p_uploadId
-- Throws:
BBjAdminException
-
getSupportUploadJobs
Returns a list of all the currently running support upload jobs.- Throws:
BBjAdminException
-
getSystemProperty
Returns a system property from the server. Basically it is the equivalent to calling System.getProperty() on the server side.- Parameters:
p_property
-p_default
-- Throws:
BBjAdminException
-
getTableAnalysisJobs
Returns a list of the currently queued and/or running table analysis jobs on the server.- Returns:
- List of the queued and running table analysis jobs.
- Throws:
BBjAdminException
-
getTaskQueue
Returns a list of all the currently configured task groups on the server.- Returns:
- List of all the configured task groups.
- Throws:
BBjAdminException
-
getTemplateForFile
Returns a string template (if one can be found) for the specified data file. It searches all the databases to see if there is a table that points to the data file. If if finds one, it returns the string template for that table.- Parameters:
p_filename
-- Throws:
BBjAdminException
-
getTextFileContents
Returns the contents of the specified file from the remote machine as a string. This method is only designed to retrieve text based files.- Parameters:
p_fullPath
-- Throws:
BBjAdminException
-
getTokenInfo
Takes the specified token and returns the BBjAdminTokenInfo object containing the payload for the token. The token must be currently active.- Parameters:
p_tokenOrTokenId
- The token itself or the ID returned in a BBjAdminTokenInfo object.- Returns:
- The BBjAdminTokenInfo for the specified token.
- Throws:
BBjAdminException
-
getTokenValue
Returns the authorization token that was used to acquire this connection to the Admin API.- Returns:
- Authorization token used by this connection.
- Throws:
BBjAdminException
-
getTotalSpace
Returns the total space available on the specified root or drive.- Parameters:
p_path
-- Throws:
BBjAdminException
-
getTriggers
Get the trigger configuration for a file.- Parameters:
p_filename
-- Throws:
BBjAdminException
-
getUser
Get the name of the user who got this BBjAdmin instance.- Throws:
BBjAdminException
-
getUserNames
Get the names of users.- Throws:
BBjAdminException
-
getUserPermissions
Get the permissions for all users.- Throws:
BBjAdminException
-
getWebAppServer
Get the Web App Server configuration.- Throws:
BBjAdminException
-
getWebService
Returns the BBjAdminWebService instance for the specified service, or null if no service by that name exists.- Parameters:
p_name
-- Throws:
BBjAdminException
-
getWebServices
Returns a list of available web services.- Throws:
BBjAdminException
-
hardResetConfigCommit
void hardResetConfigCommit(String p_commitId, String p_name, String p_email) throws BBjAdminException Performs a hard reset of the configuration, returning it to the specified commit ID state. The directory will return to the exact state it was in at the time of the specified commit so any uncommitted changes to files will be lost.- Parameters:
p_commitId
- ID of the Git commit to which the state of the directory should return.p_name
- Name of the user committing the changes or null to use the default.p_email
- Email address of the user committing the changes or null to use the default.- Throws:
BBjAdminException
-
importReplicationJob
BBjAdminReplicationJob importReplicationJob(String p_filename, String p_user, String p_password) throws BBjAdminException Loads the contents of a replication job export file into the object. Note that this file must be located on the BBjServices machine and the path specified should be the path on that machine, as opposed to a client machine.- Parameters:
p_filename
-- Throws:
BBjAdminException
-
invalidateToken
Invalidates the specified token. The value specified can be either the token itself or the ID returned in a BBjAdminTokenInfo object.- Parameters:
p_tokenOrTokenId
- The token itself or the ID returned in a BBjAdminTokenInfo object.- Throws:
BBjAdminException
-
isAddressSameAsServer
Returns true if the specified host address resolves to the same address as the machine running the Admin Server.- Parameters:
p_address
-- Throws:
BBjAdminException
-
isAdminOnlyMode
Asks the server if it is currently set to admin only mode. If you need to know if the server is currently running in admin only mode, call isRunningAdminOnlyMode() instead.- Throws:
BBjAdminException
-
isOSWindows
Returns true if the server side OS is MS Windows of some type. Otherwise it returns false. Since Mac follows Unix path and other information of that nature we typically are only concerned with whether it is Windows or Mac/Unix. If you need detailed OS information, access this by calling the getServerConfiguration() method, and then calling the getAdminProperties() method on the BBjAdminServerConfiguration instance.- Throws:
BBjAdminException
-
isReplicationAllowed
Asks the server if it is allowed to peform replication jobs.- Throws:
BBjAdminException
-
isSAM
Checks to verify that the server has a valid Software Asset Management license available. This is really only used by the Enterprise Manager.- Returns:
- True if SAM is available.
- Throws:
BBjAdminException
-
isRunningAdminOnlyMode
Asks the server if it is currently RUNNING in admin only mode.- Throws:
BBjAdminException
-
isServiceRunning
Returns true if the specified service is running.- Parameters:
p_config
-- Throws:
BBjAdminException
-
isSqlServerSecure
Returns true or false as to whether the SQL engine server is using SSL.- Returns:
- True if SSL is configured. False otherwise.
- Throws:
BBjAdminException
-
isWS3Allowed
Checks if Version 3 WebServices are available.- Returns:
- a boolean value
- Throws:
BBjAdminException
-
jsonExecute
Executes some server-side processing defined by the supplied JSON string. The result should be another JSON string.- Parameters:
json
-- Returns:
- a JSON String
- Throws:
BBjAdminException
-
migrateToEnhancedDatabase
void migrateToEnhancedDatabase(String p_sourceDatabase, String p_destinationDatabase, String p_destinationDirectory) throws BBjAdminException Creates a new data dictionary in the specified format at the specified destination location using the dictionary at p_sourceDictionary. This Allows you to create a new-format data dictionary.- Parameters:
p_sourceDatabase
-p_destinationDatabase
-p_destinationDirectory
-- Throws:
BBjAdminException
-
mountTriggerDirectory
Mounts a directory to be listed when asking for a list of mounted trigger directories. See getMountedTriggerDirectories() for more information.- Parameters:
p_fullPath
-- Throws:
BBjAdminException
-
newConnectionPool
Returns a new connection pool definition.- Throws:
BBjAdminException
-
newDatabaseInstance
Returns a new, empty database instance. Call commit() on the BBjAdminDatabase instance to save the changes you make to it.- Throws:
BBjAdminException
-
newEmailService
Creates and returns a new Email Service that provides the ability to send email messages using the Admin API or easily configure various parts of the system to send notifications via email such as replication problems, etc.- Returns:
- New Email Service instance.
- Throws:
BBjAdminException
-
newLDAPSearch
Returns a new, blank LDAP search instance.- Throws:
BBjAdminException
-
newSecurityGroup
Returns a new SecurityGroup instance.- Parameters:
p_groupName
-- Throws:
BBjAdminException
-
newTask
Returns a new task of the specified type.- Parameters:
p_type
-- Throws:
BBjAdminException
-
newTaskGroup
Returns a new task group from the server.- Throws:
BBjAdminException
-
receiveDictionaryFiles
- Throws:
BBjAdminException
-
reconfigureServices
This method can be called to reconfigure the services. This checks the current configurations and starts/stops/restarts any services as necessary to apply the configuration changes. This method can be used to stop or start a service after configuration changes have been made. Keep in mind that it applies to all configured services. So, if any configuration changes were made to any services, those changes will be applied.- Throws:
BBjAdminException
-
refresh
Refresh properties that may have changed on the server, locally changed properties will not be overridden.- Throws:
BBjAdminException
-
release
void release()Release resources held. -
reloadDatabaseConfig
Reload the Database configuration file.- Throws:
BBjAdminException
-
removeBuiApplication
Removes the specified BUI application configuration.- Parameters:
p_name
-- Throws:
BBjAdminException
-
removeConnectionPool
Removes the specified connection pool from the server.- Parameters:
p_poolName
-- Throws:
BBjAdminException
-
removeEmailService
Removes the specified email service configuration from the server.- Parameters:
p_name
-- Throws:
BBjAdminException
-
removeReplicationJob
Removes the replication job identified by the specified UUID or name.- Parameters:
p_uuidOrName
-p_erase
-- Throws:
BBjAdminException
-
removeAsynchTriggerJob
Removes the asynchronous trigger job identified by the specified UUID or name.- Parameters:
p_uuidOrName
- UUID or name for the trigger job.- Throws:
BBjAdminException
-
removeReplicationTarget
Removes the replication target identified by the specified UUID.- Parameters:
p_uuid
- ID for the replication target.p_erase
- True if you want the target(destination) replicated files removed. False otherwise.- Throws:
BBjAdminException
-
removeService
Removes the specified service configuration. This only applies to "general" servers such as SQL, Filesystem, XCALL, Admin, PRO/5 DS, and MMP.- Parameters:
p_service
- Service to remove.- Throws:
BBjAdminException
-
removeTaskGroup
Removes the specified task group from the server.- Parameters:
p_group
-- Throws:
BBjAdminException
-
removeTriggers
Removes the trigger from the specified file. Does not simply disable it, but actually removes the trigger definition file for that particular file.- Parameters:
p_filename
-- Throws:
BBjAdminException
-
removeWebService
Removes the specified web service from the server.- Parameters:
p_name
-- Throws:
BBjAdminException
-
setAutoRenewToken
- Throws:
BBjAdminException
-
renewToken
Renews the current token for that Admin API connection setting the duration of validity to the value specified in p_duration. To use the default value configured for the server, specify 0.- Parameters:
p_duration
- The duration of the validity of the new token. 0 uses the default duration configured for the server. Note: You cannot set a duration that exceeds the default configured for the server. No exception is thrown, but it will simply defer to the default value.- Returns:
- Renews the current token for the Admin API connection and returns the new token.
- Throws:
BBjAdminException
- If there is a problem or if the provided token is no longer valid/expired.
-
renewToken
Renews the current token for that Admin API connection setting the duration of validity to the value specified in p_duration. To use the default value configured for the server, specify 0.- Parameters:
p_duration
- The duration of the validity of the new token. 0 uses the default duration configured for the server. Note: You cannot set a duration that exceeds the default configured for the server. No exception is thrown, but it will simply defer to the default value.p_invalidateOld
- If true, this will invalidate the old token and remove it from the list.- Returns:
- Renews the current token for the Admin API connection and returns the new token.
- Throws:
BBjAdminException
- If there is a problem or if the provided token is no longer valid/expired.
-
renewToken
Renews the current token for that Admin API connection setting the duration of validity to the value specified in p_duration. To use the default value configured for the server, specify 0.- Parameters:
p_token
- The token to renew. The token must be currently valid or an exception will be thrown.p_duration
- The duration of the validity of the new token. 0 uses the default duration configured for the server. Note: You cannot set a duration that exceeds the default configured for the server. No exception is thrown, but it will simply defer to the default value.- Returns:
- Renews the current token for the Admin API connection and returns the new token.
- Throws:
BBjAdminException
- If there is a problem or if the provided token is no longer valid/expired.
-
restartBBjServices
Tells the remote BBj Services to shutdown and restart.- Parameters:
p_waitForClients
-- Throws:
BBjAdminException
-
setAdminOnlyMode
Tells the server to set itself into admin only mode the next time it is restarted. Subsequent restarts will come back in normal mode.- Parameters:
p_adminOnly
-- Throws:
BBjAdminException
-
setAutorunConfiguration
Set the autorun configuration (not committed).- Parameters:
p_autorun
- New autorun configuration.- Throws:
BBjAdminException
-
setClasspath
Sets the list of items that make up the specified named classpath. Use empty string for the default classpath or specify a valid sessions specific classpath (SSCP) name.- Parameters:
p_cpName
-p_values
-- Throws:
BBjAdminException
-
setReplicationJobEnabled
Enables/Disables the specified replication job. This is essentially a pause/resume feature that can be used to take a snapshot of the destination replicated database.- Parameters:
p_replicationID
-p_enabled
-- Throws:
BBjAdminException
-
setServerConfigurations
@Deprecated void setServerConfigurations(BBjAdminMap<BBjAdminServer.ServerType, BBjAdminSet<BBjAdminServer>> p_config) throws BBjAdminExceptionDeprecated.Set the server configuration (not committed). Deprecated. @see BBjAdminBase.setServices().- Parameters:
p_config
-- Throws:
BBjAdminException
-
setServerConfigurations
@Deprecated void setServerConfigurations(BBjAdminServer.ServerType p_type, BBjAdminSet<BBjAdminServer> p_servers) throws BBjAdminException Deprecated.Set the server configurations for a single type of server (not committed). Deprecated. @see BBjAdminBase.setServices().- Parameters:
p_type
-p_servers
-- Throws:
BBjAdminException
-
setServices
Sets the services configurations.- Parameters:
p_configs
-- Throws:
BBjAdminException
-
setSingleUserPermissions
Set an individual user's permissions (not committed).- Parameters:
p_permissions
-- Throws:
BBjAdminException
-
setTableAnalysisEnabled
Enables or disabled the ability to perform a table analysis on the specified database. It does not change the database configuration (this should be done with the BBjAdminDatabase object property). If BBj Services is restarted, this setting returns to the default of "true".- Parameters:
p_database
- Name of database to enable or disable.p_enabled
- True if analysis should be allowed to perform, or false to disable all analysis operations on this database.- Throws:
BBjAdminException
-
setTriggers
Set the trigger configuration for a file (not committed).- Parameters:
p_triggers
-- Throws:
BBjAdminException
-
setUserPermissions
void setUserPermissions(BBjAdminSet<BBjAdminUserPermissions> p_permissions) throws BBjAdminException Set permissions for a whole set of users (not committed).- Parameters:
p_permissions
-- Throws:
BBjAdminException
-
shutdownBBjServices
Tells BBj Services to shutdown.- Parameters:
p_waitForClients
- True if you want it to wait for clients to disconnect before shutting down.- Throws:
BBjAdminException
-
startDatabaseReloadHelper
- Throws:
BBjAdminException
-
startOnlineCopyJob
BBjAdminOnlineCopyJobRun startOnlineCopyJob(BBjAdminOnlineCopyJobConfig p_config) throws BBjAdminException Start an online copy job. The BBjAdminOnlineCopyJobRun instance returned by this method provides access to the finish(), abort() and getProgress() methods to interact with the running job.- Parameters:
p_config
-- Throws:
BBjAdminException
-
startService
Deprecated.Starts the specified service if not running.- Parameters:
p_config
- BBjAdminServerConfig instance to stop.- Throws:
BBjAdminException
-
stopService
Stops the specified service if running.- Parameters:
p_config
- BBjAdminServerConfig instance to stop.- Throws:
BBjAdminException
-
testJdbcConnection
void testJdbcConnection(String p_driver, String p_url, String p_user, String p_password) throws BBjAdminException Tests connecting with the specified JDBC driver, URL, user and password from the server. This is generally used to test linked database connection information.- Parameters:
p_driver
-p_url
-p_user
-p_password
-- Throws:
BBjAdminException
-
testRemoteFilesystemAccessibility
void testRemoteFilesystemAccessibility(String p_host, int p_port, boolean p_ssl, String p_user, String p_password) throws BBjAdminException Called to test and see if the server can connect to the specified remote filesystem.- Parameters:
p_host
-p_port
-p_ssl
-p_user
-p_password
-- Throws:
BBjAdminException
-
unmountTriggerDirectory
Unmounts a trigger directory. See mountTriggerDirectory() and getMountedTriggerDirectories() for more information.- Parameters:
p_fullPath
-- Throws:
BBjAdminException
-
unpinAllPrograms
Unpin all programs.- Throws:
BBjAdminException
-
updateEventManager
- Throws:
BBjAdminException
-
updateReplicationJob
Updates the replication job on the server with the same ID, with the information in the specified replication job.- Parameters:
job
-- Throws:
BBjAdminException
-
uploadSupportFiles
String uploadSupportFiles(BBjAdminSet<String> p_files, BBjAdminMap<String, String> p_properties) throws BBjAdminExceptionSend the specified list of files to support. The list of files from the server will be zipped up, server side, and sent to the support upload site. It will include information such as the sender email address, attention of email, support incident ID and a message.- Parameters:
p_properties
-- Returns:
- Unique identifier for this upload job. This ID will be used to check progress.
- Throws:
BBjAdminException
-
useExistingWebStartCertificate
void useExistingWebStartCertificate(String p_keystore, String p_keystorePassword, String p_privateKey, String p_privateKeyPassword) throws BBjAdminException Configures BBj Services to use the specified certificate for Web start applications.- Parameters:
p_keystore
-p_keystorePassword
-p_privateKey
-p_privateKeyPassword
-- Throws:
BBjAdminException
-
setUser2FASettings
void setUser2FASettings(String p_user, String p_secretKey, boolean p_enabled) throws BBjAdminException Enables/disables TOTP 2 factor authentication for the specified user. NOTE: Once enabled, the user will not be able to login without also providing the TOTP code valid at the time of the login attempt.- Parameters:
p_user
- User to enable/disable TOTPp_secretKey
- Provide a valid key generated by calling generateTotpSecretKey(). Set to null to disable TOTP for the user.p_enabled
- Whether 2FA is enabled for this user. Only applies if 2FA is enabled at the global level. This allows the admin to disable it for some users.- Throws:
BBjAdminException
- If there is a problem.
-
generate2FASecretKey
Generates a secret key to use for TOTP and the Google Authenticator app.- Throws:
BBjAdminException
-
isUser2FA
Checks to see if the specified user is using TOTP 2 factor authentication.- Parameters:
p_user
- User to check.- Returns:
- True if the user is using TOTP 2 factor authentication.
- Throws:
BBjAdminException
-
check2FACode
boolean check2FACode(String p_secretKey, String p_code, long p_validitySeconds) throws BBjAdminException Checks to see if the specified code is valid given the specified secret key and the validity in seconds used to generate the secret key. The validity in seconds must match the validity in seconds used when calling generateTotpSecretKey().- Parameters:
p_secretKey
- Secret key used to generate the code.p_code
- The code.p_validitySeconds
- The validity in seconds used to generate the secret key when calling getTotpCode().- Returns:
- True if the code is valid. False otherwise.
- Throws:
BBjAdminException
-
get2FACode
Generates a new TOTP code based on the secret key and validity in seconds. Note that the validity in seconds must match when making calls to checkTotpCode().- Parameters:
p_secretKey
- Secret key used to generate the code.p_validitySeconds
- The validity in seconds used to generate the secret key when calling generateTotpSecretKey().- Throws:
BBjAdminException
-
send2FACode
Sends the specified user a 2-factor authentication code via email. If the user is not set up to receive 2FA codes via email, the user does not have their email address configured, or if the default 2FA settings for BBjServices are disabled or not set up to send codes via email, the method returns false.- Parameters:
p_user
- User to send the code to.- Returns:
- True if a code was successfully sent. False if it was unable or not supposed to send a code to the user.
- Throws:
BBjAdminException
- If there is some kind of error that occurs during the process.
-
send2FASetupEmail
Once 2-factor authorization is enabled in the EM or Admin API, this call will send an email to each user in the specified list of usernames with any setup instructions (e.g. information to download the TOTP app used by your organization, a QR code, etc. See the template file multifactor-auth-template.html located in the BBj install cfg directory to customize the message and layout.- Parameters:
p_subject
- Subject to include for the email sent to users.p_usernames
- Set of usernames to send the email to.- Throws:
BBjAdminException
-
setUserInfo
Sets additional user info such as first/last/middle name, email, text number, etc.- Parameters:
p_info
-- Throws:
BBjAdminException
-
setUserInfo
Sets additional user info such as first/last/middle name, email, text number, etc. for a list of users in bulk.- Parameters:
p_infos
- List of BBjAdminUser objects to set the values for in bulk.- Throws:
BBjAdminException
-
getUserInfo
Returns additional user info for the specified user.- Parameters:
p_user
-- Throws:
BBjAdminException
-
getUsers
Returns a list of all users including their additional info such as name, email, etc.- Returns:
- List of all the users.
- Throws:
BBjAdminException
-
validate2FACode
Validates the specified 2FA code for the user who created this Admin API object.- Parameters:
p_code
- 2FA code to validate.- Returns:
- True if the code is valid as of the time of this call. False if not.
- Throws:
BBjAdminException
-
generateKeyPair
Generates a public/private key pair. BBjServices will store the public key while this method returns the private key. Make sure to keep the private key because it cannot be retrieved again and the server does not keep a record of it. The string returned is a string representation of a JSON document containing the private key. This should be stored in a plain text file name private-key in a subdirectory named .bbj under the user's home directory.- Parameters:
p_user
- User to generate the key for. If the user does not have server config permissions, they will only have the ability to generate a key for themselves.p_description
- A description for the key pair to use for bookkeeping purposes.- Returns:
- The private key.
- Throws:
BBjAdminException
-
getPublicKeys
Returns a list of all the public key info available on the server for the specified user.- Parameters:
p_username
- Return the keys for the specified username.- Returns:
- List of key information for the user.
- Throws:
BBjAdminException
-
getPublicKeys
Returns a list of all the public key info available on the server for all users. If the user does not have admin permissions, they will only see their own keys.- Returns:
- List of key information for all visible users.
- Throws:
BBjAdminException
-
removePublicKey
Removes the specified public key if present.- Parameters:
p_username
- User the key belongs to.p_publicKeyId
- The ID for the public key.- Throws:
BBjAdminException
-
removeAllPublicKeys
Removes all the public keys for the specified user. Note that only an admin with the ability to add/remove user accounts can remove the keys for another user. Anyone else may only remove their own keys.- Parameters:
p_username
- Username for the public keys to remove.- Throws:
BBjAdminException
-
notifyProcess
Sends a notification to the specified process where it will pop up a message box to display to display the provided message and title to the user of that process.- Parameters:
p_id
- BBj process ID (INFO 3,0)p_message
- Message to display.p_title
- Title for the message dialog.- Throws:
BBjAdminException
- If there is a problem.
-
notifyAllProcesses
Sends a notification to all running processes where it will pop up a message box to display to display the provided message and title to the user of that process.- Parameters:
p_message
- Message to display.p_title
- Title for the message dialog.- Throws:
BBjAdminException
- If there is a problem.
-
createDownloadPackage
Used to combine the specified list of files into a zip file that can be downloaded from the returned URL. Once the file is downloaded, it will be deleted from the server.- Parameters:
p_files
- List of files to include in the zip package. Must include full paths.- Returns:
- URL for the path to download the file from Jetty.
- Throws:
BBjAdminException
-
getLanguageServer
Returns the configuration information for the BBj Language Server.- Returns:
- Throws:
BBjAdminExcpetion
BBjAdminException
-
setLanguageServerConfiguration
Updates the configuration for the BBj Language Server.- Parameters:
p_service
-- Throws:
BBjAdminException
-
startLanguageServer
Start the BBj Language Server using the current configuration.- Throws:
BBjAdminException
-
stopLanguageServer
Stop the BBj Language Server.- Throws:
BBjAdminException
-
convertFiles
Converts the list of full paths to files on the BBjServices server to the specified file type.- Parameters:
p_files
-p_targetType
-- Throws:
BBjAdminException
-
createRemoteApplication()