org.eclipse.emf.emfstore.client
Interface ESServer

All Known Implementing Classes:
ESServerImpl

public interface ESServer

Represents an EMFStore server and its API. It gives access to ESRemoteProject which can be used to operate on existing projects.

Author:
emueller, wesendon

Field Summary
static ESServerFactory FACTORY
          Factory for creating ESServer instances.
 
Method Summary
 ESRemoteProject createRemoteProject(ESUsersession usersession, String projectName, org.eclipse.core.runtime.IProgressMonitor monitor)
          Creates an empty project on the server.
 ESRemoteProject createRemoteProject(String projectName, org.eclipse.core.runtime.IProgressMonitor monitor)
          Creates an empty project on the server.
 String getCertificateAlias()
          Returns the alias for the certificate used by this server.
 ESUsersession getLastUsersession()
          Returns the ESUsersession which was used on the last call to this server.
 String getName()
          Returns the local name of the server.
 int getPort()
          Returns the port of the server where EMFStore is listening on.
 List<ESRemoteProject> getRemoteProjects()
          Returns a list with all remote projects hosted on this server.
 List<ESRemoteProject> getRemoteProjects(ESUsersession usersession)
          Returns a list with all remote projects hosted on this server.
 String getURL()
          Returns the URL of the server.
 ESUsersession login(String name, String password)
          Logs into this server, returning a ESUsersession.
 void setCertificateAlias(String alias)
          Sets a new certificate alias.
 void setName(String name)
          Sets the local name of the server.
 void setPort(int port)
          Sets the port of the server where EMFStore is listening on.
 void setURL(String url)
          Sets the URL of the server.
 

Field Detail

FACTORY

static final ESServerFactory FACTORY
Factory for creating ESServer instances.

Method Detail

getName

String getName()
Returns the local name of the server.

Returns:
the name of the server

setName

void setName(String name)
Sets the local name of the server.

Parameters:
name - the new local name of th server

getPort

int getPort()
Returns the port of the server where EMFStore is listening on.

Returns:
the port of the server EMFStore is listing on

setPort

void setPort(int port)
Sets the port of the server where EMFStore is listening on.

Parameters:
port - the port of the server EMFStore is listing on

getURL

String getURL()
Returns the URL of the server.

Returns:
the URL of the server as a string

setURL

void setURL(String url)
Sets the URL of the server.

Parameters:
url - the URL of the server as a string

getCertificateAlias

String getCertificateAlias()
Returns the alias for the certificate used by this server. Certificates are managed by the KeyStoreManager

Returns:
the certificate alias

setCertificateAlias

void setCertificateAlias(String alias)
Sets a new certificate alias.

Parameters:
alias - the alias of the the certificate to be set

getRemoteProjects

List<ESRemoteProject> getRemoteProjects()
                                        throws ESException
Returns a list with all remote projects hosted on this server.

Returns:
a list with all remote project
Throws:
ESException - in case an error occurs while retrieving the list of remote projects

getRemoteProjects

List<ESRemoteProject> getRemoteProjects(ESUsersession usersession)
                                        throws ESException
Returns a list with all remote projects hosted on this server.

Parameters:
usersession - the ESUsersession that should be used to fetch the remote projects.
If null, the session manager will try to inject a session.
Returns:
a list with all remote project
Throws:
ESException - in case an error occurs while retrieving the list of remote projects

getLastUsersession

ESUsersession getLastUsersession()
Returns the ESUsersession which was used on the last call to this server.

Returns:
the lastly used session

createRemoteProject

ESRemoteProject createRemoteProject(String projectName,
                                    org.eclipse.core.runtime.IProgressMonitor monitor)
                                    throws ESException
Creates an empty project on the server.

Parameters:
projectName - The name of the project to be created
monitor - a IProgressMonitor instance that is used to indicate progress about creating the remote project
Returns:
a ESRemoteProject object containing information about the created project
Throws:
ESException - If an error occurs while creating the remote project

createRemoteProject

ESRemoteProject createRemoteProject(ESUsersession usersession,
                                    String projectName,
                                    org.eclipse.core.runtime.IProgressMonitor monitor)
                                    throws ESException
Creates an empty project on the server.

Parameters:
usersession - the ESUsersession that should be used to create the remote project.
If null, the session manager will search for a session.
projectName - the name of the project
monitor - a monitor to show the progress
Returns:
a ESRemoteProject object containing information about the created project
Throws:
ESException - If an error occurs while creating the remote project

login

ESUsersession login(String name,
                    String password)
                    throws ESException
Logs into this server, returning a ESUsersession.

Parameters:
name - the name of the user
password - the cleartext password of the user
Returns:
a logged in ESUsersession
Throws:
ESException - in case an error occurs while creating and logging in the session for the given user


Copyright © 2015. All Rights Reserved.