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 ECPRepositoryImpl

    java.lang.Object
      org.eclipse.emf.ecp.internal.core.util.Element
          org.eclipse.emf.ecp.internal.core.util.PropertiesElement
              org.eclipse.emf.ecp.internal.core.ECPRepositoryImpl

All Implemented Interfaces:
  Comparable<ECPElement>, ECPRepository, ECPContainer, ECPElement, ECPPropertiesAware, ECPProviderAware, PropertiesStore.StorableElement, InternalRepository, ECPDisposable, ECPDisposable.DisposeListener, InternalRegistryElement

    public final class ECPRepositoryImpl

extends PropertiesElement
implements InternalRepository, ECPDisposable.DisposeListener

This Class describes a repository.

Author:
  Eike Stepper, Eugen Neufeld

Nested Class Summary

Nested classes/interfaces inherited from interface org.eclipse.emf.ecp.spi.core.util.ECPDisposable
`ECPDisposable.DisposeListener`

Field Summary

Fields inherited from interface org.eclipse.emf.ecp.core.ECPRepository
`TYPE`

Constructor Summary
`ECPRepositoryImpl(ECPProvider provider, String name, ECPProperties properties)` Constructor used to create an instance through user input.
`ECPRepositoryImpl(ObjectInput in)` Constructor used by the `ECPRepositoryManager` when loading existing repositories during startup.

Method Summary
`void` | `addDisposeListener(ECPDisposable.DisposeListener listener)` Adds a `ECPDisposable.DisposeListener` to this instance.
`boolean` | `canDelete()` Whether this instance can be deleted or not.
`void` | `delete()` Deletes the current instance.
`void` | `dispose()` Disposes the current instance.
`void` | `disposed(ECPDisposable disposable)` Callback method being used to notify listeners about a dispose.
`Object` | `getAdapter(Class adapterType)` Returns an object which is an instance of the given class associated with this object.
`String` | `getDescription()` Returns the description for this `ECPRepository`.
`String` | `getLabel()` Returns the label for the `ECPRepository`.
`InternalProject[]` | `getOpenProjects()` Return all open projects of that are shared on this repository.
`InternalProvider` | `getProvider()` This method returns the provider of this repository.
`Object` | `getProviderSpecificData()` This method returns provider specific data of this repository.
`String` | `getType()` This return the type of the object.
`boolean` | `isDisposed()` Whether this instance is already disposed.
`boolean` | `isStorable()`
`void` | `notifyObjectsChanged(Collection<Object> objects)` This is a callback method used to notify the repository about changes.
`void` | `removeDisposeListener(ECPDisposable.DisposeListener listener)` Removed a `ECPDisposable.DisposeListener` from this instance.
`void` | `setDescription(String description)` Sets the description.
`void` | `setLabel(String label)` Sets the label.
`void` | `setProviderSpecificData(Object providerSpecificData)` This method sets the provider specific data for this repository.
`void` | `write(ObjectOutput out)`

Methods inherited from class org.eclipse.emf.ecp.internal.core.util.PropertiesElement
`getProperties`

Methods inherited from class org.eclipse.emf.ecp.internal.core.util.Element
`compareTo, equals, getName, hashCode, toString`

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

Methods inherited from interface org.eclipse.emf.ecp.core.util.ECPElement
`getName`

Methods inherited from interface java.lang.Comparable
`compareTo`

Methods inherited from interface org.eclipse.emf.ecp.core.util.ECPPropertiesAware
`getProperties`

Constructor Detail

### ECPRepositoryImpl

    public ECPRepositoryImpl(ECPProvider provider,
                             String name,
                             ECPProperties properties)

  Constructor used to create an instance through user input.

  Parameters:
    `provider` - the `ECPProvider` for this repository
    `name` - the name of this repository
    `properties` - the `ECPProperties` of this repository

### ECPRepositoryImpl

    public ECPRepositoryImpl(ObjectInput in)
                      throws IOException

  Constructor used by the `ECPRepositoryManager` when loading existing repositories during startup.

  Parameters:
    `in` - the `ObjectInput` to parse
  Throws:
    `IOException` - when an error occurs

Method Detail

### getType

    public String getType()

  This return the type of the object.

  Specified by:
    `getType` in class `Element`
  Returns:
    the type

### disposed

    public void disposed(ECPDisposable disposable)
                  throws DisposeException

  Callback method being used to notify listeners about a dispose.

  Specified by:
    `disposed` in interface `ECPDisposable.DisposeListener`
  Parameters:
    `disposable` - the object being disposed
  Throws:
    `DisposeException` - is thrown when something goes wrong

