org.eclipse.emf.ecp.core
Interface ECPRepositoryManager

All Known Implementing Classes:
ECPRepositoryManagerImpl

public interface ECPRepositoryManager

The ECPRepositoryManager contains all ECPRepositories and manages their lifecycle. It is available as an OSGi service or using ECPUtil It publishes observable events on the ECPObserverBus. Related Observer types: ECPRepositoriesChangedObserver, ECPRepositoryContentChangedObserver. Use ECPUtil#getECPObserverBus() to retrieve the ObserverBus and ECPObserverBus#register(ECPObserver) to register an Observer.

Author:
Eike Stepper, Jonas

Method Summary
 ECPRepository addRepository(ECPProvider provider, String name, String label, String description, ECPProperties properties)
          This method allows the user to create a repository.
 Collection<ECPRepository> getRepositories()
          Returns all known repositories.
 ECPRepository getRepository(Object adaptable)
          This method returns a ECPRepository from an adaptable.
 ECPRepository getRepository(String name)
          This method returns a repository by its name.
 

Method Detail

getRepository

ECPRepository getRepository(Object adaptable)
This method returns a ECPRepository from an adaptable.

Parameters:
adaptable - the adaptable to adapt
Returns:
ECPRepository or null if the adaptable could not be adapted

getRepository

ECPRepository getRepository(String name)
This method returns a repository by its name.

Parameters:
name - the name of the repository
Returns:
the ECPRepository or null if no repository with such name exists.

getRepositories

Collection<ECPRepository> getRepositories()
Returns all known repositories.

Returns:
an array of all known ECPRepositories

addRepository

ECPRepository addRepository(ECPProvider provider,
                            String name,
                            String label,
                            String description,
                            ECPProperties properties)
This method allows the user to create a repository. If ECPProvider.hasCreateRepositorySupport() returns false an UnsupportedOperationException is thrown.

Parameters:
provider - the ECPProvider of this repository
name - the name of the new repository
label - the label of the new repository
description - the description of the new repository
properties - the ECPProperties of this repository
Returns:
the created ECPRepository


Copyright © 2015. All Rights Reserved.