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

B12155-01

oracle.owb.project
Class ProjectManager

java.lang.Object
  |
  +--oracle.owb.project.ProjectManager

public class ProjectManager
extends java.lang.Object

ProjectManager contains operations to handle Projects administration. This class allows only one instance (singleton), which can be obtained by calling getInstance() method.


Field Summary
static java.lang.String DEFAULT_PROJECT
          The name of the default OWB project.
protected static ProjectManager s_instance
          The sole instance of ProjectManager class.

 

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

 

Method Summary
 void createProject(java.lang.String name)
          Creates a new project.
 void deleteProject(java.lang.String projectName)
          Deletes the specified project.
static ProjectManager getInstance()
          Returns the sole instance of this class.
 java.lang.String[] getProjectNames()
          Get a list of names of the existing projects.
 Project getWorkingProject()
          Returns the current working project.
 java.lang.String lockProject(java.lang.String name)
          Locks the specified project, which may not necessarily be the current working project.
 java.lang.String lockProjectShared(java.lang.String name)
          This method attempts to aquire a shared lock on the the specified project.
 java.lang.String lockProjectWithContents(java.lang.String name)
          Locks the specified project, together with all its contained components.
 java.lang.String[] reloadProjectNames()
          Retrieve the list of names of the existing projects directly from the repository.
 Project setWorkingProject(java.lang.String projectName)
          Establishes a project as the current project to work into.
 void unlockProject(java.lang.String name)
          Unlocks the specified project, which may not necessarily be the current working project.
 void unlockProjectUOID(java.lang.String uoid)
          Unlocks the project with the UOID passed as an argument.

 

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

 

Field Detail

DEFAULT_PROJECT

public static final java.lang.String DEFAULT_PROJECT
The name of the default OWB project. The default project is seeded into OWB repository at the repository creation time.
See Also:
Constant Field Values

s_instance

protected static ProjectManager s_instance
The sole instance of ProjectManager class.
Constructor Detail

ProjectManager

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

getInstance

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

getProjectNames

public java.lang.String[] getProjectNames()
Get a list of names of the existing projects.
Returns:
an array of Strings representing the project names

reloadProjectNames

public java.lang.String[] reloadProjectNames()
Retrieve the list of names of the existing projects directly from the repository. Use this method if you need to refresh the list of projects to also reflect changes made by other users.
Returns:
an array of Strings representing the project names

createProject

public void createProject(java.lang.String name)
                   throws NameSpaceException,
InvalidFormatException
Creates a new project.
Parameters:
name - the project name
Throws:
NameSpaceException - if another Project with the same name already exists
InvalidFormatException - if the desired name does not satisfy the format requirements

deleteProject

public void deleteProject(java.lang.String projectName)
                   throws NoSuchProjectException
Deletes the specified project.
Parameters:
projectName - the project name
Throws:
NoSuchProjectException - if the argument is not a valid project name
ComponentDeletedException - if the project has been deleted by another user

setWorkingProject

public Project setWorkingProject(java.lang.String projectName)
                          throws NoSuchProjectException
Establishes a project as the current project to work into. Note that once the current working project have been switched, all objects from the previous working project are invalidated, so the client code should neither keep nor re-use any reference to such objects.
Parameters:
projectName - the name of the project to be set as working project
Returns:
the instance of the newly established working project
Throws:
NoSuchProjectException - if the argument is not a valid project name
ComponentDeletedException - if the project has been deleted by another user
See Also:
getWorkingProject()

getWorkingProject

public Project getWorkingProject()
Returns the current working project.
Returns:
the current working project if any, and null if no working project has been set
Throws:
ComponentDeletedException - if the working project has been deleted
See Also:
setWorkingProject(java.lang.String)

lockProject

public java.lang.String lockProject(java.lang.String name)
                             throws NoSuchProjectException,
LockException
Locks the specified project, which may not necessarily be the current working project.
Parameters:
name - the name of the project to be locked
Returns:
the UOID of the locked project, which may be used for a subsequent call to unlockProjectUOID, in cases when the name of the project has been changed
Throws:
NoSuchProjectException - if the project could not be found
LockException - if the lock on the project could not be obtained (for example, some other user already has the lock on the project)
See Also:
Component.lock()

unlockProject

public void unlockProject(java.lang.String name)
                   throws NoSuchProjectException,
LockException
Unlocks the specified project, which may not necessarily be the current working project.
Parameters:
name - the name of the project to be unlocked
Throws:
NoSuchProjectException - if the project could not be found
LockException - if the component is not locked
See Also:
Component.unlock()

unlockProjectUOID

public void unlockProjectUOID(java.lang.String uoid)
                       throws LockException
Unlocks the project with the UOID passed as an argument. The UIOD was returned from a previous call to lockProject, lockProjectWithContents, or lockProjectShared.
Parameters:
uoid - the UOID of the project to be unlocked (previously obtained from a call to lockProject, lockProjectWithContents, or lockProjectShared.
Throws:
LockException - if the component is not locked
See Also:
Component.unlock()

lockProjectWithContents

public java.lang.String lockProjectWithContents(java.lang.String name)
                                         throws NoSuchProjectException,
LockException
Locks the specified project, together with all its contained components. The project may not necessarily be the current working project.
Parameters:
name - the name of the project to be locked
Returns:
the UOID of the locked project, which may be used for a subsequent call to unlockProjectUOID, in cases when the name of the project has been changed
Throws:
NoSuchProjectException - if the project could not be found
LockException - if the lock on the project could not be obtained (for example, some other user already has the lock on the project or on any of the contained components)
See Also:
Folder.lockWithContents()

lockProjectShared

public java.lang.String lockProjectShared(java.lang.String name)
                                   throws NoSuchProjectException,
LockException
This method attempts to aquire a shared lock on the the specified project. The project may not necessarily be the current working project.
Parameters:
name - the name of the project to be locked
Returns:
the UOID of the locked project, which may be used for a subsequent call to unlockProjectUOID
Throws:
NoSuchProjectException - if the project could not be found
LockException - if the lock on the project could not be obtained
See Also:
Folder.lockShared()

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

B12155-01

Copyright © 2003, Oracle. All Rights Reserved.