/** * @return URL that points to the root of the current WaybackContext * @deprecated use getWbRequest().getContextPrefix() */ public String getContextPrefix() { return getWbRequest().getContextPrefix(); } /**
/** * @return URL that points to the root of the current WaybackContext * @deprecated use getWbRequest().getContextPrefix() */ public String getContextPrefix() { return getWbRequest().getContextPrefix(); } /**
/** * @return URL that points to the root of the Server * @deprecated use getWbRequest().getServerPrefix() */ public String getServerPrefix() { return getWbRequest().getServerPrefix(); }
/** * @return URL that points to the root of the Server * @deprecated use getWbRequest().getServerPrefix() */ public String getServerPrefix() { return getWbRequest().getServerPrefix(); }
public JSPExecutor(HttpServletRequest httpRequest, HttpServletResponse httpResponse, UIResults uiResults) { this.isAjax = uiResults.getWbRequest().isAjaxRequest(); this.httpRequest = httpRequest; this.httpResponse = httpResponse; this.uiResults = uiResults; }
public JSPExecutor(HttpServletRequest httpRequest, HttpServletResponse httpResponse, UIResults uiResults) { this.isAjax = uiResults.getWbRequest().isAjaxRequest(); this.httpRequest = httpRequest; this.httpResponse = httpResponse; this.uiResults = uiResults; }
/** * Get a String generic AccessPoint config (ala AccessPoint.configs Spring * config) * @param configName key for configuration property * @return String configuration for the context, if present, otherwise null */ public String getContextConfig(final String configName) { String configValue = null; AccessPoint context = getWbRequest().getAccessPoint(); if(context != null) { Properties configs = context.getConfigs(); if(configs != null) { configValue = configs.getProperty(configName); } } return configValue; }
/** * Get a String generic AccessPoint config (ala AccessPoint.configs Spring * config) * @param configName key for configuration property * @return String configuration for the context, if present, otherwise null */ public String getContextConfig(final String configName) { String configValue = null; AccessPoint context = getWbRequest().getAccessPoint(); if(context != null) { Properties configs = context.getConfigs(); if(configs != null) { configValue = configs.getProperty(configName); } } return configValue; }
/** * Create a self-referencing URL that will drive to the given page, * simplifying rendering pagination * @param pageNum page number of results to link to. * @return String URL which will drive browser to search results for a * different page of results for the same query */ public String urlForPage(int pageNum) { WaybackRequest wbRequest = getWbRequest(); return wbRequest.getAccessPoint().getQueryPrefix() + "query?" + wbRequest.getQueryArguments(pageNum); }
/** * Create a self-referencing URL that will drive to the given page, * simplifying rendering pagination * @param pageNum page number of results to link to. * @return String URL which will drive browser to search results for a * different page of results for the same query */ public String urlForPage(int pageNum) { WaybackRequest wbRequest = getWbRequest(); return wbRequest.getAccessPoint().getQueryPrefix() + "query?" + wbRequest.getQueryArguments(pageNum); }
/** * return body-insert text. * <p>Run {@code jspInsertPath} and return its output as String. * if {@code jspInsertPath} is {@code null}, or body-insert should not be * inserted into the resource being processed, returns {@code null}.</p> * @param context context for the resource being processed * @return insert text as String, or {@code null} if no insertion shall be * made. */ protected String bodyInsertContent(ReplayParseContext context) { if (jspInsertPath == null) return null; JSPExecutor jspExec = context.getJspExec(); // FIXME bad chain of references. add method to ReplayParseContext? WaybackRequest wbRequest = jspExec.getUiResults().getWbRequest(); // isAnyEmbeddedContext() used as shorthand for (isFrameWrapperContext() // && isIFrameWrapperContext()). if (wbRequest.isAnyEmbeddedContext()) return null; try { return jspExec.jspToString(jspInsertPath); } catch (ServletException ex) { LOGGER.log(Level.WARNING, "execution of " + jspInsertPath + " failed", ex); return null; } catch (IOException ex) { LOGGER.log(Level.WARNING, "erorr executing " + jspInsertPath, ex); return null; } }
/** * return body-insert text. * <p>Run {@code jspInsertPath} and return its output as String. * if {@code jspInsertPath} is {@code null}, or body-insert should not be * inserted into the resource being processed, returns {@code null}.</p> * @param context context for the resource being processed * @return insert text as String, or {@code null} if no insertion shall be * made. */ protected String bodyInsertContent(ReplayParseContext context) { if (jspInsertPath == null) return null; JSPExecutor jspExec = context.getJspExec(); // FIXME bad chain of references. add method to ReplayParseContext? WaybackRequest wbRequest = jspExec.getUiResults().getWbRequest(); // isAnyEmbeddedContext() used as shorthand for (isFrameWrapperContext() // && isIFrameWrapperContext()). if (wbRequest.isAnyEmbeddedContext()) return null; try { return jspExec.jspToString(jspInsertPath); } catch (ServletException ex) { LOGGER.log(Level.WARNING, "execution of " + jspInsertPath + " failed", ex); return null; } catch (IOException ex) { LOGGER.log(Level.WARNING, "erorr executing " + jspInsertPath, ex); return null; } }
/** * @param uiResults the UIResults holding replay info */ public ToolBarData(UIResults uiResults) { this.uiResults = uiResults; fmt = uiResults.getFormatter(); results = uiResults.getCaptureResults(); curResult = uiResults.getResult(); findRelativeLinks(); Date firstDate = uiResults.getWbRequest().getStartDate(); Date lastDate = uiResults.getWbRequest().getEndDate(); yearPartitions = yearPartitioner.getRange(yearSize,firstDate,lastDate); Date firstYearDate = yearPartitions.get(0).getStart(); Date lastYearDate = yearPartitions.get(yearPartitions.size()-1).getEnd(); monthPartitions = monthPartitioner.getRange(monthSize,firstYearDate,lastYearDate); Iterator<CaptureSearchResult> it = results.iterator(); monthPartitioner.populate(monthPartitions,it); yearPartitioner.populate(yearPartitions,monthPartitions.iterator()); }
/** * @param uiResults the UIResults holding replay info */ public ToolBarData(UIResults uiResults) { this.uiResults = uiResults; fmt = uiResults.getFormatter(); results = uiResults.getCaptureResults(); curResult = uiResults.getResult(); findRelativeLinks(); Date firstDate = uiResults.getWbRequest().getStartDate(); Date lastDate = uiResults.getWbRequest().getEndDate(); yearPartitions = yearPartitioner.getRange(yearSize,firstDate,lastDate); Date firstYearDate = yearPartitions.get(0).getStart(); Date lastYearDate = yearPartitions.get(yearPartitions.size()-1).getEnd(); monthPartitions = monthPartitioner.getRange(monthSize,firstYearDate,lastYearDate); Iterator<CaptureSearchResult> it = results.iterator(); monthPartitioner.populate(monthPartitions,it); yearPartitioner.populate(yearPartitions,monthPartitions.iterator()); }
protected void init() { CaptureSearchResults cResults = results.getCaptureResults(); WaybackRequest wbRequest = results.getWbRequest(); String searchUrl = UrlOperations.stripDefaultPortFromUrl(wbRequest.getRequestUrl());
protected void init() { CaptureSearchResults cResults = results.getCaptureResults(); WaybackRequest wbRequest = results.getWbRequest(); String searchUrl = UrlOperations.stripDefaultPortFromUrl(wbRequest.getRequestUrl());