R
- the resource reference typepublic interface ResourceScavenger<R>
Modifier and Type | Method and Description |
---|---|
boolean |
allowAddResource()
Determines if adding a resource generally is allowed/possible.
|
void |
deleteResource(String resourceId)
Delete the resource with the given identifier.
|
File |
getHuntingGrounds()
Get the scavenger's hunting grounds.
|
R |
getReference(String resourceId)
Get the resource reference with the given identifier.
|
Set<String> |
getResources()
Get the identifiers of the available resources.
|
void |
releaseResourceId(String resourceId)
Release a previously reserved resource identifier.
|
Pair<String,File> |
reserveResource(String desiredId)
Reserve a resource identifier, if the desired identifier is already
taken, an identifier will be generated.
|
File |
reserveResourceId(String resourceId)
Reserve a resource identifier, e.g.
|
void |
triggerScan()
Check if there are any new projects available.
|
void triggerScan()
Set<String> getResources()
File reserveResourceId(String resourceId) throws ScavengerException
resourceId
- the resource identifierScavengerException
- if the resourceId is already taken/reserved or
adding new resources is not possiblePair<String,File> reserveResource(String desiredId) throws ScavengerException
desiredId
- the desired identifier, may be null
ScavengerException
- if adding a new resource is not possiblevoid releaseResourceId(String resourceId)
resourceId
- the resource identifiervoid deleteResource(String resourceId)
resourceId
- the resource identifierboolean allowAddResource()
R getReference(String resourceId)
resourceId
- the resource identifiernull
if it does not existFile getHuntingGrounds()
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a