org.eclipse.emf.emfstore.internal.server.core.subinterfaces
Class ProjectSubInterfaceImpl

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.server.core.AbstractSubEmfstoreInterface
      extended by org.eclipse.emf.emfstore.internal.server.core.subinterfaces.ProjectSubInterfaceImpl

public class ProjectSubInterfaceImpl
extends AbstractSubEmfstoreInterface

This subinterface implements all project related functionality.

Author:
wesendon

Constructor Summary
ProjectSubInterfaceImpl(AbstractEmfstoreInterface parentInterface)
          Default constructor.
 
Method Summary
 ProjectInfo createProject(String name, String description, LogMessage logMessage)
          Creates a empty project.
 ProjectInfo createProject(String name, String description, LogMessage logMessage, Project project)
          Creates a new project.
 void deleteProject(ProjectId projectId, boolean deleteFiles)
          Deletes the project with the given ID.
 ProjectHistory exportProjectHistoryFromServer(ProjectId projectId)
          Returns the history for the project with the given ID.
 Project getProject(ProjectId projectId, VersionSpec versionSpec)
          Get the project state for a specific version.
 List<ProjectInfo> getProjectList(SessionId sessionId)
          Returns all projects.
 ProjectId importProjectHistoryToServer(ProjectHistory projectHistory)
          Import the given project history to the server.
 
Methods inherited from class org.eclipse.emf.emfstore.internal.server.core.AbstractSubEmfstoreInterface
execute, getResourceHelper
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectSubInterfaceImpl

public ProjectSubInterfaceImpl(AbstractEmfstoreInterface parentInterface)
                        throws FatalESException
Default constructor.

Parameters:
parentInterface - parent interface
Throws:
FatalESException - in case of failure
Method Detail

getProject

public Project getProject(ProjectId projectId,
                          VersionSpec versionSpec)
                   throws InvalidVersionSpecException,
                          ESException
Get the project state for a specific version.

Parameters:
projectId - the ProjectId of the project to be fetched
versionSpec - the requested version
Returns:
the state of the project for the specified version
Throws:
InvalidVersionSpecException - if the given version is invalid
ESException - in case of failure

getProjectList

public List<ProjectInfo> getProjectList(SessionId sessionId)
                                 throws ESException
Returns all projects.

Parameters:
sessionId - the ID of a session that is checked whether read access is granted
Returns:
a list of all projects
Throws:
ESException - in case of failure

createProject

public ProjectInfo createProject(String name,
                                 String description,
                                 LogMessage logMessage)
                          throws ESException
Creates a empty project.

Parameters:
name - the name of the project
description - the description of the project
logMessage - a log message
Returns:
a ProjectInfo instance holding information about the created project
Throws:
ESException - in case of failure

createProject

public ProjectInfo createProject(String name,
                                 String description,
                                 LogMessage logMessage,
                                 Project project)
                          throws ESException
Creates a new project.

Parameters:
name - the name of the project
description - the description of the project
logMessage - a log message
project - the actual project
Returns:
a ProjectInfo instance holding information about the created project
Throws:
ESException - in case of failure

deleteProject

public void deleteProject(ProjectId projectId,
                          boolean deleteFiles)
                   throws ESException
Deletes the project with the given ID.

Parameters:
projectId - project id
deleteFiles - whether to delete files in file system
Throws:
ESException - in case of failure

importProjectHistoryToServer

public ProjectId importProjectHistoryToServer(ProjectHistory projectHistory)
                                       throws ESException
Import the given project history to the server.

Parameters:
projectHistory - the history to be imported
Returns:
the ID of a new project
Throws:
ESException - in case of failure

exportProjectHistoryFromServer

public ProjectHistory exportProjectHistoryFromServer(ProjectId projectId)
                                              throws ESException
Returns the history for the project with the given ID.

Parameters:
projectId - the ID of a project
Returns:
the project history
Throws:
ESException - in case of failure


Copyright © 2015. All Rights Reserved.