/** * Fetches the last modified date for the document, in milliseconds since the epoch; or -1 if the * last modified date is not known or unavailable. * * @param req * @return a long integer specifying the time the document was last modified, in milliseconds * since midnight, January 1, 1970 GMT, or -1 if the time is not known. */ @Override protected long getLastModified(HttpServletRequest req) { Map<String, List<String>> params = getQueryParams(req); String connectorName = ServletUtil.getFirstParameter(params, ServletUtil.XMLTAG_CONNECTOR_NAME); String docid = ServletUtil.getFirstParameter(params, ServletUtil.QUERY_PARAM_DOCID); if (Strings.isNullOrEmpty(connectorName) || Strings.isNullOrEmpty(docid)) { return -1L; } return handleGetLastModified( getDocumentMetaDataNoThrow(req, Context.getInstance().getManager(), connectorName, docid)); }
/** * Retrieves the content of a document from a connector instance. * * @param req * @param res * @throws IOException */ @Override protected void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException { doGet(req, res, Context.getInstance().getManager()); }