use of org.apache.cxf.ws.transfer.DeleteResponse in project cxf by apache.
the class ResourceLocal method delete.
@Override
public DeleteResponse delete(Delete body) {
// Getting reference paramaters
AddressingProperties addrProps = (AddressingProperties) ((WrappedMessageContext) context.getMessageContext()).getWrappedMessage().getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND);
ReferenceParametersType refParams = addrProps.getToEndpointReference().getReferenceParameters();
boolean delete = true;
// Dialect processing
if (body.getDialect() != null && !body.getDialect().isEmpty()) {
if (dialects.containsKey(body.getDialect())) {
Dialect dialect = dialects.get(body.getDialect());
delete = dialect.processDelete(body, manager.get(refParams));
} else {
throw new UnknownDialect();
}
}
if (delete) {
manager.delete(refParams);
}
return new DeleteResponse();
}
Aggregations