|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.ecp.internal.core.util.Element
org.eclipse.emf.ecp.spi.core.DefaultProvider
org.eclipse.emf.ecp.emfstore.core.internal.EMFStoreProvider
public final class EMFStoreProvider
This is the EMFStore Provider for ECP.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.emf.ecp.spi.core.InternalProvider |
---|
InternalProvider.LifecycleEvent |
Nested classes/interfaces inherited from interface org.eclipse.emf.ecp.spi.core.util.ECPDisposable |
---|
ECPDisposable.DisposeListener |
Field Summary | |
---|---|
static EMFStoreProvider |
INSTANCE
EMFStore Provider Singleton. |
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. |
Fields inherited from interface org.eclipse.emf.ecp.spi.core.InternalProvider |
---|
EMF_ADAPTER_FACTORY |
Fields inherited from interface org.eclipse.emf.ecp.core.ECPProvider |
---|
TYPE |
Constructor Summary | |
---|---|
EMFStoreProvider()
Default constructor. |
Method Summary | |
---|---|
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 |
delete(InternalProject project,
Collection<Object> objects)
Deletes a collection of EObjects from the model. |
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. |
Methods inherited from class org.eclipse.emf.ecp.spi.core.DefaultProvider |
---|
addDisposeListener, dispose, getAdapter, getAdapter, getDescription, getLabel, getOpenProjects, getProvider, getType, getUIProvider, getUnsupportedEPackages, hasCreateRepositorySupport, isDisposed, isSlow, removeDisposeListener, setDescription, setLabel, setUIProvider |
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 |
Field Detail |
---|
public static final String NAME
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
Constructor Detail |
---|
public EMFStoreProvider()
Method Detail |
---|
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 for
public 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 add
Iterator
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 check
public void delete(InternalProject project, Collection<Object> objects)
project
- the project from where to deleteobjects
- the Collection
if Objects
to deletepublic 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 check
public org.eclipse.emf.common.notify.Notifier getRoot(InternalProject project)
project
- to check the root container for
Notifier
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 check
public 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
for
ECPContainer
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 for
public 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 for
public ECPProject getProject(org.eclipse.emf.emfstore.client.ESLocalProject projectSpace)
projectSpace
- the ProjectSpace
to get the ECPProject
for
ECPProject
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
for
ECPRepository
corresponding to this ServerInfo or null if none foundpublic boolean isThreadSafe()
EList
of model elements
ot this provider.
InternalProvider.isThreadSafe()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |