Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.admin.tools.schema
Class VerifyContext

    java.lang.Object
      oracle.ifs.admin.tools.schema.VerifyContext

    public class VerifyContext

extends java.lang.Object

Runs a verification test to determine whether or not interMedia Text is configured correctly and is operational, so that iFS will function properly.

It creates a temporary Oracle user, a temporary table, inserts a file (as a BLOB) into the table, performs an interMedia Text index (sync) operation, and then cleans up all the temporary objects.

If anything goes wrong, interMedia Text is considered improperly configured.

Modified:
  sgarg 06/22/2001 Fixed bug 1817617, sgarg 05/25/2001 Changes to fix "Exhausted Resultset" problem., sgarg 05/23/2001 Fixed bug 1799108, lsaenz 02/07/2001 Turned off theme indexing., lsaenz 12/14/2000 Improved implementation., lsaenz 10/12/2000 Made use of SQLCommands.createTempUser; changed to use database URL rather than always using OCI8 and TNS name; improved coding standards., lsaenz 07/24/2000 Used to improve implementation., lsaenz 02/10/2000 Fixed cleanup method, added cleanup calls wherever an exception can be raised., lsaenz 01/28/2000 Changed interface/API to be more like VerifyMedia: removed testing process from the constructor., lsaenz 12/29/1999 Changed "context" to "interMedia Text"., lsaenz 12/22/1999 Now keeps Connections globally so that they can be closed anywhere., lsaenz 12/16/1999 Now cleans up after itself even if context is not configured correctly., lsaenz 12/04/1999 Fixed bugs, updated comments, and made String constants final variables., lsaenz 12/03/1999 Created.

Constructor Summary
`VerifyContext(java.lang.String sysUser, java.lang.String pass, java.lang.String dbUrl, java.lang.String testFile)` Creates a new VerifyContext given parameters to connect to an Oracle database and a file to index with interMedia.

Method Summary
`boolean` | `doesContextHasNew9iFeatures()` This function is used to find out if the user is having a context which does not have the new features which are required for the latest installation of the 9iFS.
`java.sql.SQLException` | `getReasonForFailure()` Returns the SQLException that was raised when testing if context is correctly configured for iFS.
`boolean` | `isContextConfigured()` Returns true if context is correctly configured for iFS.
`static void` | `main(java.lang.String[] args)` Runs VerifyContext from the command-line.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### VerifyContext

    public VerifyContext(java.lang.String sysUser,
                         java.lang.String pass,
                         java.lang.String dbUrl,
                         java.lang.String testFile)

  Creates a new VerifyContext given parameters to connect to an Oracle database and a file to index with interMedia.

  Parameters:
    `sysUser` - the Oracle SYS user.
    `pass` - the Oracle SYS user's password.
    `dbUrl` - database URL for connecting to Oracle.
    `testFile` - the file to use for testing context indexing.

Method Detail

### main

    public static void main(java.lang.String[] args)

  Description copied from class: `VerifyContext`
  Runs VerifyContext from the command-line. Performs the verification process and output the result to System.out, displaying any errors that occur.

  Parameters:
    `args` - command-line arguments. The arguments must be:
    1. Oracle SYS user
    2. Oracle SYS user's password
    3. test file for context indexing
    4. [optional] Oracle database URL (defaults to local database via OCI8 JDBC driver)

### doesContextHasNew9iFeatures

    public boolean doesContextHasNew9iFeatures()
                                        throws java.sql.SQLException,
                                               java.lang.ClassNotFoundException

  Description copied from class: `VerifyContext`
  This function is used to find out if the user is having a context which does not have the new features which are required for the latest installation of the 9iFS. These features were not present in the original 8i but are avaialble as a patch to 8i and are part of the 9i release.

  Returns:
    true if the context has the new enhanced features required for this 9iFS installation.
  Throws:
    `java.sql.SQLException`
    `java.lang.ClassNotFoundException`

### isContextConfigured

    public boolean isContextConfigured()
                                throws java.lang.ClassNotFoundException,
                                       java.io.FileNotFoundException,
                                       java.io.IOException

  Description copied from class: `VerifyContext`
  Returns true if context is correctly configured for iFS. This method must be placed within a try/catch block because the verification process may raise an exception if it cannot find the Oracle JDBC drivers or if it cannot find or read the test file that will be used to test interMedia indexing for binary files. These failures do not necessarily mean that interMedia itself is misconfigured, which is why this method throws them explicitly. If this call fails, then something even worse is wrong, and context verification cannot even begin.

  Returns:
    true if context is correctly configured for iFS.
  Throws:
    `java.lang.ClassNotFoundException` - if the Oracle JDBC drivers cannot be found or loaded.
    `java.io.FileNotFoundException` - if the test file specified cannot be found.
    `java.io.IOException` - if the test file cannot be read.

### getReasonForFailure

    public java.sql.SQLException getReasonForFailure()

  Description copied from class: `VerifyContext`
  Returns the SQLException that was raised when testing if context is correctly configured for iFS.

  Returns:
    the SQLException that was raised, or null if context is correctly configured and no exception was raised.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD