MetaDone
metadone.repository.kernel.FactoryProject Interface Reference
Inheritance diagram for metadone.repository.kernel.FactoryProject:

List of all members.

Public Member Functions

void setEventManager (EventTower<?super Metal1Event > e)
Project createProject (String name) throws BadPreCondition, FailedOperation
Project openProject (String name) throws BadPreCondition, FailedOperation
Set< String > listProjects () throws BadPreCondition, FailedOperation
void dispose ()
Transaction newTransaction () throws BadPreCondition
Transaction currentTransaction () throws BadPreCondition

Detailed Description

The FactoryProject Object is in charge to create/open/dispose a project.

Author:
ven

Member Function Documentation

Project metadone.repository.kernel.FactoryProject.createProject ( String  name) throws BadPreCondition, FailedOperation

Create a new project named 'name'

Parameters:
nameDenotes the name of the new project.
Exceptions:
BadPreConditionIf a project already exists with the same name.
FailedOperationIf some error occured while using the datastore.

Implemented in metadone.repository.kernel.jpa2.FactoryProjectJPA2.

Referenced by metadone_bundle_metabusiness.TheBusinessManager.createWorkspace().

Transaction metadone.repository.kernel.FactoryProject.currentTransaction ( ) throws BadPreCondition

Depending on the persistence layer, this transaction can be more efficient (does not require to open a new connection to the server for instance.

Returns:
The default transaction.
Exceptions:
BadPreCondition

Implemented in metadone.repository.kernel.jpa2.FactoryProjectJPA2.

Referenced by metadone_bundle_metabusiness.TheBusinessManager.currentTransaction().

void metadone.repository.kernel.FactoryProject.dispose ( )
Set<String> metadone.repository.kernel.FactoryProject.listProjects ( ) throws BadPreCondition, FailedOperation

This operation returns the list of all the name of the projects in the datastore. This operation is transsactional. If the caller is already running in a transaction, then this transaction is reused, otherwise, a transaction is created and committed inside the operation.

Returns:
The list of the names of the projetcs in the datastore.
Exceptions:
BadPreCondition
FailedOperation

Implemented in metadone.repository.kernel.jpa2.FactoryProjectJPA2.

Referenced by metadone_bundle_metabusiness.TheBusinessManager.listProjects().

Transaction metadone.repository.kernel.FactoryProject.newTransaction ( ) throws BadPreCondition
Returns:
A new transaction that can be used in concurrent threads.
Exceptions:
BadPreCondition

Implemented in metadone.repository.kernel.jpa2.FactoryProjectJPA2.

Referenced by metadone_bundle_metabusiness.TheBusinessManager.newTransaction().

Project metadone.repository.kernel.FactoryProject.openProject ( String  name) throws BadPreCondition, FailedOperation

Open a project named 'name' If the operation succeeds, then a transaction has been created. If an exception is thrown, then no transaction has been created.

Parameters:
nameDenotes the name of the project.
Exceptions:
BadPreConditionif some precondition is not fulfilled or if there is no project with this name in the datastore.
FailedOperationIf some error occured while using the datastore.

Implemented in metadone.repository.kernel.jpa2.FactoryProjectJPA2.

Referenced by metadone_bundle_metabusiness.TheBusinessManager.openWorkspace().

void metadone.repository.kernel.FactoryProject.setEventManager ( EventTower<?super Metal1Event e)

Sets the event manager that will be used by the projects by default.

Parameters:
eThe event manager or null

Implemented in metadone.repository.kernel.jpa2.FactoryProjectJPA2.

Referenced by metadone_bundle_metabusiness.TheBusinessManager.createFactory().


The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations