private List<ScheduledServiceListResource> getTaskRequest(String uri) throws IOException { try { String entityText = nexusRestClient.doGetForText(uri, isSuccessful()); XStreamRepresentation representation = new XStreamRepresentation(xstream, entityText, MediaType.APPLICATION_XML); ScheduledServiceListResourceResponse scheduleResponse = (ScheduledServiceListResourceResponse) representation.getPayload( new ScheduledServiceListResourceResponse()); return scheduleResponse.getData(); } catch (AssertionError e) { // unsuccessful GET LOG.error(e.getMessage(), e); return Collections.emptyList(); } }
private List<ScheduledServiceListResource> getTaskRequest( String uri ) throws IOException { try { String entityText = nexusRestClient.doGetForText( uri, isSuccessful() ); XStreamRepresentation representation = new XStreamRepresentation( xstream, entityText, MediaType.APPLICATION_XML ); ScheduledServiceListResourceResponse scheduleResponse = (ScheduledServiceListResourceResponse) representation.getPayload( new ScheduledServiceListResourceResponse() ); return scheduleResponse.getData(); } catch ( AssertionError e ) { // unsuccessful GET LOG.error( e.getMessage(), e ); return Collections.emptyList(); } }
@SuppressWarnings( "unchecked" ) public static List<ScheduledServiceListResource> getTasks() throws IOException { String serviceURI = "service/local/schedules"; Response response = RequestFacade.doGetRequest( serviceURI ); XStreamRepresentation representation = new XStreamRepresentation( xstream, response.getEntity().getText(), MediaType.APPLICATION_XML ); ScheduledServiceListResourceResponse scheduleResponse = (ScheduledServiceListResourceResponse) representation .getPayload( new ScheduledServiceListResourceResponse() ); return scheduleResponse.getData(); }
ScheduledServiceListResourceResponse result = new ScheduledServiceListResourceResponse();
ScheduledServiceListResourceResponse result = new ScheduledServiceListResourceResponse();