### isStorable

    public boolean isStorable()

  Specified by:
    `isStorable` in interface `PropertiesStore.StorableElement`

### write

    public void write(ObjectOutput out)
               throws IOException

  Description copied from class: `PropertiesElement`

  Specified by:
    `write` in interface `PropertiesStore.StorableElement`
  Overrides:
    `write` in class `PropertiesElement`
  Throws:
    `IOException`

### getLabel

    public String getLabel()

  Returns the label for the `ECPRepository`.

  Specified by:
    `getLabel` in interface `ECPRepository`
  Specified by:
    `getLabel` in interface `InternalRegistryElement`
  Returns:
    the label for this repository

### setLabel

    public void setLabel(String label)

  Sets the label.

  Specified by:
    `setLabel` in interface `InternalRegistryElement`
  Parameters:
    `label` - the Label to set

### getDescription

    public String getDescription()

  Returns the description for this `ECPRepository`.

  Specified by:
    `getDescription` in interface `ECPRepository`
  Specified by:
    `getDescription` in interface `InternalRegistryElement`
  Returns:
    the description for this repository

### setDescription

    public void setDescription(String description)

  Sets the description.

  Specified by:
    `setDescription` in interface `InternalRegistryElement`
  Parameters:
    `description` - the Description to set

### isDisposed

    public boolean isDisposed()

  Whether this instance is already disposed.

  Specified by:
    `isDisposed` in interface `ECPDisposable`
  Returns:
    true if already disposed, false otherwise.

### getAdapter

    public Object getAdapter(Class adapterType)

  Returns an object which is an instance of the given class associated with this object. Returns `null` if no such object can be found.

  This implementation of the method declared by `IAdaptable` passes the request along to the platform's adapter manager; roughly `Platform.getAdapterManager().getAdapter(this, adapter)`. Subclasses may override this method (however, if they do so, they should invoke the method on their superclass to ensure that the Platform's adapter manager is consulted).

  Parameters:
    `adapterType` - the class to adapt to
  Returns:
    the adapted object or `null`
  See Also:
    `IAdaptable.getAdapter(Class)`

### dispose

    public void dispose()

  Disposes the current instance.

  Specified by:
    `dispose` in interface `ECPDisposable`

### addDisposeListener

    public void addDisposeListener(ECPDisposable.DisposeListener listener)

  Adds a `ECPDisposable.DisposeListener` to this instance.

  Specified by:
    `addDisposeListener` in interface `ECPDisposable`
  Parameters:
    `listener` - the listener to add

### removeDisposeListener

    public void removeDisposeListener(ECPDisposable.DisposeListener listener)

  Removed a `ECPDisposable.DisposeListener` from this instance.

  Specified by:
    `removeDisposeListener` in interface `ECPDisposable`
  Parameters:
    `listener` - the listener to remove

### getProvider

    public InternalProvider getProvider()

  This method returns the provider of this repository.

  Specified by:
    `getProvider` in interface `ECPProviderAware`
  Specified by:
    `getProvider` in interface `InternalRepository`
  Returns:
    the provider of the repository

### getProviderSpecificData

    public Object getProviderSpecificData()

  This method returns provider specific data of this repository.

  Specified by:
    `getProviderSpecificData` in interface `InternalRepository`
  Returns:
    the provider specific data

### setProviderSpecificData

    public void setProviderSpecificData(Object providerSpecificData)

  This method sets the provider specific data for this repository.

  Specified by:
    `setProviderSpecificData` in interface `InternalRepository`
  Parameters:
    `providerSpecificData` - the provider specific data to set

### canDelete

    public boolean canDelete()

  Whether this instance can be deleted or not.

  Specified by:
    `canDelete` in interface `ECPContainer`
  Returns:
    true if this instance can be deleted, false otherwise.

### delete

    public void delete()

  Deletes the current instance.

  Specified by:
    `delete` in interface `ECPContainer`

### notifyObjectsChanged

    public void notifyObjectsChanged(Collection<Object> objects)

  This is a callback method used to notify the repository about changes.

  Specified by:
    `notifyObjectsChanged` in interface `InternalRepository`
  Parameters:
    `objects` - that have changed

### getOpenProjects

    public InternalProject[] getOpenProjects()

  Return all open projects of that are shared on this repository.

  Returns:
    array of currently open `ECPProjects` that are shared on this repository

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.