public class GeppettoManager extends java.lang.Object implements IGeppettoManager
Modifier and Type | Field and Description |
---|---|
private DropboxUploadService |
dropboxService |
private IGeppettoManagerCallbackListener |
geppettoManagerCallbackListener |
private static Log |
logger |
private java.util.Map<IGeppettoProject,RuntimeProject> |
projects |
private Scope |
scope |
private IUser |
user |
Constructor and Description |
---|
GeppettoManager() |
GeppettoManager(IGeppettoManager manager) |
GeppettoManager(Scope scope) |
Modifier and Type | Method and Description |
---|---|
void |
cancelExperimentRun(java.lang.String requestId,
IExperiment experiment) |
java.util.List<? extends IExperiment> |
checkExperimentsStatus(java.lang.String requestId,
IGeppettoProject project) |
IExperiment |
cloneExperiment(java.lang.String requestId,
IGeppettoProject project,
IExperiment originalExperiment)
Clones a experiment inside a given project
|
void |
closeProject(java.lang.String requestId,
IGeppettoProject project)
Closes a Geppetto project
|
void |
deleteExperiment(java.lang.String requestId,
IExperiment experiment)
Delete a specified experiment
|
void |
deleteProject(java.lang.String requestId,
IGeppettoProject project) |
java.io.File |
downloadModel(java.lang.String instancePath,
ModelFormat format,
IExperiment experiment,
IGeppettoProject project)
Writes the model enclosed in a given aspect for a specified format supported by a converter service to a string.
|
java.nio.file.Path |
downloadProject(IGeppettoProject project)
Download Project
|
java.net.URL |
downloadResults(java.lang.String aspectPath,
ResultsFormat resultsFormat,
IExperiment experiment,
IGeppettoProject project) |
GeppettoModel |
fetchVariable(java.lang.String dataSourceId,
java.lang.String variableId,
IGeppettoProject project) |
java.lang.String |
getDropboxToken() |
ExperimentState |
getExperimentState(java.lang.String requestId,
IExperiment experiment,
java.util.List<java.lang.String> variables) |
RuntimeProject |
getRuntimeProject(IGeppettoProject project) |
Scope |
getScope() |
java.util.List<ModelFormat> |
getSupportedOuputs(java.lang.String aspectInstancePath,
IExperiment experiment,
IGeppettoProject project)
Writes the model enclosed in a given aspect for a specified format supported by a converter service to a string.
|
IUser |
getUser()
FIXME: Move to IAuthService?
|
boolean |
isProjectOpen(IGeppettoProject project) |
boolean |
isUserProject(long id) |
void |
linkDropBoxAccount(java.lang.String key)
Link the user dropbox account with the geppetto account
|
ExperimentState |
loadExperiment(java.lang.String requestId,
IExperiment experiment) |
void |
loadProject(java.lang.String requestId,
IGeppettoProject project)
Loads a Geppetto project
|
void |
makeProjectPublic(java.lang.String requestId,
IGeppettoProject project,
boolean isPublic) |
IExperiment |
newExperiment(java.lang.String requestId,
IGeppettoProject project)
Create a new experiment inside a given project
|
void |
persistProject(java.lang.String requestId,
IGeppettoProject project)
Saves the current project in the database.
|
GeppettoModel |
resolveImportType(java.util.List<java.lang.String> typePaths,
IGeppettoProject geppettoProject) |
GeppettoModel |
resolveImportValue(java.lang.String path,
IExperiment experiment,
IGeppettoProject geppettoProject) |
void |
runExperiment(java.lang.String requestId,
IExperiment experiment)
Run a specified experiment
|
QueryResults |
runQuery(java.util.List<RunnableQuery> queries,
IGeppettoProject project) |
int |
runQueryCount(java.util.List<RunnableQuery> queries,
IGeppettoProject project) |
void |
setExperimentView(java.lang.String view,
IExperiment experiment,
IGeppettoProject project) |
ExperimentState |
setModelParameters(java.util.Map<java.lang.String,java.lang.String> parameters,
IExperiment experiment,
IGeppettoProject project)
Changes the parameters of the model
|
void |
setSimulationListener(IGeppettoManagerCallbackListener listener) |
void |
setUser(IUser user)
FIXME: Move to IAuthService?
|
ExperimentState |
setWatchedVariables(java.util.List<java.lang.String> watchedVariables,
IExperiment experiment,
IGeppettoProject project,
boolean watch)
Sets variables to be watched
|
void |
unlinkDropBoxAccount(java.lang.String key)
Unlink the user dropbox account from the geppetto account
|
void |
uploadModelToDropBox(java.lang.String aspectID,
IExperiment experiment,
IGeppettoProject project,
ModelFormat format)
Upload the model associated with the given aspect of the active experiment to the dropbox folder
|
void |
uploadResultsToDropBox(java.lang.String aspectID,
IExperiment experiment,
IGeppettoProject project,
ResultsFormat format) |
private static Log logger
private java.util.Map<IGeppettoProject,RuntimeProject> projects
private DropboxUploadService dropboxService
private IUser user
private Scope scope
private IGeppettoManagerCallbackListener geppettoManagerCallbackListener
public GeppettoManager()
public GeppettoManager(IGeppettoManager manager)
public GeppettoManager(Scope scope)
public void loadProject(java.lang.String requestId, IGeppettoProject project) throws java.net.MalformedURLException, GeppettoInitializationException, GeppettoExecutionException, GeppettoAccessException
IProjectManager
loadProject
in interface IProjectManager
java.net.MalformedURLException
GeppettoInitializationException
GeppettoExecutionException
GeppettoAccessException
public boolean isUserProject(long id)
public boolean isProjectOpen(IGeppettoProject project)
public void closeProject(java.lang.String requestId, IGeppettoProject project) throws GeppettoExecutionException
IProjectManager
closeProject
in interface IProjectManager
GeppettoExecutionException
public RuntimeProject getRuntimeProject(IGeppettoProject project) throws GeppettoExecutionException
project
- GeppettoExecutionException
public ExperimentState loadExperiment(java.lang.String requestId, IExperiment experiment) throws GeppettoExecutionException, GeppettoAccessException
loadExperiment
in interface IExperimentManager
GeppettoExecutionException
GeppettoAccessException
public void runExperiment(java.lang.String requestId, IExperiment experiment) throws GeppettoExecutionException, GeppettoAccessException
IExperimentManager
runExperiment
in interface IExperimentManager
GeppettoExecutionException
GeppettoAccessException
public ExperimentState getExperimentState(java.lang.String requestId, IExperiment experiment, java.util.List<java.lang.String> variables) throws GeppettoExecutionException, GeppettoAccessException
getExperimentState
in interface IExperimentManager
GeppettoExecutionException
GeppettoAccessException
public void makeProjectPublic(java.lang.String requestId, IGeppettoProject project, boolean isPublic) throws GeppettoExecutionException, GeppettoAccessException
makeProjectPublic
in interface IProjectManager
GeppettoExecutionException
GeppettoAccessException
public void deleteProject(java.lang.String requestId, IGeppettoProject project) throws GeppettoExecutionException, GeppettoAccessException
deleteProject
in interface IProjectManager
GeppettoExecutionException
GeppettoAccessException
public void persistProject(java.lang.String requestId, IGeppettoProject project) throws GeppettoExecutionException, GeppettoAccessException
IProjectManager
persistProject
in interface IProjectManager
GeppettoExecutionException
GeppettoAccessException
public IExperiment newExperiment(java.lang.String requestId, IGeppettoProject project) throws GeppettoExecutionException, GeppettoAccessException
IExperimentManager
newExperiment
in interface IExperimentManager
GeppettoExecutionException
GeppettoAccessException
public IExperiment cloneExperiment(java.lang.String requestId, IGeppettoProject project, IExperiment originalExperiment) throws GeppettoExecutionException, GeppettoAccessException
IExperimentManager
cloneExperiment
in interface IExperimentManager
GeppettoExecutionException
GeppettoAccessException
public void deleteExperiment(java.lang.String requestId, IExperiment experiment) throws GeppettoExecutionException, GeppettoAccessException
IExperimentManager
deleteExperiment
in interface IExperimentManager
GeppettoExecutionException
GeppettoAccessException
public void linkDropBoxAccount(java.lang.String key) throws java.lang.Exception
IDropBoxManager
linkDropBoxAccount
in interface IDropBoxManager
GeppettoExecutionException
java.lang.Exception
public void unlinkDropBoxAccount(java.lang.String key) throws java.lang.Exception
IDropBoxManager
unlinkDropBoxAccount
in interface IDropBoxManager
GeppettoExecutionException
java.lang.Exception
public java.lang.String getDropboxToken() throws java.lang.Exception
getDropboxToken
in interface IDropBoxManager
java.lang.Exception
public void uploadModelToDropBox(java.lang.String aspectID, IExperiment experiment, IGeppettoProject project, ModelFormat format) throws java.lang.Exception
IDropBoxManager
uploadModelToDropBox
in interface IDropBoxManager
GeppettoExecutionException
java.lang.Exception
public void uploadResultsToDropBox(java.lang.String aspectID, IExperiment experiment, IGeppettoProject project, ResultsFormat format) throws GeppettoExecutionException, GeppettoAccessException
uploadResultsToDropBox
in interface IDropBoxManager
GeppettoExecutionException
GeppettoAccessException
public ExperimentState setModelParameters(java.util.Map<java.lang.String,java.lang.String> parameters, IExperiment experiment, IGeppettoProject project) throws GeppettoExecutionException, GeppettoAccessException
IRuntimeTreeManager
setModelParameters
in interface IRuntimeTreeManager
GeppettoAccessException
GeppettoExecutionException
public void setExperimentView(java.lang.String view, IExperiment experiment, IGeppettoProject project) throws GeppettoExecutionException, GeppettoAccessException
setExperimentView
in interface IExperimentManager
GeppettoExecutionException
GeppettoAccessException
public ExperimentState setWatchedVariables(java.util.List<java.lang.String> watchedVariables, IExperiment experiment, IGeppettoProject project, boolean watch) throws GeppettoExecutionException, GeppettoAccessException
IRuntimeTreeManager
setWatchedVariables
in interface IRuntimeTreeManager
GeppettoExecutionException
GeppettoAccessException
public java.io.File downloadModel(java.lang.String instancePath, ModelFormat format, IExperiment experiment, IGeppettoProject project) throws GeppettoExecutionException, GeppettoAccessException
IDownloadManager
downloadModel
in interface IDownloadManager
GeppettoAccessException
GeppettoExecutionException
public java.util.List<ModelFormat> getSupportedOuputs(java.lang.String aspectInstancePath, IExperiment experiment, IGeppettoProject project) throws GeppettoExecutionException, GeppettoAccessException
IDownloadManager
getSupportedOuputs
in interface IDownloadManager
GeppettoAccessException
GeppettoExecutionException
public java.net.URL downloadResults(java.lang.String aspectPath, ResultsFormat resultsFormat, IExperiment experiment, IGeppettoProject project) throws GeppettoExecutionException, GeppettoAccessException
downloadResults
in interface IDownloadManager
GeppettoExecutionException
GeppettoAccessException
public IUser getUser()
IGeppettoManager
getUser
in interface IGeppettoManager
public void setUser(IUser user) throws GeppettoExecutionException
IGeppettoManager
setUser
in interface IGeppettoManager
GeppettoExecutionException
public void cancelExperimentRun(java.lang.String requestId, IExperiment experiment) throws GeppettoExecutionException
cancelExperimentRun
in interface IExperimentManager
GeppettoExecutionException
public java.util.List<? extends IExperiment> checkExperimentsStatus(java.lang.String requestId, IGeppettoProject project)
checkExperimentsStatus
in interface IProjectManager
public Scope getScope()
getScope
in interface IGeppettoManager
public GeppettoModel fetchVariable(java.lang.String dataSourceId, java.lang.String variableId, IGeppettoProject project) throws GeppettoDataSourceException, GeppettoModelException, GeppettoExecutionException
fetchVariable
in interface IDataSourceManager
GeppettoDataSourceException
GeppettoModelException
GeppettoExecutionException
public GeppettoModel resolveImportType(java.util.List<java.lang.String> typePaths, IGeppettoProject geppettoProject) throws GeppettoExecutionException
resolveImportType
in interface IRuntimeTreeManager
GeppettoExecutionException
public void setSimulationListener(IGeppettoManagerCallbackListener listener)
setSimulationListener
in interface IGeppettoManager
public GeppettoModel resolveImportValue(java.lang.String path, IExperiment experiment, IGeppettoProject geppettoProject)
resolveImportValue
in interface IRuntimeTreeManager
public QueryResults runQuery(java.util.List<RunnableQuery> queries, IGeppettoProject project) throws GeppettoModelException, GeppettoExecutionException, GeppettoDataSourceException
runQuery
in interface IDataSourceManager
GeppettoModelException
GeppettoExecutionException
GeppettoDataSourceException
public int runQueryCount(java.util.List<RunnableQuery> queries, IGeppettoProject project) throws GeppettoExecutionException, GeppettoModelException, GeppettoDataSourceException
runQueryCount
in interface IDataSourceManager
GeppettoExecutionException
GeppettoModelException
GeppettoDataSourceException
public java.nio.file.Path downloadProject(IGeppettoProject project) throws GeppettoExecutionException, GeppettoAccessException
IDownloadManager
downloadProject
in interface IDownloadManager
GeppettoExecutionException
GeppettoAccessException