Interface IBuildInformationRepository
- All Superinterfaces:
IReadableRepository
,IWatchableRepository
,IWritableRepository
Only for real builds, not calculations.
- Author:
- Stepan Roh, Polarion Software
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.polarion.alm.builder.IWatchableRepository
IWatchableRepository.ILocationWithTime
-
Field Summary
Fields inherited from interface com.polarion.alm.builder.IWatchableRepository
COMPONENT_MATCH_ALL
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProjectBuildsListener
(IWatchableRepositoryListener l, Collection locations) Similar toIWatchableRepository.addWatchableRepositoryListener(IWatchableRepositoryListener, java.util.Collection)
, but will watch given relative locations in all present or future project build folders.getBuildLocation
(IObjectId buildId) Returns location of the build folder if it is found, otherwisenull
.Return id of context (project) which has its builds stored on given location.getProjectBuildLocation
(IBuildArtifact artifact, String id) Folder which should hold build information of given artifacts's build (identified by build id).void
stuffProjectBuildsListener
(IWatchableRepositoryListener l, Collection locations, long lastKnownModificationTime) Methods inherited from interface com.polarion.alm.builder.IReadableRepository
copyToLocalFile, exists, getFileSize, getLastModificationTime, isFile, isFolder, listFolder, readFile
Methods inherited from interface com.polarion.alm.builder.IWatchableRepository
addWatchableRepositoryListener, removeWatchableRepositoryListener, removeWatchableRepositoryListener, stuffWatchableRepositoryListener
Methods inherited from interface com.polarion.alm.builder.IWritableRepository
copyFromLocalFile, makeFolder, moveFromLocalFile, removeLocation, writeFile
-
Method Details
-
getProjectBuildLocation
Folder which should hold build information of given artifacts's build (identified by build id).There is always some location returned even if it does not exist in repository.
Typically the location is in the form
projects/PROJECT_NAME/GROUP_ID/ARTIFACT_ID/ID
.- Parameters:
artifact
- build artifactid
- build id- Returns:
- artifact build location (not
null
) - Throws:
IllegalArgumentException
- if artifact isnull
IllegalArgumentException
- if id isnull
IllegalArgumentException
- if artifact's group entity is not project
-
getBuildLocation
Returns location of the build folder if it is found, otherwisenull
.- Throws:
IOException
- Since:
- 3.7.3
-
getContextIdForLocation
Return id of context (project) which has its builds stored on given location.Applies to sublocations of
getProjectBuildLocation(IBuildArtifact, String)
too (which may in fact be missing from repository - it is important that at least project build location exists).- Parameters:
loc
- location- Returns:
- context id or
null
if this is not project build location - Throws:
IllegalArgumentException
- if loc isnull
IllegalArgumentException
- if loc is relative
-
addProjectBuildsListener
Similar toIWatchableRepository.addWatchableRepositoryListener(IWatchableRepositoryListener, java.util.Collection)
, but will watch given relative locations in all present or future project build folders.Listener can be removed with standard
IWatchableRepository.removeWatchableRepositoryListener(IWatchableRepositoryListener)
.If given set of locations is empty, then does nothing.
If listener was already added, its registered set of locations is merged with given set.
For catching the creation of new build (creation of project build folder), location with empty path can be used.
WARNING: In cluster setup listener is notified only on the node where the build runs.
- Parameters:
l
- listenerlocations
-Collection
ofILocation
s- Throws:
IllegalArgumentException
- if locations isnull
IllegalArgumentException
- if l isnull
IllegalArgumentException
- if some location is absolute
-
stuffProjectBuildsListener
void stuffProjectBuildsListener(IWatchableRepositoryListener l, Collection locations, long lastKnownModificationTime) Similar toIWatchableRepository.stuffWatchableRepositoryListener(IWatchableRepositoryListener, Collection, long)
, but following contract ofaddProjectBuildsListener(IWatchableRepositoryListener, Collection)
.- Parameters:
l
- listenerlocations
-Collection
ofILocation
s andIWatchableRepository.ILocationWithTime
slastKnownModificationTime
- last modification time of known changes (exclusive; use 0 for indication that every change is wanted)- Throws:
IllegalArgumentException
- if locations isnull
IllegalArgumentException
- if l isnull
IllegalArgumentException
- if some location is absolute
-