/** * Gets the current Session object. * * @return The Session that this component is in */ public Session getSession() { return Session.get(); }
/** * @see org.apache.wicket.page.IPageManagerContext#getSessionId() */ @Override public String getSessionId() { return Session.get().getId(); }
/** * @see org.apache.wicket.page.IPageManagerContext#getSessionAttribute(java.lang.String) */ @Override public Serializable getSessionAttribute(final String key) { return Session.get().getAttribute(key); }
private Locale getLocale() { return Session.exists() ? Session.get().getLocale() : null; } }
private String getCurrentStyle() { if (style == null && Session.exists()) { return Session.get().getStyle(); } return style; }
public static InterceptData get() { if (Session.exists()) { return Session.get().getMetaData(key); } return null; }
private Locale getCurrentLocale() { if (locale == null && Session.exists()) { return Session.get().getLocale(); } return locale; }
/** * Gets the current Session object. * * @return The Session that this component is in */ public Session getSession() { return Session.get(); }
private String getCurrentStyle() { if (style == null && Session.exists()) { return Session.get().getStyle(); } return style; }
/** * @return human readable string of total number of bytes */ public String getTotalBytesString() { return Bytes.bytes(totalBytes).toString(Session.get().getLocale()); }
/** * @return Current authenticated web session */ public static AbstractAuthenticatedWebSession get() { return (AbstractAuthenticatedWebSession)Session.get(); }
/** * @return human readable string of total number of bytes */ public String getTotalBytesString() { return Bytes.bytes(totalBytes).toString(Session.get().getLocale()); }
/** * @see org.apache.wicket.page.IPageManagerContext#bind() */ @Override public void bind() { Session.get().bind(); }
/** * @return human readable string of bytes uploaded so far */ public String getBytesUploadedString() { return Bytes.bytes(bytesUploaded).toString(Session.get().getLocale()); }
/** * @see org.apache.wicket.page.IPageManagerContext#setSessionAttribute(java.lang.String, * java.io.Serializable) */ @Override public void setSessionAttribute(String key, Serializable value) { Session.get().setAttribute(key, value); } }
/** * @return human readable string of bytes uploaded so far */ public String getBytesUploadedString() { return Bytes.bytes(bytesUploaded).toString(Session.get().getLocale()); }
public static void clear() { if (Session.exists()) { Session.get().setMetaData(key, null); } }
/** * @return transfer rate in a human readable string */ public String getTransferRateString() { return Bytes.bytes(getTransferRateBPS()).toString(Session.get().getLocale()) + "/s"; }
@Override protected final void onTimer(AjaxRequestTarget target) { stop(target); RequestCycle requestCycle = RequestCycle.get(); IRequestParameters requestParameters = requestCycle.getRequest().getRequestParameters(); WebClientInfo clientInfo = newWebClientInfo(requestCycle); clientInfo.getProperties().read(requestParameters); Session.get().setClientInfo(clientInfo); onClientInfo(target, clientInfo); }
/** * @return transfer rate in a human readable string */ public String getTransferRateString() { return Bytes.bytes(getTransferRateBPS()).toString(Session.get().getLocale()) + "/s"; }