MetaDone
|
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, FactoryProject > | factories = 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() |
metadone_bundle_metabusiness.TheBusinessManager.TheBusinessManager | ( | RepositoryManager | repositoryManager, |
MetadoneEvents | eventManager | ||
) |
metadone_bundle_metabusiness.TheBusinessManager.TheBusinessManager | ( | BundleContext | bc | ) |
void metadone_bundle_metabusiness.TheBusinessManager.createFactory | ( | RepositoryManager.TechnoRepository | techno, |
Properties | props, | ||
String | name | ||
) | throws BadPreCondition, FailedOperation |
Creates a factory.
techno | The technology used |
props | The properties |
name | The name |
FailedOperation | |
BadPreCondition |
Implements metadone_bundle_metabusiness.service.BusinessManager.
References metadone.exception.NullArgument.check(), metadone_bundle_repository.service.RepositoryManager.createFactoryProject(), metadone_bundle_metabusiness.TheBusinessManager.factories, metadone_bundle_metabusiness.TheBusinessManager.getEventManager(), metadone_bundle_metabusiness.TheBusinessManager.getRepositoryManager(), metadone.repository.kernel.FactoryProject.setEventManager(), and metadone.metabusiness.events.MetadoneEvents.trigger().
Workspace metadone_bundle_metabusiness.TheBusinessManager.createWorkspace | ( | String | nameFactory, |
String | nameProject | ||
) | throws BadPreCondition, FailedOperation |
Creates a workspace using a factory.
BadPreCondition | Some precondition has failed. |
FailedOperation | Some error occured during the creation. |
Implements metadone_bundle_metabusiness.service.BusinessManager.
References metadone.repository.kernel.Project.bootstrap(), metadone.repository.kernel.FactoryProject.createProject(), metadone_bundle_metabusiness.TheBusinessManager.factories, metadone_bundle_metabusiness.TheBusinessManager.getEventManager(), metadone_bundle_metabusiness.service.WorkspaceProvider.openWorkspace(), and metadone_bundle_metabusiness.TheBusinessManager.workspaceProvider.
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.
BadPreCondition |
Implements metadone_bundle_metabusiness.service.BusinessManager.
References metadone.repository.kernel.FactoryProject.currentTransaction(), and metadone_bundle_metabusiness.TheBusinessManager.factories.
void metadone_bundle_metabusiness.TheBusinessManager.dispose | ( | ) |
Disposes the resources.
Implements metadone_bundle_metabusiness.service.BusinessManager.
References metadone_bundle_repository.service.RepositoryManager.dispose(), metadone_bundle_metabusiness.TheBusinessManager.getRepositoryManager(), and metadone_bundle_metabusiness.TheBusinessManager.setRepositoryManager().
Referenced by metadone_bundle_metabusiness.Activator.stop().
final MetadoneEvents metadone_bundle_metabusiness.TheBusinessManager.getEventManager | ( | ) |
Gets the event manager.
Implements metadone_bundle_metabusiness.service.BusinessManager.
References metadone_bundle_metabusiness.TheBusinessManager.eventManager.
Referenced by metadone_bundle_metabusiness.TheBusinessManager.createFactory(), metadone_bundle_metabusiness.TheBusinessManager.createWorkspace(), and metadone_bundle_metabusiness.TheBusinessManager.openWorkspace().
synchronized RepositoryManager metadone_bundle_metabusiness.TheBusinessManager.getRepositoryManager | ( | ) |
References metadone_bundle_metabusiness.TheBusinessManager.repositoryManager.
Referenced by metadone_bundle_metabusiness.RepositoryTracker.addingService(), metadone_bundle_metabusiness.TheBusinessManager.createFactory(), metadone_bundle_metabusiness.TheBusinessManager.dispose(), metadone_bundle_metabusiness.RepositoryTracker.getBusinessManager(), metadone_bundle_metabusiness.TheBusinessManager.openWorkspace(), and metadone_bundle_metabusiness.RepositoryTracker.removedService().
Dictionary<String, ?> metadone_bundle_metabusiness.TheBusinessManager.getServiceProperties | ( | ) | [protected] |
Set<String> metadone_bundle_metabusiness.TheBusinessManager.listFactories | ( | ) |
Gets 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.
nameFactory | The name of the factory |
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 |
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.
BadPreCondition | Some precondition has failed. |
FailedOperation | Some error occured during the creation. |
BadVersionMetal2 | The 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 | ) |
Removes a factory from the manager.
name | The name of the factory |
true
iff a factory was removed Implements metadone_bundle_metabusiness.service.BusinessManager.
References metadone.repository.kernel.FactoryProject.dispose(), metadone_bundle_metabusiness.TheBusinessManager.eventManager, metadone_bundle_metabusiness.TheBusinessManager.factories, and metadone.metabusiness.events.MetadoneEvents.trigger().
synchronized void metadone_bundle_metabusiness.TheBusinessManager.setRepositoryManager | ( | RepositoryManager | repositoryManager | ) |
References metadone_bundle_metabusiness.TheBusinessManager.context, metadone_bundle_metabusiness.TheBusinessManager.getServiceProperties(), metadone_bundle_metabusiness.TheBusinessManager.repositoryManager, and metadone_bundle_metabusiness.TheBusinessManager.service.
Referenced by metadone_bundle_metabusiness.RepositoryTracker.addingService(), metadone_bundle_metabusiness.TheBusinessManager.dispose(), and metadone_bundle_metabusiness.RepositoryTracker.removedService().
final BundleContext metadone_bundle_metabusiness.TheBusinessManager.context [private] |
final Map<String, FactoryProject> metadone_bundle_metabusiness.TheBusinessManager.factories = new HashMap<String, FactoryProject>() [private] |
Referenced by metadone_bundle_metabusiness.TheBusinessManager.createFactory(), metadone_bundle_metabusiness.TheBusinessManager.createWorkspace(), metadone_bundle_metabusiness.TheBusinessManager.currentTransaction(), metadone_bundle_metabusiness.TheBusinessManager.listFactories(), metadone_bundle_metabusiness.TheBusinessManager.listProjects(), metadone_bundle_metabusiness.TheBusinessManager.newTransaction(), metadone_bundle_metabusiness.TheBusinessManager.openWorkspace(), and metadone_bundle_metabusiness.TheBusinessManager.removeFactory().
final Logger metadone_bundle_metabusiness.TheBusinessManager.logger = Logger.getLogger(TheBusinessManager.class) [private] |
ServiceRegistration metadone_bundle_metabusiness.TheBusinessManager.service = null [private] |