super.processRequest(request, response);
if (this.authenticated) {
AdminService service= null;
try {
ServerBaseFeed feed = createFeedFromRequest(request);
GDataAccount account = createRequestedAccount(request);
GDataServerRegistry registry = GDataServerRegistry
.getRegistry();
ServiceFactory serviceFactory = registry.lookup(
ServiceFactory.class, ComponentType.SERVICEFACTORY);
if (serviceFactory == null) {
setError(GDataResponse.SERVER_ERROR,
"required component is not available");
throw new FeedHandlerException(
"Can't update feed - ServiceFactory is null");
}
service = serviceFactory.getAdminService();
service.updateFeed(feed, account);
} catch (ServiceException e) {
setError(e.getErrorCode(),
"can not update feed");
LOG.error("Can not update feed -- " + e.getMessage(), e);
} catch (Exception e) {
LOG.error("Can not update feed -- " + e.getMessage(), e);
}finally{
if(service != null)
service.close();
}
}
sendResponse(response);