public class ProjectScavengerImpl extends AbstractProjectScavenger<EnvironmentManager,ProjectHandler> implements ProjectScavenger
TransformationEnvironment
s to an
EnvironmentManager
.ProjectScavenger.Status
DEFAULT_RESOURCE_ID
Constructor and Description |
---|
ProjectScavengerImpl(EnvironmentManager environments,
File scavengeLocation)
Create a scavenger instance.
|
Modifier and Type | Method and Description |
---|---|
void |
activate(String projectId)
Activate the project with the given identifier.
|
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.
|
ProjectScavenger.Status |
getStatus(String projectId)
Get the status of the project with the given identifier.
|
protected ProjectHandler |
loadReference(File resourceFolder,
String resourceFileName,
String resourceId)
Load a resource reference.
|
protected void |
onAdd(ProjectHandler reference,
String resourceId)
Called when a resource has been added, either when adding the resource on
the first scan or if it was added afterwards.
|
protected void |
onRemove(ProjectHandler reference,
String resourceId)
Called when a resource has been removed.
|
getContext, updateResource
allowAddResource, deleteResource, getHuntingGrounds, getReference, getResources, releaseResourceId, reserveResource, reserveResourceId, triggerScan
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allowAddResource, deleteResource, getHuntingGrounds, getReference, getResources, releaseResourceId, reserveResource, reserveResourceId, triggerScan
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 usedprotected void onRemove(ProjectHandler reference, String resourceId)
AbstractResourceScavenger
onRemove
in class AbstractResourceScavenger<ProjectHandler>
reference
- the resource referenceresourceId
- the resource identifierprotected void onAdd(ProjectHandler reference, String resourceId)
AbstractResourceScavenger
onAdd
in class AbstractResourceScavenger<ProjectHandler>
reference
- the resource referenceresourceId
- the resource identifierprotected ProjectHandler loadReference(File resourceFolder, String resourceFileName, String resourceId) throws IOException
AbstractResourceScavenger
loadReference
in class AbstractResourceScavenger<ProjectHandler>
resourceFolder
- the resource folderresourceFileName
- the name of the resource file in that folder, may
be null
if unknownresourceId
- the resource identifierIOException
- if the resource cannot be accessed or loadedpublic ProjectScavenger.Status getStatus(String projectId)
ProjectScavenger
getStatus
in interface ProjectScavenger
projectId
- the project identifierpublic File getLoadReports(String projectId)
ProjectScavenger
getLoadReports
in interface ProjectScavenger
projectId
- the project identifiernull
if the project with the given
identifier does not existpublic ProjectInfo getInfo(String projectId)
ProjectScavenger
getInfo
in interface ProjectScavenger
projectId
- the project identifiernull
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 identifierBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a