org.eclipse.emf.emfstore.client
Interface ESWorkspace

All Known Implementing Classes:
ESWorkspaceImpl

public interface ESWorkspace

Container for all local projects and available servers.

Author:
emueller, wesendon

Method Summary
 ESServer addServer(ESServer server)
          Adds a server to the workspace.
 ESLocalProject createLocalProject(String projectName)
          Creates a new local project that is not shared with the server yet.
 ESLocalProject getLocalProject(org.eclipse.emf.ecore.EObject modelElement)
          Returns the ESLocalProject the given model element is contained in.
 List<ESLocalProject> getLocalProjects()
          Returns all local projects.
 List<ESServer> getServers()
          Returns all available servers.
 void removeServer(ESServer server)
          Removes a server from the workspace.
 

Method Detail

getLocalProjects

List<ESLocalProject> getLocalProjects()
Returns all local projects.

Returns:
list of local projects

createLocalProject

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

Parameters:
projectName - the project's name
Returns:
the unshared local project

getLocalProject

ESLocalProject getLocalProject(org.eclipse.emf.ecore.EObject modelElement)
Returns the ESLocalProject the given model element is contained in.

Parameters:
modelElement - the model element whose project should be returned
Returns:
the local project the given model element is contained in

getServers

List<ESServer> getServers()
Returns all available servers.

Returns:
a list of servers

addServer

ESServer addServer(ESServer server)
Adds a server to the workspace. If the server is already contained in the workspace, i.e. a server with the given URL and port exists, the latter will be returned instead of the passed one.

Parameters:
server - the server to be added to the workspace
Returns:
the added server instance, or, if a server with the given URL and port already exists in the workspace, the existing server instance

removeServer

void removeServer(ESServer server)
                  throws ESServerNotFoundException
Removes a server from the workspace.

Parameters:
server - the server to be removed from the workspace
Throws:
ESServerNotFoundException - in case the server couldn't be found in the workspace


Copyright © 2015. All Rights Reserved.