com.arunta.app.remote
Interface TRDatabaseServiceRI

All Superinterfaces:
java.rmi.Remote

public interface TRDatabaseServiceRI
extends java.rmi.Remote

Total Recall VR remote interface for system database operations.

This service provides for access to the Total Recall VR system database. In particular, remote clients can define a comprehensive search criteria and then use it to obtain meta data on recorded calls that exist on the system.


Method Summary
 void addNote(java.lang.String securityKey, Recording recording)
          Updates the notes for the specified recording.
 int executeUpdate(java.lang.String securityKey, java.lang.String sql)
          Execute an UPDATE or DELETE query.
 java.util.ArrayList getDateExtensionCriteria(java.lang.String securityKey)
          Constructs a list of DateExtensionCriteria beans for all called extensions that exist in the system database.
 java.util.ArrayList getExtensionDateCriteria(java.lang.String securityKey)
          Constructs a list of DateExtensionCriteria beans for all called extensions that exist in the system database.
 java.util.ArrayList getMatchingRecordings(java.lang.String securityKey, SearchCriteria criteria)
          Fetches the Recording beans which match the specified criteria.
 Recording getOldestRecording(java.lang.String securityKey)
          Fetches the Recording bean for the oldest recording on the system.
 java.lang.String getRebuildStatus(java.lang.String securityKey)
          Returns an message that describes the status of the on-going database rebuild operation.
 java.util.List getResultList(java.lang.String securityKey, java.lang.String sql)
          Execute a SELECT query and return the query results as a List of Recording beans.
 SearchRangeResult getSearchRangeResult(java.lang.String securityKey, SearchCriteria criteria)
          Determines the number of records and the date range of the records that the match the specified search criteria.
 java.lang.Object getSingleResult(java.lang.String securityKey, java.lang.String sql)
          Execute a SELECT query that returns a single untyped result
 Recording getYoungestRecording(java.lang.String securityKey)
          Fetches the Recording bean for the youngest recording on the system.
 void rebuildDatabase(java.lang.String securityKey)
          Initiates a full rebuild of the database on the Total recall system.
 

Method Detail

rebuildDatabase

void rebuildDatabase(java.lang.String securityKey)
                     throws SecurityException,
                            java.rmi.RemoteException
Initiates a full rebuild of the database on the Total recall system.

The system will remove the current copy of the database and reconstruct it from information stored in the recording files. Note that this operation will stop call recording first, then re-build the database and finally re-start recording. Calls will not be recorded while the database is being rebuilt which can take a number of hours if the number of files on the system is large.

Parameters:
securityKey - The security key that was obtained from the Total Recall VR system at login time. This operation requires a key with administrator level privileges.
Throws:
SecurityException - On invalid security key, or if the user that is associated with the security key is not authorised to perform this request.
java.rmi.RemoteException - On any problem that is associated with completing the request. See cause for further details on the problem.

getRebuildStatus

java.lang.String getRebuildStatus(java.lang.String securityKey)
                                  throws SecurityException,
                                         java.rmi.RemoteException
Returns an message that describes the status of the on-going database rebuild operation.

The message is in the current language as configured on the Total Recall VR system. This message is suitable to display to the user of the remote client making this request.

Consult the Total Recall VR Administration and Installation documentation on how to configure the language on a Total Recall VR system.

Parameters:
securityKey - The security key that was obtained from the Total Recall VR system at login time. This operation requires a key with administrator level privileges.
Returns:
A message which describes the status of the on-going database rebuild operation. For example: Database rebuild completed.
Throws:
SecurityException - On invalid security key, or if the user that is associated with the security key is not authorised to perform this request.
java.rmi.RemoteException - On any problem that is associated with completing the request. See cause for further details on the problem.

getSearchRangeResult

SearchRangeResult getSearchRangeResult(java.lang.String securityKey,
                                       SearchCriteria criteria)
                                       throws DbUnavailableException,
                                              DbBusyException,
                                              SecurityException,
                                              java.rmi.RemoteException
Determines the number of records and the date range of the records that the match the specified search criteria.

Parameters:
securityKey - The security key that was obtained from the Total Recall VR system at login time. This operation requires a key with user level privileges.
criteria - Valid search criteria.
Returns:
Bean which specifies the number of records and the date range of the records.
Throws:
DbUnavailableException - On any problem that is associated with accessing the system database and/or performing the necessary database operations.
DbBusyException - If the database is too busy to perform the search operation. Try again later. This is generally an indication that there are too many database requests waiting to complete.
SecurityException - On invalid security key, or if the user that is associated with the security key is not authorised to perform this request.
java.rmi.RemoteException - On any problem that is associated with completing the request. See cause for further details on the problem.

