public class CDOProvider extends DefaultProvider
InternalProvider.LifecycleEvent
ECPDisposable.DisposeListener
Modifier and Type | Field and Description |
---|---|
static String |
NAME
The unique provider name.
|
static String |
PROP_BRANCH_PATH
The key for the branch path ECP project property.
|
static String |
PROP_CONNECTOR_DESCRIPTION
The key for the connector description ECP project property.
|
static String |
PROP_CONNECTOR_TYPE
The key for the connector type ECP project property.
|
static String |
PROP_REPOSITORY_NAME
The key for the repository name ECP project property.
|
static String |
PROP_TIME_STAMP
The key for the time stamp ECP project property.
|
static String |
PROP_WORKSPACE_ID
The key for the workspace ID ECP project property.
|
EMF_ADAPTER_FACTORY
TYPE
Constructor and Description |
---|
CDOProvider()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cloneProject(InternalProject projectToClone,
InternalProject targetProject)
This method clones a project.
|
protected org.eclipse.emf.cdo.server.db.IDBStore |
createLocalStore(InternalProject project,
File folder)
Create a local
IDBStore . |
protected void |
createProject(InternalProject project)
Creates a provider specific project for the given internal project.
|
protected org.eclipse.emf.cdo.workspace.CDOWorkspaceBase |
createWorkspaceBase(InternalProject project,
File folder)
Create and store a
CDOWorkspaceBase . |
protected org.eclipse.emf.cdo.workspace.CDOWorkspaceConfiguration |
createWorkspaceConfiguration(InternalProject project)
Create and store a
CDOWorkspaceConfiguration for the given internal project. |
protected void |
disposeProject(InternalProject project)
Dispose the given project and its data.
|
void |
doDelete(InternalProject project,
Collection<Object> objects)
Executes the delete opertation.
|
protected void |
doDispose()
This method is called when a provider is disposed.
|
void |
fillChildren(ECPContainer context,
Object parent,
InternalChildrenList childrenList)
Fills the elements of a certain parent object, depending on the context into the childrenList.
|
<T> T |
getAdapter(Object adaptable,
Class<T> adapterType) |
org.eclipse.emf.common.util.EList<Object> |
getElements(InternalProject project)
This method returns an
EList of the root elements. |
static CDOProvider |
getInstance()
Deprecated.
use ECPUtil.getECPProviderRegistry().getProvider(CDOProvider.NAME) instead
|
ECPContainer |
getModelContext(Object element)
Returns the first
ECPContainer that can be found for the provided Object. |
static CDOProjectData |
getProjectData(InternalProject project)
Get
CDOProjectData for the given internal project. |
static File |
getProjectFolder(InternalProject project)
Get the folder for the configuration data of the internal project.
|
static CDORepositoryData |
getRepositoryData(InternalRepository repository)
Retrieve
CDORepositoryData for a given InternalRepository . |
org.eclipse.emf.common.notify.Notifier |
getRoot(InternalProject project)
Method checking whether an object is the root of the model container.
|
void |
handleLifecycle(ECPContainer context,
InternalProvider.LifecycleEvent event)
This method is called to handle a specific life cycle.
|
boolean |
isSlow(Object parent)
Whether this provider is slow or not.
|
boolean |
isThreadSafe()
Whether it is safe to modify the
EList of model elements
ot this provider. |
protected void |
removeProject(InternalProject project)
Remove the internal project and its configuration data.
|
addDisposeListener, contains, createCommandStack, createEditingDomain, delete, dispose, doSave, getAdapter, getDescription, getLabel, getLinkElements, getModelContextFromAdapter, getOpenProjects, getProvider, getType, getUIProvider, getUnsupportedEPackages, hasCreateProjectWithoutRepositorySupport, hasCreateRepositorySupport, isDirty, isDisposed, modelExists, 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
public static final String PROP_CONNECTOR_TYPE
public static final String PROP_CONNECTOR_DESCRIPTION
public static final String PROP_REPOSITORY_NAME
public static final String PROP_BRANCH_PATH
public static final String PROP_TIME_STAMP
public static final String PROP_WORKSPACE_ID
@Deprecated public static CDOProvider getInstance()
protected void doDispose()
DefaultProvider
doDispose
in class DefaultProvider
public <T> T getAdapter(Object adaptable, Class<T> adapterType)
DefaultProvider
getAdapter
in interface AdapterProvider
getAdapter
in class DefaultProvider
public boolean isSlow(Object parent)
DefaultProvider
isSlow
in interface InternalProvider
isSlow
in class DefaultProvider
parent
- to checkpublic void fillChildren(ECPContainer context, Object parent, InternalChildrenList childrenList)
DefaultProvider
fillChildren
in interface InternalProvider
fillChildren
in class DefaultProvider
context
- the context to useparent
- the parent to read the children fromchildrenList
- the list to fillpublic org.eclipse.emf.common.util.EList<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)
DefaultProvider
handleLifecycle
in interface InternalProvider
handleLifecycle
in class DefaultProvider
context
- the context to handle the lifecycle forevent
- the lifecycle event to handleprotected void createProject(InternalProject project)
project
- the internal projectpublic ECPContainer getModelContext(Object element)
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 elementprotected org.eclipse.emf.cdo.workspace.CDOWorkspaceConfiguration createWorkspaceConfiguration(InternalProject project)
CDOWorkspaceConfiguration
for the given internal project.project
- the internal project.CDOWorkspaceConfiguration
protected org.eclipse.emf.cdo.workspace.CDOWorkspaceBase createWorkspaceBase(InternalProject project, File folder)
CDOWorkspaceBase
.project
- the internal project.folder
- the folder to put the CDOWorkspaceBase
intoCDOWorkspaceBase
protected org.eclipse.emf.cdo.server.db.IDBStore createLocalStore(InternalProject project, File folder)
IDBStore
.project
- the internal projectfolder
- the folder to store the data inIDBStore
protected void disposeProject(InternalProject project)
project
- the internal projectprotected void removeProject(InternalProject project)
project
- the internal projectpublic static CDORepositoryData getRepositoryData(InternalRepository repository)
CDORepositoryData
for a given InternalRepository
.repository
- the internal repositorzCDORepositoryData
public static CDOProjectData getProjectData(InternalProject project)
CDOProjectData
for the given internal project.project
- the internal projectCDOProjectData
public static File getProjectFolder(InternalProject project)
project
- the internal project.File
public void cloneProject(InternalProject projectToClone, InternalProject targetProject)
projectToClone
- the project to be clonedtargetProject
- the project to add the cloned data topublic 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 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.