@Override
public SetResponseDMO set(SetRequestDMO setRequest) {
// All requests are immediately wrapped for use on the server. This includes
// associating the request with the originating HttpServletRequest.
SetRequest request = new SetRequest(setRequest, getThreadLocalRequest());
SetResponse response = null;
if (request.isTrackingEnabled())
logger.trace("Received by DMP servlet:\n" + request.toOIF());
if (request.getModifyIsEmpty()){
// There aren't any modifications in the request - that's an error
response = (SetResponse) request.getErrorResponse();
response.setResponseText("No modifications were found in the SetRequest");
}
else{
try {
response = (SetResponse) pluginManager.getSecurityManager().validateSession(request);
if (response == null){
SessionRI session = pluginManager.getSecurityManager().getSession(request);
response = session.handleSetRequest(request);
}
} catch (DmcValueException e) {
response = (SetResponse) request.getErrorResponse();
response.setResponseText(e.toString());
logger.error(e.toString());
}
}
return(response.getDMO());
}