getMatchingRecordings

java.util.ArrayList getMatchingRecordings(java.lang.String securityKey,
                                          SearchCriteria criteria)
                                          throws DbUnavailableException,
                                                 DbBusyException,
                                                 SecurityException,
                                                 java.rmi.RemoteException
Fetches the Recording beans which match the specified criteria.

Parameters:
securityKey - The security key that was obtained from the Total Recall VR system at login time. This operation requires a key with user level privileges.
criteria - Valid search criteria.
Returns:
A list of Recording beans. The list may be empty.
Throws:
DbUnavailableException - On any problem that is associated with accessing the system database and/or performing the necessary database operations.
DbBusyException - If the database is too busy to perform the search operation. Try again later. This is generally an indication that there are too many database requests waiting to complete.
SecurityException - On invalid security key, or if the user that is associated with the security key is not authorised to perform this request.
java.rmi.RemoteException - On any problem that is associated with completing the request. See cause for further details on the problem.

getOldestRecording

Recording getOldestRecording(java.lang.String securityKey)
                             throws DbUnavailableException,
                                    DbBusyException,
                                    SecurityException,
                                    java.rmi.RemoteException
Fetches the Recording bean for the oldest recording on the system. It creates a SearchCriteria which matches the oldest recording on the system and then executes a search based on that criteria.

Parameters:
securityKey - The security key that was obtained from the Total Recall VR system at login time. This operation requires a key with user level privileges.
Returns:
A Recording bean of the oldest recording, of null if the DB is empty.
Throws:
DbUnavailableException - On any problem that is associated with accessing the system database and/or performing the necessary database operations.
DbBusyException - If the database is too busy to perform the search operation. Try again later. This is generally an indication that there are too many database requests waiting to complete.
SecurityException - On invalid security key, or if the user that is associated with the security key is not authorised to perform this request.
java.rmi.RemoteException - On any problem that is associated with completing the request. See cause for further details on the problem.

getYoungestRecording

Recording getYoungestRecording(java.lang.String securityKey)
                               throws DbUnavailableException,
                                      DbBusyException,
                                      SecurityException,
                                      java.rmi.RemoteException
Fetches the Recording bean for the youngest recording on the system. It creates a SearchCriteria which matches the youngest recording on the system and then executes a search based on that criteria.

Parameters:
securityKey - The security key that was obtained from the Total Recall VR system at login time. This operation requires a key with user level privileges.
Returns:
A Recording bean of the youngest recording, of null if the DB is empty.
Throws:
DbUnavailableException - On any problem that is associated with accessing the system database and/or performing the necessary database operations.
DbBusyException - If the database is too busy to perform the search operation. Try again later. This is generally an indication that there are too many database requests waiting to complete.
SecurityException - On invalid security key, or if the user that is associated with the security key is not authorised to perform this request.
java.rmi.RemoteException - On any problem that is associated with completing the request. See cause for further details on the problem.

getDateExtensionCriteria

java.util.ArrayList getDateExtensionCriteria(java.lang.String securityKey)
                                             throws DbUnavailableException,
                                                    DbBusyException,
                                                    SecurityException,
                                                    java.rmi.RemoteException
Constructs a list of DateExtensionCriteria beans for all called extensions that exist in the system database.

The beans are ordered first by start date and time of calls and then by called extension number.

Parameters:
securityKey - The security key that was obtained from the Total Recall VR system at login time. This operation requires a key with user level privileges.
Returns:
A list of DateExtensionCriteria beans. The list may be empty.
Throws:
DbUnavailableException - On any problem that is associated with accessing the system database and/or performing the necessary database operations.
DbBusyException - If the database is too busy to perform the search operation. Try again later. This is generally an indication that there are too many database requests waiting to complete.
SecurityException - On invalid security key, or if the user that is associated with the security key is not authorised to perform this request.
java.rmi.RemoteException - On any problem that is associated with completing the request. See cause for further details on the problem.

getExtensionDateCriteria

java.util.ArrayList getExtensionDateCriteria(java.lang.String securityKey)
                                             throws DbUnavailableException,
                                                    DbBusyException,
                                                    SecurityException,
                                                    java.rmi.RemoteException
