try {
initializeRequestHandler(request,response,GDataRequestType.INSERT);
} catch (GDataRequestException e) {
sendError();
return;
}
if(!authenticateAccount(this.feedRequest,AccountRole.ENTRYAMINISTRATOR)){
setError(GDataResponse.UNAUTHORIZED);
sendError();
return;
}
try{
BaseEntry entry = this.service.createEntry(this.feedRequest,this.feedResponse);
setFeedResponseFormat();
setFeedResponseStatus(GDataResponse.CREATED);
this.feedResponse.sendResponse(entry, this.feedRequest.getConfigurator());
}catch (ServiceException e) {
LOG.error("Could not process GetFeed request - "+e.getMessage(),e);
setError(e.getErrorCode());
sendError();
}finally{
closeService();
}