Oracle Warehouse Builder Java API Reference
10g Release 1 (10.1)

B12155-01

oracle.owb.connection
Class RepositoryManager

java.lang.Object
  |
  +--oracle.owb.connection.RepositoryManager

public class RepositoryManager
extends java.lang.Object

Factory class for getting connections to OWB repository.


Field Summary
static int MULTIPLE_USER_MODE
          Used for the argument mode in method openConnection.
protected static RepositoryManager s_instance
          Static variable holding the sole instance of of this class.
static int SINGLE_USER_MODE
          Used for the argument mode in method openConnection.

 

Constructor Summary
protected RepositoryManager()
          Protected constructor (for invocation by subclass constructors, typically implicit).

 

Method Summary
 void disconnect()
          Disconnects the current repository connection.
 OWBConnection getConnection()
          Returns the current connection to OWB repository.
static RepositoryManager getInstance()
          Returns the sole instance of this class.
 boolean isConnected()
          Tests whether a connection to the repository currently exists.
 boolean isUserRepositoryOwner()
          Tests whether the current user is the repository owner.
 OWBConnection openConnection(java.lang.String userName, java.lang.String password, java.lang.String connectString, int mode)
          Establishes a connection to OWB repository in multiple user mode so that there may have multiple session connected to the same repository.
 OWBConnection openConnection(java.lang.String userName, java.lang.String password, java.lang.String connectString, int mode, java.lang.String repositoryName)
          Establishes a connection to OWB repository in multiple user mode so that there may have multiple session connected to the same repository.
 OWBConnection openSingleUserConnection(java.lang.String userName, java.lang.String password, java.lang.String connectString)
          Establishes a connection to OWB repository in single user mode.

 

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

 

Field Detail

SINGLE_USER_MODE

public static final int SINGLE_USER_MODE
Used for the argument mode in method openConnection. If a connection is created in SINGLE_USER_MODE, then there may be only one session connected to repository.
See Also:
Constant Field Values

MULTIPLE_USER_MODE

public static final int MULTIPLE_USER_MODE
Used for the argument mode in method openConnection. If a connection is created in MULTIPLE_USER_MODE, then there may be more than one session connected to repository.
See Also:
Constant Field Values

s_instance

protected static RepositoryManager s_instance
Static variable holding the sole instance of of this class.
Constructor Detail

RepositoryManager

protected RepositoryManager()
Protected constructor (for invocation by subclass constructors, typically implicit).
Method Detail

getInstance

public static RepositoryManager getInstance()
Returns the sole instance of this class.
Returns:
the instance value

openSingleUserConnection

public OWBConnection openSingleUserConnection(java.lang.String userName,
                                              java.lang.String password,
                                              java.lang.String connectString)
                                       throws ConnectionFailureException
Establishes a connection to OWB repository in single user mode.
Parameters:
userName - the user name
password - the password
connectString - the connect string in the form "host:port:SID"
Returns:
the connection to the repository
Throws:
ConnectionFailureException - if the connection could not be established

openConnection

public OWBConnection openConnection(java.lang.String userName,
                                    java.lang.String password,
                                    java.lang.String connectString,
                                    int mode)
                             throws ConnectionFailureException
Establishes a connection to OWB repository in multiple user mode so that there may have multiple session connected to the same repository.
Parameters:
userName - the user name
password - the password
connectString - the connect string in the form "host:port:SID"
mode - either in SINGLE_USER_MODE or MULTIPLE_USER_MODE
Returns:
the connection to the repository
Throws:
ConnectionFailureException - if the connection could not be established

openConnection

public OWBConnection openConnection(java.lang.String userName,
                                    java.lang.String password,
                                    java.lang.String connectString,
                                    int mode,
                                    java.lang.String repositoryName)
                             throws ConnectionFailureException
Establishes a connection to OWB repository in multiple user mode so that there may have multiple session connected to the same repository.
Parameters:
userName - the user name
password - the password
connectString - the connect string in the form "host:port:SID"
mode - either in SINGLE_USER_MODE or MULTIPLE_USER_MODE
repositoryName - The repository name the user would like to use. Needed only if the login user is not a repository schema
Returns:
the connection to the repository
Throws:
ConnectionFailureException - if the connection could not be established

isUserRepositoryOwner

public boolean isUserRepositoryOwner()
Tests whether the current user is the repository owner.
Returns:
true if the user is the repository owner

getConnection

public OWBConnection getConnection()
Returns the current connection to OWB repository.
Returns:
the current connection to the repository is such connection is established, and null if no connection to the repository is established

isConnected

public boolean isConnected()
Tests whether a connection to the repository currently exists.
Returns:
true if there is a connection to the repository

disconnect

public void disconnect()
Disconnects the current repository connection. If no connection is established, then the method just returns.

Oracle Warehouse Builder Java API Reference
10g Release 1 (10.1)

B12155-01

Copyright © 2003, Oracle. All Rights Reserved.