Constructs a list of DateExtensionCriteria beans for all called extensions that exist in the system database.

The beans are ordered first by called extension number and then by start date and time of calls.

Parameters:
securityKey - The security key that was obtained from the Total Recall VR system at login time. This operation requires a key with user level privileges.
Returns:
A list of DateExtensionCriteria beans. The list may be empty.
Throws:
DbUnavailableException - On any problem that is associated with accessing the system database and/or performing the necessary database operations.
DbBusyException - If the database is too busy to perform the search operation. Try again later. This is generally an indication that there are too many database requests waiting to complete.
SecurityException - On invalid security key, or if the user that is associated with the security key is not authorised to perform this request.
java.rmi.RemoteException - On any problem that is associated with completing the request. See cause for further details on the problem.

addNote

void addNote(java.lang.String securityKey,
             Recording recording)
             throws DbUnavailableException,
                    DbBusyException,
                    SecurityException,
                    java.rmi.RemoteException
Updates the notes for the specified recording.

Parameters:
securityKey - The security key that was obtained from the Total Recall VR system at login time. This operation requires a key with user level privileges.
recording - A valid recording beam which represents an existing recording.
Throws:
DbUnavailableException - On any problem that is associated with accessing the system database and/or performing the necessary database operations.
DbBusyException - If the database is too busy to perform the search operation. Try again later. This is generally an indication that there are too many database requests waiting to complete.
SecurityException - On invalid security key, or if the user that is associated with the security key is not authorised to perform this request.
java.rmi.RemoteException - On any problem that is associated with completing the request. See cause for further details on the problem.

getResultList

java.util.List getResultList(java.lang.String securityKey,
                             java.lang.String sql)
                             throws DbUnavailableException,
                                    DbBusyException,
                                    SecurityException,
                                    java.rmi.RemoteException
Execute a SELECT query and return the query results as a List of Recording beans.

Parameters:
securityKey - The security key that was obtained from the Total Recall VR system at login time. This operation requires a key with user level privileges.
sql - Properly formated SQL query.
Returns:
A list of Recording beans. The list may be empty.
Throws:
DbUnavailableException - On any problem that is associated with accessing the system database and/or performing the necessary database operations.
DbBusyException - If the database is too busy to perform the query. Try again later. This is generally an indication that there are too many database requests waiting to complete.
SecurityException - On invalid security key, or if the user that is associated with the security key is not authorised to perform this request.
java.rmi.RemoteException - On any problem that is associated with completing the request. See cause for further details on the problem.

getSingleResult

java.lang.Object getSingleResult(java.lang.String securityKey,
                                 java.lang.String sql)
                                 throws DbUnavailableException,
                                        DbBusyException,
                                        SecurityException,
                                        java.rmi.RemoteException
Execute a SELECT query that returns a single untyped result

Parameters:
securityKey - The security key that was obtained from the Total Recall VR system at login time. This operation requires a key with user level privileges.
sql - Properly formated SQL query.
Returns:
The result of the query. The actual type depends on the query. For example a count based query returns a Long.
Throws:
DbUnavailableException - On any problem that is associated with accessing the system database and/or performing the necessary database operations.
DbBusyException - If the database is too busy to perform the query. Try again later. This is generally an indication that there are too many database requests waiting to complete.
SecurityException - On invalid security key, or if the user that is associated with the security key is not authorised to perform this request.
java.rmi.RemoteException - On any problem that is associated with completing the request. See cause for further details on the problem.

executeUpdate

int executeUpdate(java.lang.String securityKey,
                  java.lang.String sql)
                  throws DbUnavailableException,
                         DbBusyException,
                         SecurityException,
                         java.rmi.RemoteException
Execute an UPDATE or DELETE query.

Parameters:
securityKey - The security key that was obtained from the Total Recall VR system at login time. This operation requires a key with user level privileges.
sql - Properly formated SQL query.
Returns:
The number of records that were updated/deleted.
Throws:
DbUnavailableException - On any problem that is associated with accessing the system database and/or performing the necessary database operations.
DbBusyException - If the database is too busy to perform the update. Try again later. This is generally an indication that there are too many database requests waiting to complete.
SecurityException - On invalid security key, or if the user that is associated with the security key is not authorised to perform this request.
java.rmi.RemoteException - On any problem that is associated with completing the request. See cause for further details on the problem.


Copyright ©, 2005-2012 Prolancer Pty Ltd, Sydney Australia.