public abstract class WorkspaceBase extends org.eclipse.emf.ecore.impl.EObjectImpl implements Workspace, ESDisposable, DeleteProjectSpaceObserver
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList| Constructor and Description |
|---|
WorkspaceBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
addProjectSpace(ProjectSpace projectSpace)
Adds a new ProjectSpace to the workspace.
|
void |
addServerInfo(ServerInfo serverInfo)
Adds an server info and saves.
|
ProjectSpace |
cloneProject(String projectName,
Project project)
Initializes a new project space and clones the given project.
|
ESWorkspaceImpl |
createAPI()
Creates the API interface for this class.
|
ProjectSpace |
createLocalProject(String projectName)
Creates a new local project that is not shared with the server yet.
|
ProjectSpace |
createLocalProject(String projectName,
Project project,
boolean cloneProject)
Initializes a new project space.
|
void |
dispose()
Marker method for classes that need to perform clean-up tasks.
|
void |
exportProjectSpace(ProjectSpace projectSpace,
File file)
Exports a project space to a file.
|
void |
exportProjectSpace(ProjectSpace projectSpace,
File file,
org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Exports a project space to a file.
|
void |
exportWorkSpace(File file)
Exports the whole workspace.
|
void |
exportWorkSpace(File file,
org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Exports the whole workspace to the given file.
|
Object |
getAdapter(Class adapter)
This is to enable the workspace to be root of table views. |
AdminBroker |
getAdminBroker(ServerInfo serverInfo)
Returns an
AdminBroker related to the given ServerInfo. |
AdminBroker |
getAdminBroker(Usersession usersession)
Returns an
AdminBroker related to the given Usersession. |
org.eclipse.emf.edit.domain.EditingDomain |
getEditingDomain()
Return this editing domain belonging to this workspace.
|
ProjectSpace |
getProjectSpace(Project project)
Retrieves the project space for the given project.
|
org.eclipse.emf.ecore.resource.ResourceSet |
getResourceSet()
Returns the workspace resource set.
|
ProjectSpace |
importProject(Project project,
String name,
String description)
Imports a project into a project space.
|
ProjectSpace |
importProject(String absoluteFileName)
Import an existing project from a given file.
|
ProjectSpace |
importProjectSpace(String absoluteFileName)
Import an existing project space from a file.
|
void |
init()
Initializes the workspace and its project spaces.
|
void |
projectSpaceDeleted(ProjectSpace projectSpace)
Notifies that the project space has been deleted.
|
void |
removeServerInfo(ServerInfo serverInfo)
Removes an server info and saves.
|
void |
removeUsersession(Usersession session)
Remove the given
Usersession from the workspace. |
Set<ProjectSpace> |
resolve(ProjectUrlFragment projectUrlFragment)
Resolves a project URL fragment to the project space the project is in.
Since a project may have been checked out multiple times, a set of project spaces is returned. |
Set<ServerInfo> |
resolve(ServerUrl serverUrl)
Resolves a server URL to a server.
|
void |
save()
Make the current workspace state persistent.
|
void |
setAPIImpl(ESWorkspaceImpl apiImpl)
Set the API implementation class.
|
void |
setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Set the workspace resource set.
|
ESWorkspaceImpl |
toAPI()
Returns the API interface of this class.
|
void |
updateACUser(ServerInfo serverInfo)
Updates the ACUser and it roles.
|
void |
updateACUser(Usersession usersession)
Updates the ACUser and it roles.
|
eAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eSetClass, eSetDeliver, eSetProxyURIeAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eContainer, eContainingFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInverseRemove, eInvoke, eIsSet, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eResolveProxy, eResource, eSet, eSet, eSetResource, eSetStore, eSetting, eStore, eUnset, eUnset, eURIFragmentSegment, eVirtualGet, eVirtualGet, eVirtualIsSet, eVirtualSet, eVirtualUnset, toStringeNotificationRequired, eNotifyequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetProjectSpaces, getServerInfos, getUsersessionseAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnsetpublic void addProjectSpace(ProjectSpace projectSpace)
projectSpace - The project space to be addedpublic ProjectSpace createLocalProject(String projectName, Project project, boolean cloneProject)
projectName - the name of the new projectproject - the project to be contained in the project spacecloneProject - whether to clone the projectProjectSpace of the cloned Projectpublic ProjectSpace cloneProject(String projectName, Project project)
projectName - the name of the new projectproject - the project to be cloned and contained in the project spaceProjectSpace of the cloned Projectpublic ProjectSpace createLocalProject(String projectName)
createLocalProject in interface WorkspaceprojectName - the project nameESWorkspace.createLocalProject(java.lang.String)public void init()
init in interface WorkspaceWorkspace.init()public void dispose()
dispose in interface ESDisposableESDisposable.dispose()public void setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
setResourceSet in interface WorkspaceresourceSet - The resource set to be set.Workspace.setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet)public void updateACUser(ServerInfo serverInfo) throws ESException
updateACUser in interface WorkspaceserverInfo - The ServerInfo that is used to update the ACUser.ESException - if an error occurs while updating the ACUserWorkspace.updateACUser(org.eclipse.emf.emfstore.internal.client.model.ServerInfo)public void updateACUser(Usersession usersession) throws ESException
updateACUser in interface Workspaceusersession - The Usersession that should be used to update the
ACUser. If null, the session manager will search
for a session.ESException - if an error occurs while updating the ACUserWorkspace.updateACUser(org.eclipse.emf.emfstore.internal.client.model.Usersession)public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
getResourceSet in interface Workspacepublic ProjectSpace importProject(Project project, String name, String description)
importProject in interface Workspaceproject - The project to be importedname - The name that should be assigned to the project being
imported.description - A description of the project being importedpublic ProjectSpace importProject(String absoluteFileName) throws IOException
importProject in interface WorkspaceabsoluteFileName - The absolute path to a file to import from.IOException - If importing the project failsWorkspace.importProject(java.lang.String)public ProjectSpace importProjectSpace(String absoluteFileName) throws IOException
importProjectSpace in interface WorkspaceabsoluteFileName - The absolute path to a file to import from.IOException - If accessing the file or importing failsWorkspace.importProjectSpace(java.lang.String)public Set<ProjectSpace> resolve(ProjectUrlFragment projectUrlFragment) throws ProjectUrlResolutionException
resolve in interface WorkspaceprojectUrlFragment - the project URL fragment to resolveProjectUrlResolutionException - if the project belonging to the given project URL fragment
cannot be found in workspaceWorkspace.resolve(org.eclipse.emf.emfstore.internal.server.model.url.ProjectUrlFragment)public Set<ServerInfo> resolve(ServerUrl serverUrl) throws ServerUrlResolutionException
resolve in interface WorkspaceserverUrl - the server URL to be resolvedServerInfoServerUrlResolutionException - if no matching server info can be foundWorkspace.resolve(org.eclipse.emf.emfstore.internal.server.model.url.ServerUrl)public void save()
save in interface WorkspaceWorkspace.save()public void exportProjectSpace(ProjectSpace projectSpace, File file) throws IOException
exportProjectSpace in interface WorkspaceprojectSpace - The project space that should be exportedfile - The file to export toIOException - If creating the export file failsWorkspace.exportProjectSpace(org.eclipse.emf.emfstore.internal.client.model.ProjectSpace,
java.io.File)public void exportProjectSpace(ProjectSpace projectSpace, File file, org.eclipse.core.runtime.IProgressMonitor progressMonitor) throws IOException
exportProjectSpace in interface WorkspaceprojectSpace - The project space that should be exportedfile - The file to export toprogressMonitor - The progress monitor that should be used during the xportIOException - If creating the export file failsWorkspace.exportProjectSpace(org.eclipse.emf.emfstore.internal.client.model.ProjectSpace,
java.io.File, org.eclipse.core.runtime.IProgressMonitor)public void exportWorkSpace(File file) throws IOException
exportWorkSpace in interface Workspacefile - The file to export toIOException - If creating the export file failsWorkspace.exportWorkSpace(java.io.File)public void exportWorkSpace(File file, org.eclipse.core.runtime.IProgressMonitor progressMonitor) throws IOException
exportWorkSpace in interface Workspacefile - The file to export toprogressMonitor - The progress monitor that should be used during the exportIOException - If creating the export file failsWorkspace.exportWorkSpace(java.io.File,
org.eclipse.core.runtime.IProgressMonitor)public Object getAdapter(Class adapter)
getAdapter in interface org.eclipse.core.runtime.IAdaptableIAdaptable.getAdapter(java.lang.Class)public AdminBroker getAdminBroker(ServerInfo serverInfo) throws ESException, AccessControlException
AdminBroker related to the given ServerInfo.getAdminBroker in interface WorkspaceserverInfo - The ServerInfo that should be used to retrieve the
admin broker.AdminBroker related to the given server info.ESException - If an error occurs while retrieving the admin brokerAccessControlException - If access is deniedWorkspace.getAdminBroker(org.eclipse.emf.emfstore.internal.client.model.ServerInfo)public AdminBroker getAdminBroker(Usersession usersession) throws ESException, AccessControlException
AdminBroker related to the given Usersession.getAdminBroker in interface Workspaceusersession - The user session that should be used to retrieve the admin
broker.null, the session manager will search for a
session.AdminBroker related to the given user session.ESException - If an error occurs while retrieving the admin brokerAccessControlException - If access is deniedWorkspace.getAdminBroker(org.eclipse.emf.emfstore.internal.client.model.Usersession)public org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
getEditingDomain in interface WorkspaceWorkspace.getEditingDomain()public ProjectSpace getProjectSpace(Project project) throws UnkownProjectException
getProjectSpace in interface Workspaceproject - The project for which to retrieve the project space.UnkownProjectException - If the project is not known to the workspaceWorkspace.getProjectSpace(org.eclipse.emf.emfstore.internal.common.model.Project)public void projectSpaceDeleted(ProjectSpace projectSpace)
projectSpaceDeleted in interface DeleteProjectSpaceObserverprojectSpace - the project spaceDeleteProjectSpaceObserver.projectSpaceDeleted(org.eclipse.emf.emfstore.internal.client.model.ProjectSpace)public void addServerInfo(ServerInfo serverInfo)
addServerInfo in interface WorkspaceserverInfo - the server info to be addedWorkspace.addServerInfo(org.eclipse.emf.emfstore.internal.client.model.ServerInfo)public void removeServerInfo(ServerInfo serverInfo)
removeServerInfo in interface WorkspaceserverInfo - the server info to be removedWorkspace.removeServerInfo(org.eclipse.emf.emfstore.internal.client.model.ServerInfo)public void removeUsersession(Usersession session) throws ESException
Usersession from the workspace.removeUsersession in interface Workspacesession - the session to be removedESException - in case removing the session failsWorkspace.removeUsersession(org.eclipse.emf.emfstore.internal.client.model.Usersession)public ESWorkspaceImpl toAPI()
toAPI in interface APIDelegate<ESWorkspaceImpl>APIDelegate.toAPI()public void setAPIImpl(ESWorkspaceImpl apiImpl)
apiImpl - the internal workspace implementation class to be usedpublic ESWorkspaceImpl createAPI()
createAPI in interface APIDelegate<ESWorkspaceImpl>APIDelegate.createAPI()Copyright © 2017. All rights reserved.