org.eclipse.emf.emfstore.internal.client.model
Interface Workspace

All Superinterfaces:
APIDelegate<ESWorkspaceImpl>, org.eclipse.emf.ecore.EObject, org.eclipse.core.runtime.IAdaptable, org.eclipse.emf.common.notify.Notifier
All Known Implementing Classes:
WorkspaceBase, WorkspaceImpl

public interface Workspace
extends org.eclipse.emf.ecore.EObject, org.eclipse.core.runtime.IAdaptable, APIDelegate<ESWorkspaceImpl>

A representation of the model object ' Workspace'.

See Also:
ModelPackage.getWorkspace()

Method Summary
 void addServerInfo(ServerInfo serverInfo)
          Adds an server info and saves.
 ProjectSpace createLocalProject(String projectName)
          Creates a new local project that is not shared with the server yet.
 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.
 AdminBroker getAdminBroker(ServerInfo serverInfo)
          Returns an AdminBroker related to the given ServerInfo.
 AdminBroker getAdminBroker(Usersession session)
          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.common.util.EList<ProjectSpace> getProjectSpaces()
          Returns the value of the 'Project Spaces' containment reference list.
 org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
          Returns the workspace resource set.
 org.eclipse.emf.common.util.EList<ServerInfo> getServerInfos()
          Returns the value of the 'Server Infos' containment reference list.
 org.eclipse.emf.common.util.EList<Usersession> getUsersessions()
          Returns the value of the 'Usersessions' containment reference list.
 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 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 setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
          Set the workspace resource set.
 void updateACUser(ServerInfo serverInfo)
          Updates the ACUser and it roles.
 void updateACUser(Usersession session)
          Updates the ACUser and it roles.
 
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.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.emf.emfstore.internal.common.api.APIDelegate
createAPI, toAPI
 

Method Detail

createLocalProject

ProjectSpace createLocalProject(String projectName)
Creates a new local project that is not shared with the server yet.

Parameters:
projectName - the project name
projectDescription - the project description
Returns:
the project space that the new project resides in

exportProjectSpace

void exportProjectSpace(ProjectSpace projectSpace,
                        File file)
                        throws IOException
Exports a project space to a file.

Parameters:
projectSpace - The project space that should be exported
file - The file to export to
Throws:
IOException - If creating the export file fails

exportProjectSpace

void exportProjectSpace(ProjectSpace projectSpace,
                        File file,
                        org.eclipse.core.runtime.IProgressMonitor progressMonitor)
                        throws IOException
Exports a project space to a file.

Parameters:
projectSpace - The project space that should be exported
file - The file to export to
progressMonitor - The progress monitor that should be used during the xport
Throws:
IOException - If creating the export file fails

exportWorkSpace

void exportWorkSpace(File file)
                     throws IOException
Exports the whole workspace.

Parameters:
file - The file to export to
Throws:
IOException - If creating the export file fails

exportWorkSpace

void exportWorkSpace(File file,
                     org.eclipse.core.runtime.IProgressMonitor progressMonitor)
                     throws IOException
Exports the whole workspace to the given file.

Parameters:
file - The file to export to
progressMonitor - The progress monitor that should be used during the export
Throws:
IOException - If creating the export file fails

getAdminBroker

AdminBroker getAdminBroker(ServerInfo serverInfo)
                           throws ESException,
                                  AccessControlException
Returns an AdminBroker related to the given ServerInfo.

Parameters:
serverInfo - The ServerInfo that should be used to retrieve the admin broker.
Returns:
an AdminBroker related to the given server info.
Throws:
ESException - If an error occurs while retrieving the admin broker
AccessControlException - If access is denied

getAdminBroker

AdminBroker getAdminBroker(Usersession session)
                           throws ESException,
                                  AccessControlException
Returns an AdminBroker related to the given Usersession.

Parameters:
session - The user session that should be used to retrieve the admin broker.
If null, the session manager will search for a session.
Returns:
an AdminBroker related to the given user session.
Throws:
ESException - If an error occurs while retrieving the admin broker
AccessControlException - If access is denied

getEditingDomain

org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
Return this editing domain belonging to this workspace.

Returns:
the editing domain

getProjectSpace

ProjectSpace getProjectSpace(Project project)
                             throws UnkownProjectException
