public final class ECPRepositoryImpl extends PropertiesElement implements InternalRepository, ECPDisposable.DisposeListener
ECPDisposable.DisposeListener
TYPE
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
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.
|
protected void |
propertiesChanged(Collection<Map.Entry<String,String>> oldProperties,
Collection<Map.Entry<String,String>> newProperties)
Called if the properties of the element change.
|
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) |
cleanup, getProperties
compareTo, equals, getName, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getName
compareTo
getProperties
public ECPRepositoryImpl(ECPProvider provider, String name, ECPProperties properties)
provider
- the ECPProvider
for this repositoryname
- the name of this repositoryproperties
- the ECPProperties
of this repositorypublic ECPRepositoryImpl(ObjectInput in) throws IOException
ECPRepositoryManager
when loading
existing repositories during startup.in
- the ObjectInput
to parseIOException
- when an error occurspublic String getType()
public void disposed(ECPDisposable disposable) throws DisposeException
disposed
in interface ECPDisposable.DisposeListener
disposable
- the object being disposedDisposeException
- is thrown when something goes wrongpublic boolean isStorable()
isStorable
in interface PropertiesStore.StorableElement
public void write(ObjectOutput out) throws IOException
PropertiesElement
write
in interface PropertiesStore.StorableElement
write
in class PropertiesElement
IOException
public String getLabel()
ECPRepository
.getLabel
in interface ECPRepository
getLabel
in interface InternalRegistryElement
public void setLabel(String label)
setLabel
in interface InternalRegistryElement
label
- the Label to setpublic String getDescription()
ECPRepository
.getDescription
in interface ECPRepository
getDescription
in interface InternalRegistryElement
public void setDescription(String description)
setDescription
in interface InternalRegistryElement
description
- the Description to setpublic boolean isDisposed()
isDisposed
in interface ECPDisposable
public Object getAdapter(Class adapterType)
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).
adapterType
- the class to adapt tonull
IAdaptable.getAdapter(Class)
public void dispose()
dispose
in interface ECPDisposable
public void addDisposeListener(ECPDisposable.DisposeListener listener)
ECPDisposable.DisposeListener
to this instance.addDisposeListener
in interface ECPDisposable
listener
- the listener to addpublic void removeDisposeListener(ECPDisposable.DisposeListener listener)
ECPDisposable.DisposeListener
from this instance.removeDisposeListener
in interface ECPDisposable
listener
- the listener to removepublic InternalProvider getProvider()
getProvider
in interface ECPProviderAware
getProvider
in interface InternalRepository
public Object getProviderSpecificData()
getProviderSpecificData
in interface InternalRepository
public void setProviderSpecificData(Object providerSpecificData)
setProviderSpecificData
in interface InternalRepository
providerSpecificData
- the provider specific data to setpublic boolean canDelete()
canDelete
in interface ECPContainer
public void delete()
delete
in interface ECPContainer
public void notifyObjectsChanged(Collection<Object> objects)
notifyObjectsChanged
in interface InternalRepository
objects
- that have changedpublic InternalProject[] getOpenProjects()
ECPProjects
that are shared on this repositoryprotected void propertiesChanged(Collection<Map.Entry<String,String>> oldProperties, Collection<Map.Entry<String,String>> newProperties)
PropertiesElement
propertiesChanged
in class PropertiesElement
oldProperties
- the old propertiesnewProperties
- the new propertiesCopyright © 2019. All rights reserved.