BBjAdmin

Description

In BBj 5.0 and higher, the BBjAdmin object provides programmatic access to the global BBjServices configuration. This may affect other BBj clients.

Creation

BBjAPI > BBjAdmin

The BBjAdmin object is created through the following BBjAPI object method:

Return Value

Method

BBjAdmin

getAdmin(string user, string password)

Methods of BBjAdmin

Return Value

Method

void

addUser(string userName, string password)

void

changePassword(string userName, string newPassword)

string

getDatabaseGlobal(string databaseName, string propertyName)

BBjAdminEnvironment

getEnvironment()

BBjVector

getJdbcOdbcConnections()

BBjJettyServer

getJettyServer()

BBjJettyServerConfiguration

getJettyServerConfig()

BBjVector

getOpenFileInfos()

int

getPermission(string username, int type)

BBjVector

getQueryAnalysisInfo()

BBjServletRegistry

getServletRegistry()

BBjAppServer

getWebAppServer()

void

release()

void

reloadDBConfig()

void

removeDatabaseGlobal(string databaseName,string propertyName)

void

removeUser(string userName)

void

setDatabaseGlobal(string databaseName, string propertyName, string value)

void

setPermission(string username, int type, int allow)

Constants

Option Value Description

Add User

BBjAdmin.ADD_USER

The user is allowed to create new user accounts.

Admin Access

BBjAdmin.ALLOW_ADMIN

The user is allowed to use the Enterprise Manager. If a user does not have this permission, they will not be able to log in to the Enterprise Manager.

Attach Existing DB

BBjAdmin.ATTACH_EXISTING_DB

The user is allowed to create a new database link by attaching to an existing set of data dictionary files.

BBj Processes

BBjAdmin.PROCESSES

The user is allowed to view the list of BBj Processes and terminate any of those processes.

Connection Pools

BBjAdmin.CONNECTION_POOLS

User is allowed to create, remove and modify JDBC connection pools that can be used from BBj applications.

Create New DB

BBjAdmin.CREATE_NEW_DB

The user is allowed to create a new database entirely from scratch.

Create Trigger

BBjAdmin.CREATE_NEW_TRIGGER

The user is allowed to create and drop triggers using the Enterprise Manager or via SQL.

Drop DB

BBjAdmin.DELETE_DB

The user is allowed to drop a database from the system including its data dictionary files and data files.

Force Close Open Data Files

BBjAdmin.FORCE_CLOSE_FILES

User can force open files to be closed.

Online Copy Jobs

BBjAdmin.COPY_JOBS

User is allowed to create, modify, run and terminate online copy jobs.

Remove User

BBjAdmin.DELETE_USER

The user is allowed to remove any user account except the "admin" account.

Replication Jobs

BBjAdmin.REPLICATION

User is allowed to create, modify, pause and terminate replication jobs.

Server Config

BBjAdmin.SERVER_CONFIG

The user is allowed to make changes to the server configuration (see Enterprise Manager - Server Information).

Set Passwords

BBjAdmin.SET_PASSWORDS

The user is allowed to set/change the password on other user accounts.

Set Permissions

BBjAdmin.SET_PERMISSIONS

The user is allowed to set these permissions for other user accounts.

SQL Connections

BBjAdmin.JDBC_CONNECTIONS

The user is allowed to view the list of ODBC/JDBC SQL connections and close any of those connections.

Table Analysis Queue

BBjAdmin.TABLE_ANALYSIS_QUEUE

User is allowed to view tables currently in the table analysis queue as well as stop table analysis if necessary.

View Open Files

BBjAdmin.OPEN_FILES

The user is allowed to view the list of currently open files in BBj. The can also force close any of these files.

Example

REM Obtain the instance of the BBjAdmin object
INPUT "Enter an Administrator User: ",user$
INPUT "Enter a password: ",password$
admin!=BBjAPI().getAdmin(user$, password$)

See Also

BBjAPI

BBj Object Variables

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