/** * {@inheritDoc} * The default behavior of this method is to return getRequestSettings() on the wrapped connection object. */ public WebRequestSettings getRequestSettings() { return wrappedWebResponse_.getRequestSettings(); } }
/** * {@inheritDoc} * The default behavior of this method is to return getRequestSettings() on the wrapped connection object. */ public WebRequestSettings getRequestSettings() { return wrappedWebResponse_.getRequestSettings(); } }
/** * Gives a basic representation for debugging purposes. * @return a basic representation */ @Override public String toString() { final StringBuilder buffer = new StringBuilder(); buffer.append("HtmlPage("); buffer.append(getWebResponse().getRequestSettings().getUrl()); buffer.append(")@"); buffer.append(hashCode()); return buffer.toString(); }
/** * {@inheritDoc} * Not yet implemented. */ public String getDocumentURI() { return getWebResponse().getRequestSettings().getUrl().toExternalForm(); }
/** * {@inheritDoc} * Not yet implemented. */ public String getDocumentURI() { return getWebResponse().getRequestSettings().getUrl().toExternalForm(); }
/** * Determines if the specified response can be cached. * * @param request the performed request * @param response the received response * @return <code>true</code> if the response can be cached */ protected boolean isCacheable(final WebRequestSettings request, final WebResponse response) { return HttpMethod.GET == response.getRequestSettings().getHttpMethod() && !isDynamicContent(response); }
/** * Determines if the specified response can be cached. * * @param request the performed request * @param response the received response * @return <code>true</code> if the response can be cached */ protected boolean isCacheable(final WebRequestSettings request, final WebResponse response) { return HttpMethod.GET == response.getRequestSettings().getHttpMethod() && !isDynamicContent(response); }
/** * Returns the value of the "referrer" property. * @return the value of the "referrer" property */ public String jsxGet_referrer() { final String referrer = getPage().getWebResponse().getRequestSettings().getAdditionalHeaders().get("Referer"); if (referrer == null) { return ""; } return referrer; }
/** * Returns the value of the "URL" property. * @return the value of the "URL" property */ public String jsxGet_URL() { return getHtmlPage().getWebResponse().getRequestSettings().getUrl().toExternalForm(); }
/** * Returns the value of the "referrer" property. * @return the value of the "referrer" property */ public String jsxGet_referrer() { final String referrer = getPage().getWebResponse().getRequestSettings().getAdditionalHeaders().get("Referer"); if (referrer == null) { return ""; } return referrer; }
/** * Refreshes the page by sending the same parameters as previously sent to get this page. * @return the newly loaded page. * @throws IOException if an IO problem occurs */ public Page refresh() throws IOException { return getWebClient().getPage(getWebResponse().getRequestSettings()); }
/** * Refreshes the page by sending the same parameters as previously sent to get this page. * @return the newly loaded page. * @throws IOException if an IO problem occurs */ public Page refresh() throws IOException { return getWebClient().getPage(getWebResponse().getRequestSettings()); }
/** * Parses the XHTML content from the specified <tt>WebResponse</tt> into an object tree representation. * * @param webResponse the response data * @param webWindow the web window into which the page is to be loaded * @return the page object which is the root of the DOM tree * @throws IOException if there is an IO error */ public static XHtmlPage parseXHtml(final WebResponse webResponse, final WebWindow webWindow) throws IOException { final XHtmlPage page = new XHtmlPage(webResponse.getRequestSettings().getUrl(), webResponse, webWindow); parse(webResponse, webWindow, page); return page; }
/** * Returns this location's current URL. * @return this location's current URL */ private URL getUrl() { return window_.getWebWindow().getEnclosedPage().getWebResponse().getRequestSettings().getUrl(); }
/** * {@inheritDoc} */ @Override public String getMessage() { final int code = getStatusCode(); final String msg = getStatusMessage(); final URL url = getResponse().getRequestSettings().getUrl(); return code + " " + msg + " for " + url; }
/** * Returns this location's current URL. * @return this location's current URL */ private URL getUrl() { return window_.getWebWindow().getEnclosedPage().getWebResponse().getRequestSettings().getUrl(); }
/** * {@inheritDoc} */ @Override public String getMessage() { final int code = getStatusCode(); final String msg = getStatusMessage(); final URL url = getResponse().getRequestSettings().getUrl(); return code + " " + msg + " for " + url; }
/** * Initializes the object. * * @param window the window that this location belongs to */ public void initialize(final Window window) { window_ = window; if (window_ != null && window_.getWebWindow().getEnclosedPage() != null) { hash_ = window_.getWebWindow().getEnclosedPage().getWebResponse().getRequestSettings().getUrl().getRef(); } }
/** * Initializes the object. * * @param window the window that this location belongs to */ public void initialize(final Window window) { window_ = window; if (window_ != null && window_.getWebWindow().getEnclosedPage() != null) { hash_ = window_.getWebWindow().getEnclosedPage().getWebResponse().getRequestSettings().getUrl().getRef(); } }
/** * Initializes the object. * * @param window the window that this location belongs to */ public void initialize(final Window window) { window_ = window; if (window_ != null && window_.getWebWindow().getEnclosedPage() != null) { hash_ = window_.getWebWindow().getEnclosedPage().getWebResponse().getRequestSettings().getUrl().getRef(); } }