Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.server.projects
Interface ProjectScavenger

All Known Implementing Classes:
ProjectScavengerImpl

public interface ProjectScavenger

Service that scans for projects in a directory. Manages if projects are active and in that case publishes them as TransformationEnvironments to an EnvironmentManager.

Author:
Simon Templer

Nested Class Summary
static class ProjectScavenger.Status
          Project states
 
Method Summary
 void activate(String projectId)
          Activate the project with the given identifier.
 boolean allowAddProject()
          Determines if adding a project generally is allowed/possible.
 void deactivate(String projectId)
          Activate the project with the given identifier.
 ProjectInfo getInfo(String projectId)
          Get the project info for the project with the given identifier, if available.
 File getLoadReports(String projectId)
          Get the file where the reports form loading the project are stored.
 Set<String> getProjects()
          Get the identifiers of the available projects.
 ProjectScavenger.Status getStatus(String projectId)
          Get the status of the project with the given identifier.
 void releaseProjectId(String projectId)
          Release a previously reserved project identifier.
 File reserveProjectId(String projectId)
          Reserve a project identifier, e.g.
 void triggerScan()
          Check if there are any new projects available.
 

Method Detail

triggerScan

void triggerScan()
Check if there are any new projects available.


getProjects

Set<String> getProjects()
Get the identifiers of the available projects.

Returns:
the set of identifiers of all available projects

reserveProjectId

File reserveProjectId(String projectId)
                      throws ScavengerException
Reserve a project identifier, e.g. if a new project should be uploaded

Parameters:
projectId - the project identifier
Returns:
the project directory
Throws:
ScavengerException - if the projectId is already taken/reserved or adding new projects is not possible

releaseProjectId

void releaseProjectId(String projectId)
Release a previously reserved project identifier. Also removes the project folder.

Parameters:
projectId - the project idnetifier

allowAddProject

boolean allowAddProject()
Determines if adding a project generally is allowed/possible.

Returns:
if adding new projects is allowed

getStatus

ProjectScavenger.Status getStatus(String projectId)
Get the status of the project with the given identifier.

Parameters:
projectId - the project identifier
Returns:
the project status

getLoadReports

File getLoadReports(String projectId)
Get the file where the reports form loading the project are stored. The file may not be changed, deleted, etc.

Parameters:
projectId - the project identifier
Returns:
the log file or null if the project with the given identifier does not exist

getInfo

ProjectInfo getInfo(String projectId)
Get the project info for the project with the given identifier, if available.

Parameters:
projectId - the project identifier
Returns:
the project info or null

activate

void activate(String projectId)
Activate the project with the given identifier.

Parameters:
projectId - the project identifier

deactivate

void deactivate(String projectId)
Activate the project with the given identifier.

Parameters:
projectId - the project identifier

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d