|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.server.projects.impl.ProjectScavengerImpl
public class ProjectScavengerImpl
Scans for projects in a directory. Manages if projects are active and in that
case publishes them as TransformationEnvironment
s to an
EnvironmentManager
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface eu.esdihumboldt.hale.server.projects.ProjectScavenger |
---|
ProjectScavenger.Status |
Field Summary | |
---|---|
static String |
DEFAULT_PROJECT_ID
Project identifier in one project mode. |
Constructor Summary | |
---|---|
ProjectScavengerImpl(EnvironmentManager environments,
File scavengeLocation)
Create a scavenger instance. |
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. |
protected ProjectHandler |
loadProjectHandler(File projectFolder,
String projectFileName,
String projectId)
Load a project handler. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_PROJECT_ID
Constructor Detail |
---|
public ProjectScavengerImpl(EnvironmentManager environments, File scavengeLocation)
environments
- the environments manager to populatescavengeLocation
- the location to scan, if the location does not
exist or is not accessible, a default location inside the
platform instance location is usedMethod Detail |
---|
public void triggerScan()
ProjectScavenger
triggerScan
in interface ProjectScavenger
ProjectScavenger.triggerScan()
protected ProjectHandler loadProjectHandler(File projectFolder, String projectFileName, String projectId) throws IOException
projectFolder
- the project folderprojectFileName
- the name of the project file in that folder, may
be null
if unknownprojectId
- the project identifier
IOException
- if the project configuration cannot be accessedpublic File reserveProjectId(String projectId) throws ScavengerException
ProjectScavenger
reserveProjectId
in interface ProjectScavenger
projectId
- the project identifier
ScavengerException
- if the projectId is already taken/reserved or
adding new projects is not possiblepublic void releaseProjectId(String projectId)
ProjectScavenger
releaseProjectId
in interface ProjectScavenger
projectId
- the project idnetifierProjectScavenger.releaseProjectId(String)
public boolean allowAddProject()
ProjectScavenger
allowAddProject
in interface ProjectScavenger
public Set<String> getProjects()
ProjectScavenger
getProjects
in interface ProjectScavenger
public ProjectScavenger.Status getStatus(String projectId)
ProjectScavenger
getStatus
in interface ProjectScavenger
projectId
- the project identifier
public File getLoadReports(String projectId)
ProjectScavenger
getLoadReports
in interface ProjectScavenger
projectId
- the project identifier
null
if the project with the given
identifier does not existpublic ProjectInfo getInfo(String projectId)
ProjectScavenger
getInfo
in interface ProjectScavenger
projectId
- the project identifier
null
ProjectScavenger.getInfo(String)
public void activate(String projectId)
ProjectScavenger
activate
in interface ProjectScavenger
projectId
- the project identifierpublic void deactivate(String projectId)
ProjectScavenger
deactivate
in interface ProjectScavenger
projectId
- the project identifier
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |