public final class EMFStoreProvider extends DefaultProvider
InternalProvider.LifecycleEvent
ECPDisposable.DisposeListener
Modifier and Type | Field and Description |
---|---|
static EMFStoreProvider |
INSTANCE
Deprecated.
use ECPUtil.getECPProviderRegistry().getProvider(EMFStoreProvider.NAME) instead
|
static String |
NAME
This is the name of the EMFStore Provider.
|
static String |
PROP_CERTIFICATE
Property constant for Repository Certificate.
|
static String |
PROP_PORT
Property constant for Repository Port.
|
static String |
PROP_PROJECTSPACEID
Property constant for ProjectSpaceID.
|
static String |
PROP_REPOSITORY_URL
Property constant for Repository URL.
|
static String |
PROP_SERVERINFOID
Property constant for ServerInfoID.
|
EMF_ADAPTER_FACTORY
TYPE
Constructor and Description |
---|
EMFStoreProvider()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cloneProject(InternalProject projectToClone,
InternalProject targetProject)
This method clones a project.
|
boolean |
contains(InternalProject project,
Object object)
Checks whether a specific project contains a specific object.
|
org.eclipse.emf.edit.domain.EditingDomain |
createEditingDomain(InternalProject project)
This method creates an editing domain each time it is called.
|
void |
doDelete(InternalProject project,
Collection<Object> objects)
Executes the delete opertation.
|
void |
doSave(InternalProject project)
Convenient implementation where nothing happens.
|
void |
fillChildren(ECPContainer context,
Object parent,
InternalChildrenList childrenList)
Fills the elements of a certain parent object, depending on the context into the childrenList.
|
org.eclipse.emf.common.util.EList<? extends Object> |
getElements(InternalProject project)
This method returns an
EList of the root elements. |
Iterator<org.eclipse.emf.ecore.EObject> |
getLinkElements(InternalProject project,
org.eclipse.emf.ecore.EObject modelElement,
org.eclipse.emf.ecore.EReference eReference)
Convenient implementation of the
DefaultProvider.getLinkElements(InternalProject, EObject, EReference) method to use the
ItemPropertyDescriptor to get all object of an object. |
ECPContainer |
getModelContext(Object element)
Returns the first
ECPContainer that can be found for the provided Object. |
ECPProject |
getProject(org.eclipse.emf.emfstore.client.ESLocalProject projectSpace)
This gets the ECPProject based on a ProjectSpace.
|
org.eclipse.emf.emfstore.client.ESLocalProject |
getProjectSpace(InternalProject internalProject)
This retrieves the
ProjectSpace from an InternalProject . |
ECPRepository |
getRepository(org.eclipse.emf.emfstore.client.ESServer serverInfo)
This gets the ECPRepository based on a ServerInfo.
|
org.eclipse.emf.common.notify.Notifier |
getRoot(InternalProject project)
Method checking whether an object is the root of the model container.
|
org.eclipse.emf.emfstore.client.ESServer |
getServerInfo(InternalRepository internalRepository)
This retrieves the
ServerInfo from an
InternalRepository . |
void |
handleLifecycle(ECPContainer context,
InternalProvider.LifecycleEvent event)
This method is called to handle a specific life cycle.
|
boolean |
hasCreateProjectWithoutRepositorySupport()
Convenient implementation that return false.
|
boolean |
isDirty(InternalProject project)
Convenient implementation where the provider saves changes of the project automatically, so a project never gets
dirty.
|
boolean |
isThreadSafe()
Whether it is safe to modify the
EList of model elements
ot this provider. |
boolean |
modelExists(InternalProject project)
Convenient implementation that return true during this check.
|
addDisposeListener, createCommandStack, delete, dispose, doDispose, getAdapter, getAdapter, getDescription, getLabel, getModelContextFromAdapter, getOpenProjects, getProvider, getType, getUIProvider, getUnsupportedEPackages, hasCreateRepositorySupport, isDisposed, isSlow, notifyProviderChangeListeners, registerChangeListener, removeDisposeListener, setDescription, setLabel, setUIProvider, unregisterChangeListener
compareTo, equals, getName, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getName
compareTo
public static final String NAME
@Deprecated public static EMFStoreProvider INSTANCE
public static final String PROP_REPOSITORY_URL
public static final String PROP_PORT
public static final String PROP_CERTIFICATE
public static final String PROP_PROJECTSPACEID
public static final String PROP_SERVERINFOID
public org.eclipse.emf.edit.domain.EditingDomain createEditingDomain(InternalProject project)
createEditingDomain
in interface InternalProvider
createEditingDomain
in class DefaultProvider
project
- the InternalProject
to create the domain for.EditingDomain
public void fillChildren(ECPContainer context, Object parent, InternalChildrenList childrenList)
fillChildren
in interface InternalProvider
fillChildren
in class DefaultProvider
context
- the context to useparent
- the parent to read the children fromchildrenList
- the list to fillpublic boolean hasCreateProjectWithoutRepositorySupport()
DefaultProvider
hasCreateProjectWithoutRepositorySupport
in interface ECPProvider
hasCreateProjectWithoutRepositorySupport
in class DefaultProvider
public org.eclipse.emf.common.util.EList<? extends Object> getElements(InternalProject project)
EList
of the root elements.project
- the project to get the root elements forpublic void handleLifecycle(ECPContainer context, InternalProvider.LifecycleEvent event)
handleLifecycle
in interface InternalProvider
handleLifecycle
in class DefaultProvider
context
- the context to handle the lifecycle forevent
- the lifecycle event to handlepublic Iterator<org.eclipse.emf.ecore.EObject> getLinkElements(InternalProject project, org.eclipse.emf.ecore.EObject modelElement, org.eclipse.emf.ecore.EReference eReference)
DefaultProvider.getLinkElements(InternalProject, EObject, EReference)
method to use the
ItemPropertyDescriptor
to get all object of an object.getLinkElements
in interface InternalProvider
getLinkElements
in class DefaultProvider
project
- the project the call is frommodelElement
- EObject
to add the EReference
toeReference
- the EReference
to addIterator
of EObject
that can be linkedpublic void doSave(InternalProject project)
doSave
in interface InternalProvider
doSave
in class DefaultProvider
project
- the project to savepublic boolean isDirty(InternalProject project)
isDirty
in interface InternalProvider
isDirty
in class DefaultProvider
project
- the project to checkpublic void cloneProject(InternalProject projectToClone, InternalProject targetProject)
projectToClone
- the project to be clonedtargetProject
- the project to add the cloned data topublic boolean modelExists(InternalProject project)
modelExists
in interface InternalProvider
modelExists
in class DefaultProvider
project
- the project to checkpublic org.eclipse.emf.common.notify.Notifier getRoot(InternalProject project)
project
- to check the root container forNotifier
that is the model root of this projectpublic boolean contains(InternalProject project, Object object)
DefaultProvider
contains
in interface InternalProvider
contains
in class DefaultProvider
project
- the project to checkobject
- the object to checkpublic ECPContainer getModelContext(Object element)
DefaultProvider
ECPContainer
that can be found for the provided Object.getModelContext
in interface ECPModelContextProvider
getModelContext
in class DefaultProvider
element
- the element to search the ECPContainer
forECPContainer
of this elementpublic org.eclipse.emf.emfstore.client.ESLocalProject getProjectSpace(InternalProject internalProject)
ProjectSpace
from an InternalProject
.
First it checks whether the InternalProject
has a ProjectSpaceID attached.
If an ID is attached, a ProjectSpace is searched with this ID.
If no ID is attached or now ProjectSpace was found a LocalProject is created.internalProject
- the project to get the ProjectSpace forpublic org.eclipse.emf.emfstore.client.ESServer getServerInfo(InternalRepository internalRepository)
ServerInfo
from an
InternalRepository
.
First it checks whether the InternalRepository
has a ServerInfoID attached.
If an ID is attached, a ServerInfo is searched with this ID.
If no ID is attached or now ServerInfo was found a default ServerInfo is created.internalRepository
- the repository to get the ServerInfo forpublic ECPProject getProject(org.eclipse.emf.emfstore.client.ESLocalProject projectSpace)
projectSpace
- the ProjectSpace
to get the ECPProject
forECPProject
corresponding to this ProjectSpace or null if none foundpublic ECPRepository getRepository(org.eclipse.emf.emfstore.client.ESServer serverInfo)
serverInfo
- the ESServer
to get the ECPRepository
forECPRepository
corresponding to this ServerInfo or null if none foundpublic boolean isThreadSafe()
EList
of model elements
ot this provider.InternalProvider.isThreadSafe()
public void doDelete(InternalProject project, Collection<Object> objects)
doDelete
in class DefaultProvider
project
- the project from where to deleteobjects
- the Collection
if Objects
to deleteDefaultProvider.doDelete(org.eclipse.emf.ecp.spi.core.InternalProject,
java.util.Collection)
Copyright © 2017. All rights reserved.