/** * Executes request to server. * * @param request <code>DSRequest</code> being processed. * @return <code>Object</code> data from original request. */ protected Object transformRequest(DSRequest request) { String requestId = request.getRequestId(); DSResponse response = new DSResponse(); response.setAttribute("clientContext", request.getAttributeAsObject("clientContext")); // Asume success response.setStatus(0); switch (request.getOperationType()) { case FETCH: executeFetch(requestId, request, response); break; case ADD: executeAdd(requestId, request, response); break; case UPDATE: executeUpdate(requestId, request, response); break; case REMOVE: executeRemove(requestId, request, response); break; default: // Operation not implemented. break; } return request.getData(); }
@Override protected Object transformRequest(DSRequest request) { DSResponse response = new DSResponse(); response.setAttribute("clientContext", request.getAttributeAsObject("clientContext")); // Asume success response.setStatus(0); switch (request.getOperationType()) { case FETCH: executeFetch(request, response); break; default: break; } return request.getData(); }