Overview | Package | Class | Use | Tree | Deprecated | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.emf.ecp.internal.core
Class ECPRepositoryManagerImpl

    java.lang.Object
      org.eclipse.net4j.util.event.Notifier
          org.eclipse.net4j.util.lifecycle.Lifecycle
              org.eclipse.emf.ecp.internal.core.util.Registry<ELEMENT,OBSERVER>
                  org.eclipse.emf.ecp.internal.core.util.ElementRegistry<ELEMENT,OBSERVER>
                      org.eclipse.emf.ecp.internal.core.util.PropertiesStore<InternalRepository,ECPObserver>
                          org.eclipse.emf.ecp.internal.core.ECPRepositoryManagerImpl

All Implemented Interfaces:
  ECPRepositoryManager, ECPObserver, ECPProvidersChangedObserver, ECPDisposable.DisposeListener, org.eclipse.net4j.util.event.INotifier, org.eclipse.net4j.util.lifecycle.ILifecycle, org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation

    public final class ECPRepositoryManagerImpl

extends PropertiesStore<InternalRepository,ECPObserver>
implements ECPRepositoryManager, ECPProvidersChangedObserver

This class manages the repositories.

Author:
  Eike Stepper, Eugen Neufeld

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.emf.ecp.internal.core.util.PropertiesStore
`PropertiesStore.StorableElement`

Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
`org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation`

Field Summary

Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
`USE_LABEL`

Constructor Summary
`ECPRepositoryManagerImpl()` Should not be called directly, use service instead.

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.
`InternalRepository` | `getRepository(Object adaptable)` This method returns a `ECPRepository` from an adaptable.
`InternalRepository` | `getRepository(String name)` This method returns a repository by its name.
`boolean` | `hasRepositories()` Checks whether any repositories are available.
`void` | `notifyObjectsChanged(ECPRepository repository, Collection<Object> objects)` This is called by the `ECPRepository` to notificate observers about chnages it its objects.
`void` | `providersChanged(Collection<ECPProvider> oldProviders, Collection<ECPProvider> newProviders)` This is called to indicate, that providers changed.

Methods inherited from class org.eclipse.emf.ecp.internal.core.util.PropertiesStore
`getFolder, setFolder, storeElement`

Methods inherited from class org.eclipse.emf.ecp.internal.core.util.ElementRegistry
`addResolveListener, removeResolveListener`

Methods inherited from class org.eclipse.emf.ecp.internal.core.util.Registry
`addObserver, changeElements, disposed, getElement, getElementCount, getElementNames, getElements, hasElement, hasElements, removeObserver`

Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
`activate, deactivate, getLifecycleState, isActive, isDeferredActivation, toString`

Methods inherited from class org.eclipse.net4j.util.event.Notifier
`addListener, fireEvent, fireEvent, fireEvent, getListeners, hasListeners, removeListener`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.eclipse.net4j.util.event.INotifier
`addListener, getListeners, hasListeners, removeListener`

Constructor Detail

### ECPRepositoryManagerImpl

    public ECPRepositoryManagerImpl()

  Should not be called directly, use service instead.

Method Detail

### getRepository

    public InternalRepository getRepository(Object adaptable)

  This method returns a `ECPRepository` from an adaptable.

  Specified by:
    `getRepository` in interface `ECPRepositoryManager`
  Parameters:
    `adaptable` - the adaptable to adapt
  Returns:
    `ECPRepository` or null if the adaptable could not be adapted

### getRepository

    public InternalRepository getRepository(String name)

  This method returns a repository by its name.

  Specified by:
    `getRepository` in interface `ECPRepositoryManager`
  Parameters:
    `name` - the name of the repository
  Returns:
    the `ECPRepository` or null if no repository with such name exists.

### getRepositories

    public Collection<ECPRepository> getRepositories()

  Returns all known repositories.

  Specified by:
    `getRepositories` in interface `ECPRepositoryManager`
  Returns:
    an array of all known `ECPRepositories`

### hasRepositories

    public boolean hasRepositories()

  Checks whether any repositories are available.

  Returns:
    true if any repository is available, false otherwise

### addRepository

    public 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.

  Specified by:
    `addRepository` in interface `ECPRepositoryManager`
  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`

### notifyObjectsChanged

    public void notifyObjectsChanged(ECPRepository repository,
                                     Collection<Object> objects)

  This is called by the `ECPRepository` to notificate observers about chnages it its objects.

  Parameters:
    `repository` - the repository where the changes occured
    `objects` - the changed objects

### providersChanged

    public void providersChanged(Collection<ECPProvider> oldProviders,
                                 Collection<ECPProvider> newProviders)

  This is called to indicate, that providers changed. Either a provider was added or removed.

  Specified by:
    `providersChanged` in interface `ECPProvidersChangedObserver`
  Parameters:
    `oldProviders` - provider before change
    `newProviders` - providers after change

Overview | Package | Class | Use | Tree | Deprecated | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2015. All Rights Reserved.