Search in sources :

Example 1 with PDRIDescrWrapperList

use of nl.uva.cs.lobcder.rest.wrappers.PDRIDescrWrapperList in project lobcder by skoulouzis.

the class Catalogue method updateMaster.

private boolean updateMaster(List<PDRIDescr> destinationDescr, Long fileUID) {
    if (restClient == null) {
        restClient = Client.create(clientConfig);
        restClient.removeAllFilters();
        restClient.addFilter(new com.sun.jersey.api.client.filter.HTTPBasicAuthFilter("worker-", token));
        webResource = restClient.resource(restURL);
    }
    PDRIDescrWrapperList list = new PDRIDescrWrapperList();
    list.setPdris(destinationDescr);
    ClientResponse response = webResource.path("storage_sites").path("update_pdri").path(fileUID.toString()).type(MediaType.APPLICATION_XML).put(ClientResponse.class, list);
    Logger.getLogger(Catalogue.class.getName()).log(Level.FINE, " response.getStatus(): {0}", response.getStatus());
    return true;
}
Also used : ClientResponse(com.sun.jersey.api.client.ClientResponse) PDRIDescrWrapperList(nl.uva.cs.lobcder.rest.wrappers.PDRIDescrWrapperList)

Aggregations

ClientResponse (com.sun.jersey.api.client.ClientResponse)1 PDRIDescrWrapperList (nl.uva.cs.lobcder.rest.wrappers.PDRIDescrWrapperList)1