name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_AbstractFieldConnector_isRequired_rdh
/** * Checks whether the required indicator should be shown for the field. * Required indicators are hidden if the field or its data source is * read-only. * <p> * NOTE: since 8.0 this only delegates to * {@link #isRequiredIndicatorVisible()}, and is left for legacy reasons. * * @deprecated Use {@link #isRequir...
3.26
framework_ViewChangeListener_getNewView_rdh
/** * Returns the view being activated. * * @return new View */ public View getNewView() { return newView; }
3.26
framework_ViewChangeListener_afterViewChange_rdh
/** * Invoked after the view is changed. If a <code>beforeViewChange</code> * method blocked the view change, this method is not called. Be careful of * unbounded recursion if you decide to change the view again in the * listener. * <p> * By default it does nothing. Override it in your listener if you need this ...
3.26
framework_ViewChangeListener_getNavigator_rdh
/** * Returns the navigator that triggered this event. * * @return Navigator (not null) */ public Navigator getNavigator() { return ((Navigator) (getSource())); }
3.26
framework_RpcDataSourceConnector_updateRowData_rdh
/** * Updates row data based on row key. * * @since 7.6 * @param row * new row object */ protected void updateRowData(JsonObject row) { int index = indexOfKey(getRowKey(row)); if (index >= 0) { setRowData(index, Collections.singletonList(row)); } }
3.26
framework_Button_getIconAlternateText_rdh
/** * Returns the icon's alt text. * * @return String with the alt text */public String getIconAlternateText() { return getState(false).iconAltText; }
3.26
framework_Button_setIcon_rdh
/** * Sets the component's icon and alt text. * <p> * An alt text is shown when an image could not be loaded, and read by * assistive devices. * * @param icon * the icon to be shown with the component's caption. * @param iconAltText * String to use as alt text */ public void setIcon(Resource icon, String ...
3.26
framework_Button_addClickListener_rdh
/** * Adds the button click listener. * * @see Registration * @param listener * the Listener to be added. * @return a registration object for removing the listener * @since 8.0 */ public Registration addClickListener(ClickListener listener) { return addListener(Button.ClickEvent.class, listener, ClickList...
3.26
framework_Button_getButton_rdh
/** * Gets the Button where the event occurred. * * @return the Source of the event. */ public Button getButton() { return ((Button) (getSource())); }
3.26
framework_Button_removeClickShortcut_rdh
/** * Removes the keyboard shortcut previously set with * {@link #setClickShortcut(int, int...)}. */ public void removeClickShortcut() { if (clickShortcut != null) { removeShortcutListener(clickShortcut); clickShortcut = null; getState().clickShortcutKeyCode = 0; } }
3.26
framework_Button_setClickShortcut_rdh
/** * Makes it possible to invoke a click on this button by pressing the given * {@link KeyCode} and (optional) {@link ModifierKey}s.<br/> * The shortcut is global (bound to the containing Window). * * @param keyCode * the keycode for invoking the shortcut * @param modifiers ...
3.26
framework_Button_getClientY_rdh
/** * Returns the mouse position (y coordinate) when the click took place. * The position is relative to the browser client area. * * @return The mouse cursor y position or -1 if unknown */ public int getClientY() { if (null != details) { return details.getClientY(); } else { return -1; ...
3.26
framework_Button_fireClick_rdh
/** * Fires a click event to all listeners. * * @param details * MouseEventDetails from which keyboard modifiers and other * information about the mouse click can be obtained. If the * button was clicked by a keyboard event, some of the fields may * be empty/undefined. */ protected void fireClick(MouseE...
3.26
framework_Button_m0_rdh
/** * Determines if a button is automatically disabled when clicked. If this is * set to true the button will be automatically disabled when clicked, * typically to prevent (accidental) extra clicks on a button. * <p> * Note that this is only used when the click comes from the user, not when * calling {@link #cli...
3.26
framework_Button_m1_rdh
/** * Set whether the caption text is rendered as HTML or not. You might need * to re-theme button to allow higher content than the original text style. * * If set to true, the captions are passed to the browser as html and the * developer is responsible for ensuring no harmful html is used. If set to * false, th...
3.26
framework_ItemClickEvent_getItemId_rdh
/** * Gets a possible identifier in source for clicked Item. * * @return */ public Object getItemId() { return itemId; }
3.26
framework_GridLayoutElement_getCell_rdh
/** * Gets the cell element at the given position. * * @param row * the row coordinate * @param column * the column coordinate * @return the cell element at the given position * @throws NoSuchElementException * if no cell was found at the given position * @since 8.0.6 */ public WebElement getCell(int r...
3.26
framework_GridLayoutElement_getColumnCount_rdh
/** * Gets the total number of columns in the layout. * * @return the number of columns in the layout * @since 8.0.6 */ public long getColumnCount() { Long res = ((Long) (getCommandExecutor().executeScript("return arguments[0].getColumnCount()", this))); if (res == null) { throw new IllegalStateExc...
3.26
framework_GridLayoutElement_getRowCount_rdh
/** * Gets the total number of rows in the layout. * * @return the number of rows in the layout * @since 8.0.6 */ public long getRowCount() { Long res = ((Long) (getCommandExecutor().executeScript("return arguments[0].getRowCount()", this))); if (res == null) { throw new Illega...
3.26
framework_AbstractMultiSelectConnector_isEnabled_rdh
/** * Returns whether the given item is enabled or not. * <p> * Disabling items is not supported by all multiselects. * * @param item * the item, not {@code null} * @return {@code true} enabled, {@code false} if not */ static boolean isEnabled(JsonObject item) { return !(item.hasKey(ListingJsonConstants....
3.26
framework_AbstractMultiSelectConnector_getCaption_rdh
/** * Returns the caption for the given item. * * @param item * the item, not {@code null} * @return caption of the item */ static String getCaption(JsonObject item) { return item.getString(ListingJsonConstants.JSONKEY_ITEM_VALUE); }
3.26
framework_AbstractMultiSelectConnector_m0_rdh
/** * Returns the key for the given item. * * @param item * the item, not {@code null} * @return key of the item */ static String m0(JsonObject item) { return getRowKey(item); }
3.26
framework_AbstractMultiSelectConnector_onDataChange_rdh
/** * This method handles the parsing of the new JSON data containing the items * and the selection information. * * @param range * the updated range, never {@code null} */ protected void onDataChange(Range range) { assert (range.getStart() == 0) && (range.getEnd() == get...
3.26
framework_AbstractMultiSelectConnector_getIconUrl_rdh
/** * Returns the optional icon URL for the given item. * <p> * Item icons are not supported by all multiselects. * * @param item * the item * @return the optional icon URL, or an empty optional if none specified */ static Optional<String> getIconUrl(JsonObject item) { return Optional.ofNullable(item.getS...
3.26
framework_AbstractMultiSelectConnector_isSelected_rdh
/** * Returns whether this item is selected or not. * * @param item * the item, not {@code null} * @return {@code true} is selected, {@code false} if not */ static boolean isSelected(JsonObject item) { return item.getBoolean(ListingJsonConstants.JSONKEY_ITEM_SELECTED);}
3.26
framework_GridRowDragger_getGridDropTarget_rdh
/** * Returns the drop target grid to allow performing customizations such as * altering {@link DropEffect}. * * @return the drop target grid */ public GridDropTarget<T> getGridDropTarget() { return gridDropTarget; }
3.26
framework_GridRowDragger_setTargetDataProviderUpdater_rdh
/** * Sets the target data provider updater, which handles adding the dropped * items to the target grid. * <p> * By default, items are added to the index where they were dropped on for * any {@link ListDataProvider}. If another type of data provider is used, * this updater should be set to handle updating instea...
3.26
framework_GridRowDragger_getTargetDataProviderUpdater_rdh
/** * Returns the target grid data provider updater. * * @return target grid drop handler */ public TargetDataProviderUpdater<T> getTargetDataProviderUpdater() { return targetDataProviderUpdater; }
3.26
framework_GridRowDragger_getDraggedItems_rdh
/** * Returns the currently dragged items captured from the source grid no drag * start event, or {@code null} if no drag active. * * @return the currently dragged items or {@code null} */ protected List<T> getDraggedItems() { return draggedItems; }
3.26
framework_GridRowDragger_getDropIndexCalculator_rdh
/** * Gets the drop index calculator. * <p> * Default is {@code null} and the dropped items are placed on the drop * location. * * @return the drop index calculator */ public DropIndexCalculator<T> getDropIndexCalculator() { return dropTargetIndexCalculator; }
3.26
framework_GridRowDragger_setSourceDataProviderUpdater_rdh
/** * Sets the source data provider updater, which handles removing items from * the drag source grid. * <p> * By default the items are removed from any {@link ListDataProvider}. If * another type of data provider is used, this updater should be set to * handle updating instead. * <p> * If you want to skip remo...
3.26
framework_GridRowDragger_getSourceDataProviderUpdater_rdh
/** * Returns the source grid data provider updater. * <p> * Default is {@code null} and the items are just removed from the source * grid, which only works for {@link ListDataProvider}. * * @return the source grid drop handler */ public SourceDataProviderUpdater<T> getSourceDataProviderUpdater() { return sourc...
3.26
framework_GridRowDragger_handleDrop_rdh
/** * This method is triggered when there has been a drop on the target grid. * <p> * <em>This method is protected only for testing reasons, you should not * override this</em> but instead use * {@link #setSourceDataProviderUpdater(SourceDataProviderUpdater)}, * {@link #setTargetDataProviderUpdater(TargetDataProv...
3.26
framework_GridRowDragger_m0_rdh
/** * Sets the drop index calculator for the target grid. With this callback * you can have a custom drop location instead of the actual one. * <p> * By default, items are placed on the index they are dropped into in the * target grid. * <p> * If you want to always drop items to the end of the target grid, you c...
3.26
framework_ConnectorEvent_getConnector_rdh
/** * Returns the connector that fired the event. * * @return the source connector */ public ClientConnector getConnector() { return ((ClientConnector) (getSource())); }
3.26
framework_VUIDLBrowser_m0_rdh
/** * Returns the Connector associated with this state change. */ protected ServerConnector m0() { return client.getConnectorMap().getConnector(getConnectorId()); }
3.26
framework_VDragEvent_getTransferable_rdh
/** * Returns the VTransferable instance that represents the original dragged * element. * * @return the transferable instance */ public VTransferable getTransferable() { return transferable; }
3.26
framework_VDragEvent_getDropDetails_rdh
/** * Returns the details of the drag and drop operation. * * TODO consider using similar smaller (than map) API as in Transferable * * TODO clean up when drop handler changes * * @return the drop details */ public Map<String, Object> getDropDetails() { return dropDetails; } /** * Sets the drag image used...
3.26
framework_VDragEvent_getElementOver_rdh
/** * Detecting the element on which the the event is happening may be * problematic during drag and drop operation. This is especially the case * if a drag image (often called also drag proxy) is kept under the mouse * cursor (see {@link #createDragImage(Element, boolean)}. Drag and drop * event handlers (like th...
3.26
framework_VDragEvent_syncContent_rdh
/** * Do additional content sync between <code>original</code> element and its * <code>copy</code> if needed. * * @since 7.2 * @param original * original element * @param copy * copy of original element */ private void syncContent(Element original, Element copy) { for (int i = 0; i < original.getChild...
3.26
framework_VDragEvent_setDragImage_rdh
/** * Sets the drag image used for current drag and drop operation. Drag image * is displayed next to mouse cursor during drag and drop. * <p> * The element to be used as drag image will automatically get CSS style * name "v-drag-element". * * @param element * the dom element to be positioned next to mouse cu...
3.26
framework_VDragEvent_createDragImage_rdh
/** * Automatically tries to create a proxy image from given element. * * @param element * the original element that is dragged * @param alignImageToEvent * if true, proxy image is aligned to start event, else next to * mouse cursor * @since 7.2 */ public void createDragImage(Element element, boolean ali...
3.26
framework_VDragEvent_setCurrentGwtEvent_rdh
/** * Sets the latest {@link NativeEvent} that relates to this drag and drop * operation. For example on {@link VDropHandler#dragEnter(VDragEvent)} this * is commonly a {@link MouseOverEvent}. * * @param event * the latest event */ public void setCurrentGwtEvent(NativeEvent event) { currentGwtEvent = event...
3.26
framework_VDragEvent_setElementOver_rdh
/** * * @since 7.2 * @param targetElement * target element over which DnD event has happened * @see #getElementOver() */ public void setElementOver(Element targetElement) { setElementOver(DOM.asOld(targetElement)); } /** * Sets the drag image used for current drag and drop operation. Drag image * is dis...
3.26
framework_ServerRpcMethodInvocation_findInvocationMethod_rdh
/** * Tries to find the method from the cache or alternatively by invoking * {@link #doFindInvocationMethod(Class, String, int)} and updating the * cache. * * @param targetType * @param methodName * @param parameterCount * @return */ private Method findInvocationMethod(Class<?> targetType, String methodName, i...
3.26
framework_ServerRpcMethodInvocation_doFindInvocationMethod_rdh
/** * Tries to find the method from the class by looping through available * methods. * * @param targetType * @param methodName * @param parameterCount * @return */ private Method doFindInvocationMethod(Class<?> targetType, String methodName, int parameterCount) { Method[] methods = targetType.getMethods();...
3.26
framework_BasicEvent_fireEventChange_rdh
/** * Fires an event change event to the listeners. Should be triggered when * some property of the event changes. */ protected void fireEventChange() { EventChangeEvent event = new EventChangeEvent(this); for (EventChangeListener listener : listeners) { listener.eventChange(event); } }
3.26
framework_TreeGridDropEvent_m0_rdh
/** * Gets the depth of the drop target row in the hierarchy. * * @return the depth of the drop target row in the hierarchy */ public Optional<Integer> m0() { return Optional.ofNullable(depth); } /** * Tells whether the drop target row is collapsed. * * @return {@code true} if the drop target row is coll...
3.26
framework_VConsole_setImplementation_rdh
/** * Used by ApplicationConfiguration to initialize VConsole. * * @param console */ static void setImplementation(VDebugWindow console) { impl = console; }
3.26
framework_TestingPushConnection_createConfig_rdh
/* Force transport */ @Override protected AtmosphereConfiguration createConfig() { AtmosphereConfiguration conf = super.createConfig(); if (transport != null) { conf.setTransport(transport);conf.setFallbackTransport(transport); } return conf; }
3.26
framework_ClickableRenderer_findClosestParentGrid_rdh
/** * Returns the Grid instance containing the given element, if any. * <p> * <strong>Note:</strong> This method may not work reliably if the grid * in question is wrapped in a {@link Composite} <em>unless</em> the * element is inside another widget that is a child of the wrapped grid; * please refer to the note ...
3.26
framework_ClickableRenderer_addClickHandler_rdh
/** * Adds a click handler to this button renderer. The handler is invoked * every time one of the widgets rendered by this renderer is clicked. * <p> * Note that the row type of the click handler must match the row type of * the containing Grid. * * @param handler * the click handler to be added */ public H...
3.26
framework_VLoadingIndicator_getElement_rdh
/** * Returns the root element of the loading indicator. * * @return The loading indicator DOM element */ public Element getElement() { if (element == null) { element = DOM.createDiv(); element.getStyle().setPosition(Position.ABSOLUTE); getConnection().getUIConnector().getWidget().getEle...
3.26
framework_VLoadingIndicator_ensureTriggered_rdh
/** * Triggers displaying of this loading indicator unless it's already visible * or scheduled to be shown after a delay. * * @since 7.4 */ public void ensureTriggered() { if ((!isVisible()) && (!firstTimer.isRunning())) {trigger(); } }
3.26
framework_VLoadingIndicator_getConnection_rdh
/** * Returns the {@link ApplicationConnection} which uses this loading * indicator. * * @return The ApplicationConnection for this loading indicator */ public ApplicationConnection getConnection() { return connection; }
3.26
framework_VLoadingIndicator_isVisible_rdh
/** * Returns whether or not the loading indicator is showing. * * @return true if the loading indicator is visible, false otherwise */ public boolean isVisible() {if (getElement().getStyle().getDisplay().equals(Display.NONE.getCssName())) { return false; } return true; }
3.26
framework_VLoadingIndicator_show_rdh
/** * Shows the loading indicator in its standard state and triggers timers for * transitioning into the "second" and "third" states. */ public void show() { // Reset possible style name and display mode getElement().setClassName(PRIMARY_STYLE_NAME); getElement().addClassName("first"); getElement().g...
3.26
framework_VLoadingIndicator_hide_rdh
/** * Hides the loading indicator (if visible). Cancels any possibly running * timers. */ public void hide() { firstTimer.cancel(); secondTimer.cancel(); thirdTimer.cancel(); getElement().getStyle().setDisplay(Display.NONE); }
3.26
framework_VLoadingIndicator_setSecondDelay_rdh
/** * Sets the delay (in ms) which must pass before the loading indicator moves * to its "second" state. * * @param secondDelay * The delay (in ms) until the loading indicator moves into its * "second" state. Counted from when {@link #trigger()} is * called. */ public void setSecondDelay(int secondDelay)...
3.26
framework_VLoadingIndicator_setConnection_rdh
/** * Sets the {@link ApplicationConnection} which uses this loading indicator. * Only used internally. * * @param connection * The ApplicationConnection for this loading indicator */ void setConnection(ApplicationConnection connection) { this.connection = connection; }
3.26
framework_VLoadingIndicator_setFirstDelay_rdh
/** * Sets the delay (in ms) which must pass before the loading indicator moves * into the "first" state and is shown to the user. * * @param firstDelay * The delay (in ms) until moving into the "first" state. Counted * from when {@link #trigger()} is called. */ public void setFirstDelay(int firstDelay) { ...
3.26
framework_VLoadingIndicator_m0_rdh
/** * Sets the delay (in ms) which must pass before the loading indicator moves * to its "third" state. * * @param thirdDelay * The delay (in ms) from the event until changing the loading * indicator into its "third" state. Counted from when * {@link #trigger()} is called. */ public void m0(int thirdDelay...
3.26
framework_ValoColorPickerTestUI_updateDisplay_rdh
// This is called whenever a colorpicker popup is closed /** * Update display. * * @param fg * the fg * @param bg * the bg */ public void updateDisplay(Color fg, Color bg) { Color awtFg = new Color(fg.getRed(), fg.getGreen(), fg.getBlue()); Color awtBg = new Color(bg.getRed(), bg.getGreen(), bg.getBlue());...
3.26
framework_ValoColorPickerTestUI_getStream_rdh
/* Must implement this method that returns the resource as a stream. */ @Override public InputStream getStream() { /* Create an image and draw something on it. */ BufferedImage image = new BufferedImage(270, 270, BufferedImage.TYPE_INT_RGB); Graphics drawable = image.getGraphics(); drawable.setColor(b...
3.26
framework_DesignFormatter_decodeFromTextNode_rdh
/** * <p> * Decodes HTML entities in a text from text node and replaces them with * actual characters. * </p> * * <p> * Typically this method will be used by components to read back data (like * option items in {@code AbstractSelect}) from HTML. Note that this method * unencodes more characters than {@link #en...
3.26
framework_DesignFormatter_encodeForTextNode_rdh
/** * <p> * Encodes <em>some</em> special characters in a given input String to make * it ready to be written as contents of a text node. WARNING: this will * e.g. encode "&lt;someTag&gt;" to "&amp;lt;someTag&amp;gt;" as this method * doesn't do any parsing and assumes that there are no intended HTML * elements i...
3.26
framework_DesignFormatter_addConverter_rdh
/** * Adds a converter for a given type. * * @param type * Type to convert to/from. * @param converter * Converter. * @since 8.0 */ protected <T> void addConverter(Class<?> type, Converter<String, ?> converter) { converterMap.put(type, converter); }
3.26
framework_DesignFormatter_removeConverter_rdh
/** * Removes the converter for given type, if it was present. * * @param type * Type to remove converter for. */ protected void removeConverter(Class<?> type) { converterMap.remove(type); }
3.26
framework_DesignFormatter_mapDefaultTypes_rdh
/** * Maps default types to their converters. */ protected void mapDefaultTypes() { // numbers use standard toString/valueOf approach for (Class<?> c : new Class<?>[]{ Byte.class, Short.class, Integer.class, Long.class }) { DesignToStringConverte...
3.26
framework_DesignFormatter_getRegisteredClasses_rdh
/** * Returns a set of classes that have a converter registered. This is <b>not * the same</b> as the list of supported classes - subclasses of classes in * this set are also supported. * * @return An unmodifiable set of classes that have a converter registered. */protected Set<Class<?>> getRegisteredClasses() { ...
3.26
framework_CustomDateTimeFormat_setup_rdh
/** * * @author Vaadin Ltd */public class CustomDateTimeFormat extends AbstractTestUI { @Override protected void setup(VaadinRequest request) { setLocale(new Locale("fi", "FI")); DateTimeField field = new DateTimeField();field.setResolution(DateTimeResolution.SECOND); field.setWi...
3.26
framework_UICreateEvent_getUIClass_rdh
/** * Gets the UI class that will be created. * * @return the UI class */ public Class<? extends UI> getUIClass() { return uiClass; }
3.26
framework_SystemMessageException_getCause_rdh
/** * * @see java.lang.Throwable#getCause() */ @Override public Throwable getCause() { return cause; }
3.26
framework_SortOrder_getDirection_rdh
/** * Returns the {@link SortDirection} value given in the constructor. * * @return a sort direction value */ public SortDirection getDirection() { return f0; }
3.26
framework_SortOrder_m0_rdh
/** * Returns a new SortOrder object with the sort direction reversed. * * @return a new sort order object */ public SortOrder m0() { return new SortOrder(column, f0.getOpposite()); }
3.26
framework_HierarchyPanel_showServerDebugInfo_rdh
/** * Outputs debug information on the server - usually in the console of an * IDE, with a clickable reference to the relevant code location. * * @since 7.1 * @param connector * show debug info for this connector */ static void showServerDebugInfo(ServerConnector connector) { if (connector != null) { connector...
3.26
framework_HierarchyPanel_collectOpenNodes_rdh
/** * Adds the captions of all open (non-leaf) nodes in the hierarchy tree * recursively. * * @param widget * the widget in which to search for open nodes (if SimpleTree) * @param openNodes * the set in which open nodes should be added */ private void collectOpenNodes(Widget widget, FastStringSet openNodes)...
3.26
framework_TreeGridElement_collapseWithClick_rdh
/** * Collapses the row at the given index in the grid with the given * hierarchical column index. * * @param rowIndex * 0-based row index to collapse * @param hierarchyColumnIndex * 0-based index of the hierarchy column */ public void collapseWithClick(int rowIndex, int hierarchyColumnIndex) { if (isRo...
3.26
framework_TreeGridElement_hasExpandToggle_rdh
/** * Check whether the given indices correspond to a cell that contains a * visible hierarchy toggle element. * * @param rowIndex * 0-based row index * @param hierarchyColumnIndex * 0-based index of the hierarchy column * @return {@code true} if this cell has the expand toggle visible */ public boolean h...
3.26
framework_TreeGridElement_isRowCollapsed_rdh
/** * Returns whether the row at the given index is collapsed or not. * * @param rowIndex * 0-based row index * @param hierarchyColumnIndex * 0-based index of the hierarchy column * @return {@code true} if collapsed, {@code false} if expanded */ public boolean isRowCollapsed(int rowIndex, int hierarchyColum...
3.26
framework_TreeGridElement_isRowExpanded_rdh
/** * Returns whether the row at the given index is expanded or not. * * @param rowIndex * 0-based row index * @param hierarchyColumnIndex * 0-based index of the hierarchy column * @return {@code true} if expanded, {@code false} if collapsed */ public boolean isRowExpanded(int rowIndex, int hierarchyColumnI...
3.26
framework_TreeGridElement_expandWithClick_rdh
/** * Expands the row at the given index in the grid with the given * hierarchical column index. * * @param rowIndex * 0-based row index to expand * @param hierarchyColumnIndex * 0-based index of the hierarchy column */ public void expandWithClick(int rowIndex, int hierarchyColumnIndex) { if (isRowExpan...
3.26
framework_VaadinService_getSystemMessages_rdh
/** * Gets the system message to use for a specific locale. This method may * also be implemented to use information from current instances of various * objects, which means that this method might return different values for * the same locale under different circumstances. * * @param locale * the desired local...
3.26
framework_VaadinService_isUIActive_rdh
/** * Returns whether the given UI is active (the client-side actively * communicates with the server) or whether it can be removed from the * session and eventually collected. * <p> * A UI is active if and only if its {@link UI#isClosing() isClosing} * returns false and {@link #getHeartbeatTimeout() getHeartbeat...
3.26
framework_VaadinService_getWrappedSession_rdh
/** * Retrieves the wrapped session for the request. * * @param request * The request for which to retrieve a session * @param requestCanCreateSession * true to create a new session if one currently does not exist * @return The retrieved (or created) wrapped session * @throws SessionExpiredException * If...
3.26
framework_VaadinService_removeClosedUIs_rdh
/** * Removes those UIs from the given session for which {@link UI#isClosing() * isClosing} yields true. * * @param session */ private void removeClosedUIs(final VaadinSession session) { List<UI> uis = new ArrayList<>(session.getUIs()); for (final UI ui : uis) { if (ui.isClosing()) { ui.accessSynchronously(() ...
3.26
framework_VaadinService_writeStringResponse_rdh
/** * Writes the given string as a response using the given content type. * * @param response * The response reference * @param contentType * The content type of the response * @param responseString * The actual response * @throws IOException * If an error occurred while writing the response */ publi...
3.26
framework_VaadinService_setClassLoader_rdh
/** * Sets the class loader to use for loading classes loaded by name, e.g. * custom UI classes. Invokers of this method should be careful to not break * any existing class loader hierarchy, e.g. by ensuring that a class loader * set for this service delegates to the previously set class loader if the * class is n...
3.26
framework_VaadinService_verifyNoOtherSessionLocked_rdh
/** * Checks that another {@link VaadinSession} instance is not locked. This is * internally used by {@link VaadinSession#accessSynchronously(Runnable)} * and {@link UI#accessSynchronously(Runnable)} to help avoid causing * deadlocks. * * @since 7.1 * @param session * the session that is being locked * @thro...
3.26
framework_VaadinService_addSessionInitListener_rdh
/** * Adds a listener that gets notified when a new Vaadin service session is * initialized for this service. * <p> * Because of the way different service instances share the same session, * the listener is not necessarily notified immediately when the session is * created but only when the first request for that...
3.26
framework_VaadinService_getServiceInitListeners_rdh
/** * Gets all available service init listeners. A custom Vaadin service * implementation can override this method to discover init listeners in * some other way in addition to the default implementation that uses * {@link ServiceLoader}. This could for example be used to allow defining * an init listener as an OS...
3.26
framework_VaadinService_destroy_rdh
/** * Called when the servlet, portlet or similar for this service is being * destroyed. After this method has been called, no more requests will be * handled by this service. * * @see #addServiceDestroyListener(ServiceDestroyListener) * @see Servlet#destroy() * @see Portlet#destroy() * @since 7.2 */ public vo...
3.26
framework_VaadinService_lockSession_rdh
/** * Locks the given session for this service instance. Typically you want to * call {@link VaadinSession#lock()} instead of this method. * <p> * Note: The method and its signature has been changed to return lock * instance in Vaadin 8.14.0. If you have overriden this method, you need ...
3.26
framework_VaadinService_readFromHttpSession_rdh
/** * Performs the actual read of the VaadinSession from the underlying HTTP * session after sanity checks have been performed. * <p> * Called by {@link #loadSession(WrappedSession)}. * * @param wrappedSession * the underlying HTTP session * @since 7.6 * @return the VaadinSession or null if no session was fo...
3.26
framework_VaadinService_createVaadinSession_rdh
/** * Creates a new Vaadin session for this service and request. * * @param request * The request for which to create a VaadinSession * @return A new VaadinSession * @throws ServiceException */ protected VaadinSession createVaadinSession(VaadinRequest request) throws ServiceException { return new VaadinSe...
3.26
framework_VaadinService_isSessionActive_rdh
/** * Returns whether the given session is active or whether it can be closed. * <p> * A session is active if and only if its {@link VaadinSession#getState()} * returns {@link State#OPEN} and * {@link #getUidlRequestTimeout(VaadinSession) getUidlRequestTimeout} is * negative or has not yet expired. * * @param s...
3.26
framework_VaadinService_m3_rdh
/** * Adds a service destroy listener that gets notified when this service is * destroyed. * <p> * The listeners may be invoked in a non-deterministic order. In particular, * it is not guaranteed that listeners will be invoked in the order they * were added. * * @since 8.0 * @param listener * the service de...
3.26
framework_VaadinService_setSystemMessagesProvider_rdh
/** * Sets the system messages provider to use for getting system messages to * display to users of this service. * * @see #getSystemMessagesProvider() * @param systemMessagesProvider * the system messages provider; <code>null</code> is not * allowed. */ public void setSystemMessagesProvider(SystemMessagesP...
3.26
framework_VaadinService_createRequestHandlers_rdh
/** * Called during initialization to add the request handlers for the service. * Note that the returned list will be reversed so the last handler will be * called first. This enables overriding this method and using add on the * returned list to add a custom request handler which overrides any * predefined handle...
3.26
framework_VaadinService_loadSession_rdh
/** * Called when the VaadinSession should be loaded from the underlying HTTP * session. * * @since 7.6 * @param wrappedSession * the underlying HTTP session * @return the VaadinSession in the HTTP session or null if not found */ protected VaadinSession loadSession(WrappedSession wrappedSession) { assert Vaad...
3.26