Package com.basis.api.admin
Class BBjAdminFactory
java.lang.Object
com.basis.api.admin.BBjAdminFactory
Factory class for BBjAdmin.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getAuthToken
(String p_user, String p_password) Get an authentication token from the local BBjServices.static String
Get an authentication token from the local BBjServices.static String
getAuthToken
(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password, Locale p_locale, long p_duration, Map<String, Object> p_payload) Get an authentication token for a remote BBjServices on the specified port.static String
getAuthToken
(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password, Locale p_locale, String p_keystore, String p_keypass, long p_duration, Map<String, Object> p_payload) static String
getAuthToken
(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password, long p_duration, Map<String, Object> p_payload) Get an authentication token for a remote BBjServices on the specified port.static String
getAuthToken
(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password, String p_keystore, String p_keypass, long p_duration, Map<String, Object> p_payload) Get an authentication token for a remote BBjServices on the specified port.static String
getAuthToken
(InetAddress p_host, String p_user, String p_password) Get an authentication token for a connection to a remote BBjServices on the default port.static String
getAuthToken
(InetAddress p_host, String p_user, String p_password, long p_duration, Map<String, Object> p_payload) Get an authentication token for a connection to a remote BBjServices on the default port.static BBjAdminBase
getBBjAdmin
(String p_authorizationToken) Get a default BBjAdmin object.static BBjAdminBase
getBBjAdmin
(String p_user, String p_password) Get a default BBjAdmin object.static BBjAdminBase
getBBjAdmin
(String p_user, String p_password, InetAddress p_serverHost, int p_serverPort, InetAddress p_clientHost, int p_clientPort) Get a default BBjAdmin object.static BBjAdminBase
getBBjAdmin
(String p_user, String p_password, InetAddress p_serverHost, int p_serverPort, InetAddress p_clientHost, int p_clientPort, Locale p_locale) Get a default BBjAdmin object.static BBjAdminBase
getBBjAdmin
(String p_user, String p_password, Locale p_locale) Get a default BBjAdmin object.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_authorizationToken) Get a BBjAdmin object for a remote BBjServices on the specified port.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password) Get a BBjAdmin object for a remote BBjServices on the specified port.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password, String p_keystore, String p_keypass) Get a BBjAdmin object for a remote BBjServices on the specified port.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password, Locale p_locale) Get a BBjAdmin object for a remote BBjServices on the specified port.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password, Locale p_locale, String p_keystore, String p_keypass) Get a BBjAdmin object for a remote BBjServices on the specified port.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password, Locale p_locale, String p_keystore, String p_keypass, String p_2FACode) Get a BBjAdmin object for a remote BBjServices on the specified port.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, int p_port, boolean p_ssl, String p_token) static BBjAdminBase
getBBjAdmin
(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password) Get a BBjAdmin object for a remote BBjServices on the specified port.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password, String p_keystore, String p_keypass) Get a BBjAdmin object for a remote BBjServices on the specified port.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password, Locale p_locale) Get a BBjAdmin object for a remote BBjServices on the specified port.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password, Locale p_locale, String p_keystore, String p_keypass) Get a BBjAdmin object for a remote BBjServices on the specified port.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, String p_authorizationToken) Get a BBjAdmin object for a remote BBjServices on the default port.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, String p_user, String p_password) Get a BBjAdmin object for a remote BBjServices on the default port.static BBjAdminBase
getBBjAdmin
(InetAddress p_host, String p_user, String p_password, Locale p_locale) Get a BBjAdmin object for a remote BBjServices on the default port.static BBjAdminBase
getBBjAdminWith2FA
(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password, String p_2FACode) Get a BBjAdmin object for a remote BBjServices on the specified port.static BBjAdminBase
getBBjAdminWithTotp
(InetAddress p_host, int p_port, boolean p_ssl, String p_authToken, String p_2FACode) Get a BBjAdmin object for a remote BBjServices on the specified port.static void
static String
renewAuthToken
(String p_authorizationToken) Get a default BBjAdmin object.static String
renewAuthToken
(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_authorizationToken, Locale p_locale) Get a BBjAdmin object for a remote BBjServices on the specified port.static String
renewAuthToken
(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_authorizationToken, Locale p_locale, String p_keystore, String p_keypass) static String
renewAuthToken
(InetAddress p_host, int p_port, boolean p_ssl, String p_authorizationToken) Get a BBjAdmin object for a remote BBjServices on the specified port.static String
renewAuthToken
(InetAddress p_host, int p_port, boolean p_ssl, String p_authorizationToken, String p_keystore, String p_keypass) Get a BBjAdmin object for a remote BBjServices on the specified port.static String
renewAuthToken
(InetAddress p_host, String p_authorizationToken) Get a BBjAdmin object for a remote BBjServices on the default port.
-
Field Details
-
BBJADMIN_REMOTE_HANDLE
- See Also:
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT- See Also:
-
PROTOCOL_VERSION
public static final int PROTOCOL_VERSION- See Also:
-
-
Constructor Details
-
BBjAdminFactory
public BBjAdminFactory()
-
-
Method Details
-
getAuthToken
public static String getAuthToken(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password, Locale p_locale, long p_duration, Map<String, Object> p_payload) throws BBjAdminExceptionGet an authentication token for a remote BBjServices on the specified port.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_timeout
- Connection timeout in milliseconds. A timeout of less than or equal to 0 disables the timeout.p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
-
getAuthToken
public static String getAuthToken(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password, Locale p_locale, String p_keystore, String p_keypass, long p_duration, Map<String, Object> p_payload) throws BBjAdminException- Throws:
BBjAdminException
-
getAuthToken
public static String getAuthToken(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password, long p_duration, Map<String, Object> p_payload) throws BBjAdminExceptionGet an authentication token for a remote BBjServices on the specified port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
-
getAuthToken
public static String getAuthToken(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password, String p_keystore, String p_keypass, long p_duration, Map<String, Object> p_payload) throws BBjAdminExceptionGet an authentication token for a remote BBjServices on the specified port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_user
- User name.p_password
- User password.p_keystore
- Keystore for SSL/TLS certificate validation (null uses default validation).p_keypass
- Password for keystore.- Throws:
BBjAdminException
-
getAuthToken
public static String getAuthToken(InetAddress p_host, String p_user, String p_password) throws BBjAdminException Get an authentication token for a connection to a remote BBjServices on the default port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
- If there is a problem or authentication fails.
-
getAuthToken
public static String getAuthToken(InetAddress p_host, String p_user, String p_password, long p_duration, Map<String, Object> p_payload) throws BBjAdminExceptionGet an authentication token for a connection to a remote BBjServices on the default port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_user
- User name.p_password
- User password.p_duration
- Duration in minutes that the token will be valid. If higher than the default configured for the server it will defer to the default value. Zero uses the default value.p_payload
- Optional additional payload to add to the token.- Throws:
BBjAdminException
- If there is a problem or authentication fails.
-
getAuthToken
Get an authentication token from the local BBjServices. Typically used in BBj applications.- Parameters:
p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
-
getAuthToken
public static String getAuthToken(String p_user, String p_password, long p_duration, Map<String, Object> p_payload) throws BBjAdminExceptionGet an authentication token from the local BBjServices. Typically used in a BBj application.- Parameters:
p_user
- User name.p_password
- User password.p_duration
- Duration in minutes that the token will be valid. If higher than the default configured for the server it will defer to the default value. Zero uses the default value.p_payload
- Optional additional payload to add to the token.- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_authorizationToken) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_timeout
- Connection timeout in milliseconds. A timeout of less than or equal to 0 disables the timeout.p_authorizationToken
- Token identifying the user. This should be acquired via a call to getAuthToken().- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_timeout
- Connection timeout in milliseconds. A timeout of less than or equal to 0 disables the timeout.p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password, Locale p_locale) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_timeout
- Connection timeout in milliseconds. A timeout of less than or equal to 0 disables the timeout.p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password, Locale p_locale, String p_keystore, String p_keypass) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_timeout
- Connection timeout in milliseconds. A timeout of less than or equal to 0 disables the timeout.p_user
- User name.p_password
- User password.p_keystore
- Keystore for SSL/TLS certificate validation (null uses default validation).p_keypass
- Password for keystore.- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password, Locale p_locale, String p_keystore, String p_keypass, String p_2FACode) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_timeout
- Connection timeout in milliseconds. A timeout of less than or equal to 0 disables the timeout.p_user
- User name.p_password
- User password.p_keystore
- Keystore for SSL/TLS certificate validation (null uses default validation).p_keypass
- Password for keystore.p_2FACode
- 2-factor authentication code for users requiring it. Null otherwise.- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_user, String p_password, String p_keystore, String p_keypass) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_timeout
- Connection timeout in milliseconds. A timeout of less than or equal to 0 disables the timeout.p_user
- User name.p_password
- User password.p_keystore
- Keystore for SSL/TLS certificate validation (null uses default validation).p_keypass
- Password for keystore.- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, int p_port, boolean p_ssl, String p_token) throws BBjAdminException - Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
-
getBBjAdminWith2FA
public static BBjAdminBase getBBjAdminWith2FA(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password, String p_2FACode) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port. This is used for user accounts that require a 2FA code to complete authorization. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
-
getBBjAdminWithTotp
public static BBjAdminBase getBBjAdminWithTotp(InetAddress p_host, int p_port, boolean p_ssl, String p_authToken, String p_2FACode) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port. This is used for user accounts that require a TOTP code to complete authorization. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_authToken
- Authorization token.p_2FACode
- 2-factor authentication code- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password, Locale p_locale) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password, Locale p_locale, String p_keystore, String p_keypass) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_user
- User name.p_password
- User password.p_keystore
- Keystore for SSL/TLS certificate validation (null uses default validation).p_keypass
- Password for keystore.- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, int p_port, boolean p_ssl, String p_user, String p_password, String p_keystore, String p_keypass) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_user
- User name.p_password
- User password.p_keystore
- Keystore for SSL/TLS certificate validation (null uses default validation).p_keypass
- Password for keystore.- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, String p_authorizationToken) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the default port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_authorizationToken
- Token identifying the user. This should be acquired via a call to getAuthToken().- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, String p_user, String p_password) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the default port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(InetAddress p_host, String p_user, String p_password, Locale p_locale) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the default port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
-
getBBjAdmin
Get a default BBjAdmin object. This is primarily used to get a local BBjAdmin object when running in the same JVM as BBjServices.- Parameters:
p_authorizationToken
- Token identifying the user. This should be acquired with a call to getAuthToken().- Throws:
BBjAdminException
-
getBBjAdmin
Get a default BBjAdmin object. This is primarily used to get a local BBjAdmin object when running in the same JVM as BBjServices.- Parameters:
p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(String p_user, String p_password, InetAddress p_serverHost, int p_serverPort, InetAddress p_clientHost, int p_clientPort) throws BBjAdminException Get a default BBjAdmin object. This is primarily used to get a local BBjAdmin object when running in the same JVM as BBjServices.- Parameters:
p_user
- User name.p_password
- User password.p_serverHost
-p_serverPort
-p_clientHost
-p_clientPort
-- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(String p_user, String p_password, InetAddress p_serverHost, int p_serverPort, InetAddress p_clientHost, int p_clientPort, Locale p_locale) throws BBjAdminException Get a default BBjAdmin object. This is primarily used to get a local BBjAdmin object when running in the same JVM as BBjServices.- Parameters:
p_user
- User name.p_password
- User password.p_serverHost
-p_serverPort
-p_clientHost
-p_clientPort
-- Throws:
BBjAdminException
-
getBBjAdmin
public static BBjAdminBase getBBjAdmin(String p_user, String p_password, Locale p_locale) throws BBjAdminException Get a default BBjAdmin object. This is primarily used to get a local BBjAdmin object when running in the same JVM as BBjServices.- Parameters:
p_user
- User name.p_password
- User password.- Throws:
BBjAdminException
-
renewAuthToken
public static String renewAuthToken(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_authorizationToken, Locale p_locale) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_timeout
- Connection timeout in milliseconds. A timeout of less than or equal to 0 disables the timeout.p_authorizationToken
-- Throws:
BBjAdminException
-
renewAuthToken
public static String renewAuthToken(InetAddress p_host, int p_port, boolean p_ssl, int p_timeout, String p_authorizationToken, Locale p_locale, String p_keystore, String p_keypass) throws BBjAdminException - Throws:
BBjAdminException
-
renewAuthToken
public static String renewAuthToken(InetAddress p_host, int p_port, boolean p_ssl, String p_authorizationToken) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_authorizationToken
-- Throws:
BBjAdminException
-
renewAuthToken
public static String renewAuthToken(InetAddress p_host, int p_port, boolean p_ssl, String p_authorizationToken, String p_keystore, String p_keypass) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the specified port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_port
- Remote port.p_ssl
- Should we use SSL to connect?p_authorizationToken
-p_keystore
- Keystore for SSL/TLS certificate validation (null uses default validation).p_keypass
- Password for keystore.- Throws:
BBjAdminException
-
renewAuthToken
public static String renewAuthToken(InetAddress p_host, String p_authorizationToken) throws BBjAdminException Get a BBjAdmin object for a remote BBjServices on the default port. This uses the default timeout of five seconds.- Parameters:
p_host
- Remote host.p_authorizationToken
- Token to be renewed.- Throws:
BBjAdminException
-
renewAuthToken
Get a default BBjAdmin object. This is primarily used to get a local BBjAdmin object when running in the same JVM as BBjServices.- Parameters:
p_authorizationToken
- Token to be renewed.- Throws:
BBjAdminException
-
main
-