}
// the implementation for dump
private void dump(String path, AbderaClient abderaClient, Writer writer)
throws RegistryException {
ClientResponse clientResponse =
abderaClient.get(baseURI + APPConstants.ATOM +
encodeURL(path +
RegistryConstants.URL_SEPARATOR +
APPConstants.PARAMETER_DUMP),
getAuthorization());
if (clientResponse.getType() == Response.ResponseType.SUCCESS) {
Document introspection = clientResponse.getDocument();
Element element = introspection.getRoot();
if (element instanceof OMElement) {
try {
((OMElement) element).serialize(writer);
} catch (XMLStreamException e) {
throw new RegistryException("Failed to serialize the xml", e);
}
}
} else {
String msg = "Failed to serialize the xml. Received Response: " +
clientResponse.getStatusText();
log.error(msg);
throw new RegistryException(msg);
}
}