{
RepositoryBackupChain current = backupManager.findRepositoryBackupId(id);
if (current != null)
{
DetailedInfo info = new DetailedInfo(DetailedInfo.CURRENT, current);
return Response.ok(info).cacheControl(noCache).build();
}
RepositoryBackupChainLog completed = null;
for (RepositoryBackupChainLog chainLog : backupManager.getRepositoryBackupsLogs())
if (id.equals(chainLog.getBackupId()))
completed = chainLog;
if (completed != null)
{
DetailedInfo info = new DetailedInfo(DetailedInfo.COMPLETED, completed);
return Response.ok(info).cacheControl(noCache).build();
}
return Response.status(Response.Status.NOT_FOUND).entity(
"No current or completed repository backup with 'id' " + id).type(MediaType.TEXT_PLAIN).cacheControl(