MetaDone
metadone_bundle_metabusiness.TheBusinessManager Class Reference
Inheritance diagram for metadone_bundle_metabusiness.TheBusinessManager:
Collaboration diagram for metadone_bundle_metabusiness.TheBusinessManager:

List of all members.

Public Member Functions

 TheBusinessManager (RepositoryManager repositoryManager, MetadoneEvents eventManager)
 TheBusinessManager (BundleContext bc)
synchronized RepositoryManager getRepositoryManager ()
synchronized void setRepositoryManager (RepositoryManager repositoryManager)
void createFactory (RepositoryManager.TechnoRepository techno, Properties props, String name) throws BadPreCondition, FailedOperation
boolean removeFactory (String name)
Set< String > listFactories ()
Workspace createWorkspace (String nameFactory, String nameProject) throws BadPreCondition, FailedOperation
Workspace openWorkspace (String nameFactory, String nameProject) throws BadPreCondition, FailedOperation, BadVersionMetal2
void dispose ()
Transaction currentTransaction (String nameFactory) throws BadPreCondition
Set< String > listProjects (String nameFactory) throws BadPreCondition, FailedOperation
Transaction newTransaction (String nameFactory) throws BadPreCondition
final MetadoneEvents getEventManager ()

Protected Member Functions

Dictionary< String,?> getServiceProperties ()

Private Attributes

final Map< String, FactoryProjectfactories = new HashMap<String, FactoryProject>()
final Logger logger = Logger.getLogger(TheBusinessManager.class)
final BundleContext context
final MetadoneEvents eventManager
RepositoryManager repositoryManager = null
ServiceRegistration service = null
WorkspaceProvider workspaceProvider = new DefaultWorkspaceProvider()

Constructor & Destructor Documentation

metadone_bundle_metabusiness.TheBusinessManager.TheBusinessManager ( BundleContext  bc)

Member Function Documentation

Workspace metadone_bundle_metabusiness.TheBusinessManager.createWorkspace ( String  nameFactory,
String  nameProject 
) throws BadPreCondition, FailedOperation
Transaction metadone_bundle_metabusiness.TheBusinessManager.currentTransaction ( String  nameFactory) 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

Implements metadone_bundle_metabusiness.service.BusinessManager.

References metadone.repository.kernel.FactoryProject.currentTransaction(), and metadone_bundle_metabusiness.TheBusinessManager.factories.

Dictionary<String, ?> metadone_bundle_metabusiness.TheBusinessManager.getServiceProperties ( ) [protected]
Set<String> metadone_bundle_metabusiness.TheBusinessManager.listFactories ( )

Gets the names of opened factories.

Returns:
The names of opened factories

Implements metadone_bundle_metabusiness.service.BusinessManager.

References metadone_bundle_metabusiness.TheBusinessManager.factories.

Set<String> metadone_bundle_metabusiness.TheBusinessManager.listProjects ( String  nameFactory) throws BadPreCondition, FailedOperation

Retrieves a list of projects from a factory.

Parameters:
nameFactoryThe name of the factory
Returns:
The list of projects stored in the repository.
Exceptions:
BadPreCondition
FailedOperation

Implements metadone_bundle_metabusiness.service.BusinessManager.

References metadone_bundle_metabusiness.TheBusinessManager.factories, and metadone.repository.kernel.FactoryProject.listProjects().

Transaction metadone_bundle_metabusiness.TheBusinessManager.newTransaction ( String  nameFactory) throws BadPreCondition
Returns:
A new transaction that can be used in concurrent threads.
Exceptions:
BadPreCondition

Implements metadone_bundle_metabusiness.service.BusinessManager.

References metadone_bundle_metabusiness.TheBusinessManager.factories, and metadone.repository.kernel.FactoryProject.newTransaction().

Workspace metadone_bundle_metabusiness.TheBusinessManager.openWorkspace ( String  nameFactory,
String  nameProject 
) throws BadPreCondition, FailedOperation, BadVersionMetal2

Opens a workspace using a factory.

Exceptions:
BadPreConditionSome precondition has failed.
FailedOperationSome error occured during the creation.
BadVersionMetal2The version of the repository doesn't match the version of the repository, and the repository is not compliant with that version.

Implements metadone_bundle_metabusiness.service.BusinessManager.

References metadone.exception.NullArgument.check(), metadone_bundle_metabusiness.TheBusinessManager.factories, metadone_bundle_metabusiness.TheBusinessManager.getEventManager(), metadone_bundle_metabusiness.TheBusinessManager.getRepositoryManager(), metadone.repository.kernel.FactoryProject.openProject(), metadone_bundle_metabusiness.service.WorkspaceProvider.openWorkspace(), and metadone_bundle_metabusiness.TheBusinessManager.workspaceProvider.

boolean metadone_bundle_metabusiness.TheBusinessManager.removeFactory ( String  name)

Member Data Documentation

final Logger metadone_bundle_metabusiness.TheBusinessManager.logger = Logger.getLogger(TheBusinessManager.class) [private]

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