|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.common.notify.impl.BasicNotifierImpl org.eclipse.emf.ecore.impl.BasicEObjectImpl org.eclipse.emf.ecore.impl.EObjectImpl org.eclipse.emf.emfstore.internal.client.model.impl.WorkspaceBase
public abstract class WorkspaceBase
Workspace space base class that contains custom user methods.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
---|
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 |
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject |
---|
org.eclipse.emf.ecore.InternalEObject.EStore |
Field Summary |
---|
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
---|
ELAST_EOBJECT_FLAG |
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject |
---|
EOPPOSITE_FEATURE_BASE |
Constructor Summary | |
---|---|
WorkspaceBase()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
---|
eAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eSetClass, eSetDeliver, eSetProxyURI |
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
---|
eAllContents, 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, toString |
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
---|
eNotificationRequired, eNotify |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.emfstore.internal.client.model.Workspace |
---|
getProjectSpaces, getServerInfos, getUsersessions |
Methods inherited from interface org.eclipse.emf.ecore.EObject |
---|
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
---|
eAdapters, eDeliver, eNotify, eSetDeliver |
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject |
---|
eNotificationRequired |
Constructor Detail |
---|
public WorkspaceBase()
Method Detail |
---|
public 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 project
ProjectSpace
of the cloned Project
public ProjectSpace cloneProject(String projectName, Project project)
projectName
- the name of the new projectproject
- the project to be cloned and contained in the project space
ProjectSpace
of the cloned Project
public ProjectSpace createLocalProject(String projectName)
createLocalProject
in interface Workspace
projectName
- the project name
ESWorkspace.createLocalProject(java.lang.String)
public void init()
init
in interface Workspace
Workspace.init()
public void dispose()
dispose
in interface ESDisposable
ESDisposable.dispose()
public void setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
setResourceSet
in interface Workspace
resourceSet
- The resource set to be set.Workspace.setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet)
public void updateACUser(ServerInfo serverInfo) throws ESException
updateACUser
in interface Workspace
serverInfo
- 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 Workspace
usersession
- 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 Workspace
public ProjectSpace importProject(Project project, String name, String description)
importProject
in interface Workspace
project
- The project to be importedname
- The name that should be assigned to the project being
imported.description
- A description of the project being imported
public ProjectSpace importProject(String absoluteFileName) throws IOException
importProject
in interface Workspace
absoluteFileName
- 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 Workspace
absoluteFileName
- 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 Workspace
projectUrlFragment
- the project URL fragment to resolve
ProjectUrlResolutionException
- 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 Workspace
serverUrl
- the server URL to be resolved
ServerInfo
ServerUrlResolutionException
- if no matching server info can be foundWorkspace.resolve(org.eclipse.emf.emfstore.internal.server.model.url.ServerUrl)
public void save()
save
in interface Workspace
Workspace.save()
public void exportProjectSpace(ProjectSpace projectSpace, File file) throws IOException
exportProjectSpace
in interface Workspace
projectSpace
- The project space that should be exportedfile
- The file to export to
IOException
- 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 Workspace
projectSpace
- The project space that should be exportedfile
- The file to export toprogressMonitor
- The progress monitor that should be used during the xport
IOException
- 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 Workspace
file
- The file to export to
IOException
- 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 Workspace
file
- The file to export toprogressMonitor
- The progress monitor that should be used during the export
IOException
- 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.IAdaptable
IAdaptable.getAdapter(java.lang.Class)
public AdminBroker getAdminBroker(ServerInfo serverInfo) throws ESException, AccessControlException
AdminBroker
related to the given ServerInfo
.
getAdminBroker
in interface Workspace
serverInfo
- 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 broker
AccessControlException
- 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 Workspace
usersession
- 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 broker
AccessControlException
- If access is deniedWorkspace.getAdminBroker(org.eclipse.emf.emfstore.internal.client.model.Usersession)
public org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
getEditingDomain
in interface Workspace
Workspace.getEditingDomain()
public ProjectSpace getProjectSpace(Project project) throws UnkownProjectException
getProjectSpace
in interface Workspace
project
- 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 DeleteProjectSpaceObserver
projectSpace
- the project spaceDeleteProjectSpaceObserver.projectSpaceDeleted(org.eclipse.emf.emfstore.internal.client.model.ProjectSpace)
public void addServerInfo(ServerInfo serverInfo)
addServerInfo
in interface Workspace
serverInfo
- the server info to be addedWorkspace.addServerInfo(org.eclipse.emf.emfstore.internal.client.model.ServerInfo)
public void removeServerInfo(ServerInfo serverInfo)
removeServerInfo
in interface Workspace
serverInfo
- 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 Workspace
session
- the session to be removed
ESException
- 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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |