public interface DominoClient extends IAdaptable, AutoCloseable
| Modifier and Type | Interface and Description |
|---|---|
static class |
DominoClient.ECLType
Types of ECL settings
|
static class |
DominoClient.Encryption
Available encryption strengths for database creation
|
static interface |
DominoClient.IBreakHandler
Implement this method to send break signals to long running operations
|
static interface |
DominoClient.IProgressListener
Definition of function that will handle the progress bar signal.
The progress signal handler displays a progress bar. The progress position will generally start at 0 and end at Range. The current progress supplied is either absolute ( DominoClient.IProgressListener.setPos(long)) or a delta from the
previous progress state (DominoClient.IProgressListener.setDeltaPos(long)).As the operation which is supplying progress information is performed, the range may change. If it does, an additional DominoClient.IProgressListener.setRange(long) will be signaled. |
static interface |
DominoClient.LifecycleListener
Interface for subscribing to
DominoClient lifecycle events. |
static interface |
DominoClient.NotesReplicationStats
Replication statistics
|
static class |
DominoClient.OpenDatabase
Enum for options for opening the database, if the specified database is not currently available
|
static interface |
DominoClient.ReplicationStateListener
Listener to get replication progress
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLifecycleListener(DominoClient.LifecycleListener listener)
Adds a listener to the client that will be called when certain lifecycle events occur.
|
void |
close() |
void |
compact(String pathname,
Set<CompactMode> mode)
This function compresses a local database to remove the space left by deleting documents,
freeing up disk space.
Deletion stubs however, are left intact in the database. |
Database |
createDatabase(String serverName,
String filePath,
boolean forceCreation,
boolean initDesign,
DominoClient.Encryption encryption)
Creates a new database on the target server with a given file path.
|
Database |
createDatabase(String serverName,
String filePath,
boolean forceCreation,
boolean initDesign,
DominoClient.Encryption encryption,
DatabaseClass dbClass)
Creates a new database on the target server with a given file path.
|
Database |
createDatabaseFromTemplate(String sourceServerName,
String sourceFilePath,
String targetServerName,
String targetFilePath,
DominoClient.Encryption encryption)
Creates a new database from the specified template DB.
|
Database |
createDatabaseReplica(String sourceServerName,
String sourceFilePath,
String targetServerName,
String targetFilePath,
DominoClient.Encryption encryption)
Creates a new database replica, which is a new database with copied design/data documents
and the same replica ID as the specified DB.
|
DominoDateRange |
createDateRange(TemporalAccessor start,
TemporalAccessor end)
Creates a new
DominoDateRange of two Temporal values. |
DominoDateTime |
createDateTime(TemporalAccessor temporal)
Creates a
DominoDateTime instance for the provided TemporalAccessor object.Some examples of supported TemporalAccessor value:DominoDateTime
Instant.now()
LocalDate.now()
LocalTime.now()
ZoneId zone = ZoneId.systemDefault(); Instant now=Instant.now(); OffsetDateTime.ofInstant(now, zone);
|
DxlExporter |
createDxlExporter() |
DxlImporter |
createDxlImporter() |
Formula |
createFormula(String formula)
Compiles a formula
|
IDTable |
createIDTable()
Creates a new, empty ID table.
|
DominoUniversalNoteId |
createUNID(String unidStr)
Creates a
DominoUniversalNoteId for a given UNID string
that can be used in Document.replaceItemValue(String, Object)
to create an item of type ItemDataType.TYPE_NOTEREF_LIST to
reference another Document, e.g. |
void |
deleteDatabase(String serverName,
String filePath)
Deletes the database at the specified path.
|
AdministrationProcess |
getAdministrationProcess(String serverName)
Creates a new AdministrationProcess object
|
BuildVersionInfo |
getBuildVersion(String server)
This function returns a
BuildVersionInfo object which contains all types of
information about the level of code running on the specified server.See BuildVersionInfo for more information. |
Calendaring |
getCalendaring()
Method to access the calendaring and scheduling API of domino.
|
DatabaseChangePathList |
getDatabasePaths(String serverName,
TemporalAccessor modifiedSince)
Retrieves a list of databases on the target server, optionally restricted to those modified
since a given time.
|
DominoRuntime |
getDominoRuntime()
Obtains an accessor object for the Notes/Domino runtime configuration
|
Ecl |
getEcl(DominoClient.ECLType eclType,
List<String> namesList)
Returns the
Ecl for a names list (what the user is allowed to do) |
Ecl |
getEcl(DominoClient.ECLType eclType,
String userName)
Returns the
Ecl for a username (what the user is allowed to do) |
String |
getEffectiveUserName()
Returns the current Domino username code will run as
|
UserNamesList |
getEffectiveUserNamesList(String server)
Computes a list of name variants and groups of the current effective user
on the specified server
|
FreeBusy |
getFreeBusy()
Method to access the free-busy schedules of a Domino server.
|
String |
getIDUserName()
Returns the current Domino ID name used to access Domino server / client
|
IdVault |
getIdVault() |
Collection<String> |
getKnownServers(String portName)
Retrieves a list of servers known to the current Domino environment.
|
MessageQueues |
getMessageQueues()
Method to access the message queues of the Domino API.
|
MimeReader |
getMimeReader()
Returns a utility class to read MIME content from a
Document. |
MimeWriter |
getMimeWriter()
Returns a utility class to write MIME content to a
Document |
Person |
getPerson(String username)
Returns a utility class that provides information about a user
|
Replication |
getReplication()
Returns replication utilities
|
RichTextHTMLConverter |
getRichTextHtmlConverter()
Returns a utility class to render a document or single item as HTML
|
ServerAdmin |
getServerAdmin()
Returns a utility class with server administration features
|
default ThreadFactory |
getThreadFactory()
Obtains a
ThreadFactory implementation that produces Notes-initialized threads. |
boolean |
isAdmin()
This will be used to restrict access to the admin APIs, managed against the
Java application's permitted access
|
boolean |
isFullAccess()
Returns
true if databases are supposed to be opened with full access
(if the current user has sufficient rights on the accessed server) |
boolean |
isOnServer()
Whether the code is running on a Domino server or client
|
Database |
openDatabase(String path)
Opens a database by path.
|
Database |
openDatabase(String path,
Set<DominoClient.OpenDatabase> options)
Opens a database by path.
|
Database |
openDatabase(String serverName,
String filePath)
Opens a database.
|
Database |
openDatabase(String serverName,
String filePath,
Set<DominoClient.OpenDatabase> options)
Opens a database with options if database is not accessible.
|
DbDirectory |
openDbDirectory()
Opens the db-directory to enumerate database (and other) files as well as subdirectories
in the data-directory of a server (or locally)
|
Optional<Database> |
openMailDatabase()
Opens the mail database if the current user
|
Optional<Database> |
openMailDatabase(Set<DominoClient.OpenDatabase> options)
Opens the mail database if the current user
|
UserDirectory |
openUserDirectory(String serverName)
Opens the effective user directory for the provided server.
|
ServerPingInfo |
pingServer(String serverName,
boolean retrieveLoadIndex,
boolean retrieveClusterInfo)
Attempts to ping the named server, optionally retrieving additional information.
|
DominoClient.NotesReplicationStats |
replicateDbsWithServer(String serverName,
Set<Database.ReplicateOption> options,
List<String> fileList,
int timeLimitMin,
DominoClient.ReplicationStateListener progressListener)
This routine replicates Domino database files on the local system with a specified server.
Either all common files can be replicated or a specified list of files can be replicated. Replication can be performed in either direction or both directions (push, pull, or both). Please note: Run this method inside runInterruptable(Callable, IBreakHandler)
to be able to cancel the process and inside runWithProgress(Callable, IProgressListener)
to get progress info. |
Optional<DominoException> |
resolveErrorCode(int code)
Converts a Domino API error code into a
DominoException. |
<T> FutureTask<T> |
runAsync(Callable<T> callable)
Runs a block of code asynchronously in a background thread
|
<T> FutureTask<T> |
runAsync(ExecutorService service,
Callable<T> callable)
Runs a block of code asynchronously in a background thread
|
<T> T |
runInterruptable(Callable<T> callable,
DominoClient.IBreakHandler breakHandler)
The method registers a break signal handler for the execution time of the specified
Callable. |
<T> T |
runWithProgress(Callable<T> callable,
DominoClient.IProgressListener progressHandler)
The method registers a progress signal handler for the execution time of the specified
Callable. |
String |
validateCredentials(String serverName,
String userName,
String password)
Attempts to validate the provider username and password credentials using the named server.
|
String |
validateCredentialsWithToken(String serverName,
Object token)
Attempts to validate the provided credentials token with any registered providers.
|
getAdapterString getIDUserName()
String getEffectiveUserName()
UserNamesList getEffectiveUserNamesList(String server)
server - server, use empty string for local environmentboolean isOnServer()
DbDirectory openDbDirectory()
Database createDatabase(String serverName, String filePath, boolean forceCreation, boolean initDesign, DominoClient.Encryption encryption)
serverName - Domino server name to connect to, or an empty string for the current serverfilePath - the file path of the destination databaseforceCreation - to overwrite an existing database if applicableinitDesign - true to run a DXL import on the new database which creates a view and basic structures like the DB icon and the design collection; if false, you need to run your own initialization since the created database cannot yet be opened in the Notes Clientencryption - encryption level for new databaseIllegalArgumentException - if filePath is emptyDominoException - if the database already exists and forceCreation is falseDatabase createDatabase(String serverName, String filePath, boolean forceCreation, boolean initDesign, DominoClient.Encryption encryption, DatabaseClass dbClass)
serverName - Domino server name to connect to, or an empty string for the current serverfilePath - the file path of the destination databaseforceCreation - to overwrite an existing database if applicableinitDesign - true to run a DXL import on the new database which creates a view and basic structures like the DB icon and the design collection; if false, you need to run your own initialization since the created database cannot yet be opened in the Notes Clientencryption - encryption level for new databasedbClass - type of database to createIllegalArgumentException - if filePath is emptyDominoException - if the database already exists and forceCreation is falseDatabase createDatabaseFromTemplate(String sourceServerName, String sourceFilePath, String targetServerName, String targetFilePath, DominoClient.Encryption encryption)
sourceServerName - server name of template databasesourceFilePath - filepath of template databasetargetServerName - Domino server name to connect to, or an empty string for the current servertargetFilePath - the file path of the destination databaseencryption - encryption level for new databaseDatabase createDatabaseReplica(String sourceServerName, String sourceFilePath, String targetServerName, String targetFilePath, DominoClient.Encryption encryption)
sourceServerName - server name of database to create the replica forsourceFilePath - filepath of database to create the replica fortargetServerName - Domino server name to connect to, or an empty string for the current servertargetFilePath - the file path of the destination databaseencryption - encryption level for new databaseDatabase openDatabase(String path)
Some examples of legal database paths are:
foo/bar.nsf852584A8:00507284ServerName/OrgName!!foo/bar.nsfCN=ServerName/O=OrgName!!foo/bar.nsfServerName/OrgName!!852584A8:00507284path - a path of the databaseDatabase openDatabase(String path, Set<DominoClient.OpenDatabase> options)
Some examples of legal database paths are:
foo/bar.nsf852584A8:00507284ServerName/OrgName!!foo/bar.nsfCN=ServerName/O=OrgName!!foo/bar.nsfServerName/OrgName!!852584A8:00507284path - a path of the databaseoptions - set of options for if the database is not accessibleDatabase openDatabase(String serverName, String filePath)
serverName - Domino server name to connect to, or an empty string for the current serverfilePath - path of the database relative to Domino's data directory or a replica
IDDatabase openDatabase(String serverName, String filePath, Set<DominoClient.OpenDatabase> options)
serverName - Domino server name to connect to, empty string for current serverfilePath - path of the database relative to Domino's data directory or a replica
IDoptions - set of options for if the database is not accessibleOptional<Database> openMailDatabase()
Optional describing the user's mail database, or an empty one
if the user has no mail database or it cannot be foundOptional<Database> openMailDatabase(Set<DominoClient.OpenDatabase> options)
options - set of options for if the database is not accessibleOptional describing the user's mail database, or an empty one
if the user has no mail database or it cannot be foundvoid deleteDatabase(String serverName, String filePath)
serverName - Domino server name to connect to, empty string for current serverfilePath - path of the database relative to Domino's data directoryboolean isAdmin()
boolean isFullAccess()
true if databases are supposed to be opened with full access
(if the current user has sufficient rights on the accessed server)DominoRuntime getDominoRuntime()
DominoRuntime object<T> FutureTask<T> runAsync(Callable<T> callable)
T - result typecallable - code to run<T> FutureTask<T> runAsync(ExecutorService service, Callable<T> callable)
T - result typeservice - ExecutorService to select the background threadcallable - code to rundefault ThreadFactory getThreadFactory()
ThreadFactory implementation that produces Notes-initialized threads.ThreadFactory instance<T> T runInterruptable(Callable<T> callable, DominoClient.IBreakHandler breakHandler)
Callable. The break signal handler can be used to send a break signal to Domino
so that the current (probably long running) operation, e.g. a fulltext on a remote
database, can be interrupted.T - result typecallable - callable to executebreakHandler - break handler to interrupt the current operation<T> T runWithProgress(Callable<T> callable, DominoClient.IProgressListener progressHandler)
Callable. The progress signal handler can be used to get notified about the
progress of method execution, e.g. replication or copy operations.T - result typecallable - callable to executeprogressHandler - progress handler to get notified about progress changesDominoDateTime createDateTime(TemporalAccessor temporal)
DominoDateTime instance for the provided TemporalAccessor object.TemporalAccessor value:DominoDateTimeInstant.now()LocalDate.now()LocalTime.now()ZoneId zone = ZoneId.systemDefault(); Instant now=Instant.now(); OffsetDateTime.ofInstant(now, zone);temporal - the temporal implementation to convert; must not be nullDominoDateTime instance that represents the value of temporalNullPointerException - if temporal is nullIllegalArgumentException - if temporal contains a time zone that cannot be expressed
in 15-minute incrementsDominoDateRange createDateRange(TemporalAccessor start, TemporalAccessor end)
DominoDateRange of two Temporal values.
Some examples of supported Temporal value:Instant.now()LocalDate.now()LocalTime.now()ZoneId zone = ZoneId.systemDefault(); Instant now=Instant.now(); OffsetDateTime.ofInstant(now, zone);start - start temporalend - end temporalDxlImporter createDxlImporter()
DxlExporter createDxlExporter()
FreeBusy getFreeBusy()
FreeBusy to access the free-busy schedulesCalendaring getCalendaring()
CalendaringMessageQueues getMessageQueues()
MessageQueues to querying and creationMimeReader getMimeReader()
Document.MimeReader to read MIMEMimeWriter getMimeWriter()
DocumentMimeWriter to write MIMEIDTable createIDTable()
Formula createFormula(String formula) throws FormulaCompilationException
formula - formula to compileFormulaCompilationException - if formula has wrong syntaxDominoUniversalNoteId createUNID(String unidStr)
DominoUniversalNoteId for a given UNID string
that can be used in Document.replaceItemValue(String, Object)
to create an item of type ItemDataType.TYPE_NOTEREF_LIST to
reference another Document, e.g. in a response hierarchy.unidStr - UNID StringRichTextHTMLConverter getRichTextHtmlConverter()
DominoClient.NotesReplicationStats replicateDbsWithServer(String serverName, Set<Database.ReplicateOption> options, List<String> fileList, int timeLimitMin, DominoClient.ReplicationStateListener progressListener)
runInterruptable(Callable, IBreakHandler)
to be able to cancel the process and inside runWithProgress(Callable, IProgressListener)
to get progress info.serverName - destination server (either abbreviated or canonical format)options - replication optionsfileList - list of files to replicate, use server!!filepath format to specify databases on other serverstimeLimitMin - If non-zero, number of minutes replication is allowed to execute before cancellation. If not specified, no limit is imposedprogressListener - replication progress listener or null if not requiredServerAdmin getServerAdmin()
IdVault getIdVault()
Collection<String> getKnownServers(String portName)
portName - the port name to query, or null for all portsCollection of distinguished server namesDatabaseChangePathList getDatabasePaths(String serverName, TemporalAccessor modifiedSince)
serverName - the server to query, or null for localmodifiedSince - the start time of the query, or null for all databasesDatabaseChangePathList object containing the path list and new since timePerson getPerson(String username)
username - usernameString validateCredentials(String serverName, String userName, String password) throws NameNotFoundException, AuthenticationException, AuthenticationNotSupportedException
serverName - the name of the server to validate against, or null to use the local
runtimeuserName - a name for the user; may be a short name or other user IDpassword - the password to check for the userIllegalArgumentException - if userName is emptyNameNotFoundException - if the provided name cannot be found in any directoryAuthenticationException - if the provided password does not match the user's passwordAuthenticationNotSupportedException - if the user exists but does not have a specified passwordString validateCredentialsWithToken(String serverName, Object token) throws NameNotFoundException, AuthenticationException, AuthenticationNotSupportedException
token - the token to use to authenticate. The class of the token depends on the available
provider implementationsserverName - the name of the server to contactIllegalArgumentException - when no provider can be found to handle tokenNameNotFoundException - if the implementation finds that the name cannot be foundAuthenticationException - if the implementation finds that the credentials cannot be validatedAuthenticationNotSupportedException - if the implementation finds that the user exists but cannot be validated with that tokenUnsupportedOperationException - if no implementation is found that can handle the provided tokenEcl getEcl(DominoClient.ECLType eclType, String userName)
Ecl for a username (what the user is allowed to do)eclType - ECL typeuserName - username either abbreviated or canonicalEcl getEcl(DominoClient.ECLType eclType, List<String> namesList)
Ecl for a names list (what the user is allowed to do)eclType - ECL typenamesList - usernameslist, e.g. with the same content as @UserNamesListReplication getReplication()
UserDirectory openUserDirectory(String serverName)
serverName - the name of the server to query, or null to use the local
runtimeUserDirectory for the serverAdministrationProcess getAdministrationProcess(String serverName)
serverName - The name of the server containing the Administration Requests database (ADMIN4.NSF). An empty string means the local computer. The server must contain a replica of the Certification Log. You must have access privileges to the Domino Directory on the server for Administration Process requests that use itvoid close()
close in interface AutoCloseablevoid addLifecycleListener(DominoClient.LifecycleListener listener)
listener - the listener to addvoid compact(String pathname, Set<CompactMode> mode)
pathname - path of local databasemode - compact flagsServerPingInfo pingServer(String serverName, boolean retrieveLoadIndex, boolean retrieveClusterInfo)
serverName - the name of the server to pingretrieveLoadIndex - whether to query the server's availability indexretrieveClusterInfo - whether to query the server's cluster name and peersServerPingInfo instance optionally containing load index and cluster informationServerNotFoundException - if the server cannot be resolvedServerUnavailableException - if the server is resolved but busyServerRestrictedException - if the server is resolved but restrictedBuildVersionInfo getBuildVersion(String server)
BuildVersionInfo object which contains all types of
information about the level of code running on the specified server.BuildVersionInfo for more information.server - to check the version for, e.g. "" for local environmentOptional<DominoException> resolveErrorCode(int code)
DominoException.code - error codeOptional describing a newly-created instance of DominoException or a subclass,
an empty one if result is 0Copyright © 2019–2021 HCL. All rights reserved.