Retrieves the project space for the given project.

Parameters:
project - The project for which to retrieve the project space.
Returns:
the project space the given project is contained in
Throws:
UnkownProjectException - If the project is not known to the workspace

getProjectSpaces

org.eclipse.emf.common.util.EList<ProjectSpace> getProjectSpaces()
Returns the value of the 'Project Spaces' containment reference list. The list contents are of type ProjectSpace. It is bidirectional and its opposite is ' Workspace'.

If the meaning of the 'Project Spaces' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Project Spaces' containment reference list.
See Also:
ModelPackage.getWorkspace_ProjectSpaces(), ProjectSpace.getWorkspace()

getServerInfos

org.eclipse.emf.common.util.EList<ServerInfo> getServerInfos()
Returns the value of the 'Server Infos' containment reference list. The list contents are of type ServerInfo.

If the meaning of the 'Server Infos' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Server Infos' containment reference list.
See Also:
ModelPackage.getWorkspace_ServerInfos()

getUsersessions

org.eclipse.emf.common.util.EList<Usersession> getUsersessions()
Returns the value of the 'Usersessions' containment reference list. The list contents are of type Usersession.

If the meaning of the 'Usersessions' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Usersessions' containment reference list.
See Also:
ModelPackage.getWorkspace_Usersessions()

importProject

ProjectSpace importProject(Project project,
                           String name,
                           String description)
Imports a project into a project space.

Parameters:
project - The project to be imported
name - The name that should be assigned to the project being imported.
description - A description of the project being imported
Returns:
the newly created project space in which the imported project is contained in

importProject

ProjectSpace importProject(String absoluteFileName)
                           throws IOException
Import an existing project from a given file. The project space containing the project will be created upon execution.

Parameters:
absoluteFileName - The absolute path to a file to import from.
Returns:
the newly created project space in which the imported project is contained in
Throws:
IOException - If importing the project fails

importProjectSpace

ProjectSpace importProjectSpace(String absoluteFileName)
                                throws IOException
Import an existing project space from a file.

Parameters:
absoluteFileName - The absolute path to a file to import from.
Returns:
the imported project space
Throws:
IOException - If accessing the file or importing fails

init

void init()
Initializes the workspace and its project spaces.


resolve

Set<ProjectSpace> resolve(ProjectUrlFragment projectUrlFragment)
                          throws ProjectUrlResolutionException
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.

Parameters:
projectUrlFragment - the project URL fragment to resolve
Returns:
a set of matching project spaces
Throws:
ProjectUrlResolutionException - if the project belonging to the given project URL fragment cannot be found in workspace

resolve

Set<ServerInfo> resolve(ServerUrl serverUrl)
                        throws ServerUrlResolutionException
Resolves a server URL to a server.

Parameters:
serverUrl - the server URL to be resolved
Returns:
the resolved ServerInfo
Throws:
ServerUrlResolutionException - if no matching server info can be found

save

void save()
Make the current workspace state persistent.


getResourceSet

org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
Returns the workspace resource set.

Returns:
The resource set of the workspace

setResourceSet

void setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Set the workspace resource set.

Parameters:
resourceSet - The resource set to be set.

updateACUser

void updateACUser(ServerInfo serverInfo)
                  throws ESException
Updates the ACUser and it roles.

Parameters:
serverInfo - The ServerInfo that is used to update the ACUser.
Throws:
ESException - if an error occurs while updating the ACUser

updateACUser

void updateACUser(Usersession session)
                  throws ESException
Updates the ACUser and it roles.

Parameters:
session - The Usersession that should be used to update the ACUser. If null, the session manager will search for a session.
Throws:
ESException - if an error occurs while updating the ACUser

addServerInfo

void addServerInfo(ServerInfo serverInfo)
Adds an server info and saves.

Parameters:
serverInfo - the server info to be added

removeServerInfo

void removeServerInfo(ServerInfo serverInfo)
Removes an server info and saves.

Parameters:
serverInfo - the server info to be removed

removeUsersession

void removeUsersession(Usersession session)
                       throws ESException
Remove the given Usersession from the workspace.

Parameters:
session - the session to be removed
Throws:
ESException - in case removing the session fails


Copyright © 2015. All Rights Reserved.