use of io.hops.hopsworks.dela.old_dto.TorrentExtendedStatusJSON in project hopsworks by logicalclocks.
the class DelaProjectService method getExtendedDetails.
@GET
@Path("/transfers/{publicDSId}")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@AllowedProjectRoles({ AllowedProjectRoles.DATA_SCIENTIST, AllowedProjectRoles.DATA_OWNER })
@JWTRequired(acceptedTokens = { Audience.API }, allowedUserRoles = { "HOPS_ADMIN", "HOPS_USER" })
public Response getExtendedDetails(@PathParam("publicDSId") String publicDSId, @Context SecurityContext sc) throws DelaException {
TorrentId torrentId = new TorrentId(publicDSId);
TorrentExtendedStatusJSON resp = delaTransferCtrl.details(torrentId);
return successResponse(resp);
}
use of io.hops.hopsworks.dela.old_dto.TorrentExtendedStatusJSON in project hopsworks by logicalclocks.
the class TransferDelaController method details.
public TorrentExtendedStatusJSON details(TorrentId torrentId) throws DelaException {
if (!delaStateController.transferDelaAvailable()) {
throw new DelaException(RESTCodes.DelaErrorCode.DELA_TRANSFER_NOT_AVAILABLE, Level.SEVERE, DelaException.Source.LOCAL);
}
try {
ClientWrapper<TorrentExtendedStatusJSON> rc = ClientWrapper.httpInstance(TorrentExtendedStatusJSON.class).setTarget(settings.getDELA_TRANSFER_HTTP_ENDPOINT()).setPath("/library/extended").setPayload(torrentId);
TorrentExtendedStatusJSON result = rc.doPost();
return result;
} catch (IllegalStateException ise) {
throw new DelaException(RESTCodes.DelaErrorCode.COMMUNICATION_FAILURE, Level.SEVERE, DelaException.Source.DELA, null, ise.getMessage(), ise);
}
}
Aggregations