/** * Returns the requested RepositoryItem * * @param request */ public RepositoryItem run(GetRepositoryItemType request) { try { RepositoryItem item = store.getRepositoryItem(request.getId()); if (item == null) { // by spec we have to return a 404 throw new HttpErrorCodeException( 404, "No repository item found for id " + request.getId()); } return item; } catch (IOException e) { throw new ServiceException("Failed to load the repository item", e); } } }
/** * Returns the requested RepositoryItem * * @param request * @return */ public RepositoryItem run(GetRepositoryItemType request) { try { RepositoryItem item = store.getRepositoryItem(request.getId()); if(item == null) { // by spec we have to return a 404 throw new HttpErrorCodeException(404, "No repository item found for id " + request.getId()); } return item; } catch (IOException e) { throw new ServiceException("Failed to load the repository item", e); } } }