name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_VAbstractCalendarPanel_setRangeEnd_rdh
/** * Sets the end range for this component. The end range is inclusive, and it * depends on the current resolution, what is considered inside the range. * * @param newRangeEnd * - the allowed range's end date */ public void setRangeEnd(String newRangeEnd) { if (!SharedUtil.equals(rangeEnd, newRangeEnd)) { // D...
3.26
framework_VAbstractCalendarPanel_focusNextMonth_rdh
/** * Selects the next month */ @SuppressWarnings("deprecation") private void focusNextMonth() { if (focusedDate == null) { return; } // Trying to request next month Date requestedNextMonthDate = ((Date) (focusedDate.clone())); m3(requestedNextMonthDate); if (!isDateInsideRange(requestedNextMonthDate, getResolution(...
3.26
framework_VAbstractCalendarPanel_getDateField_rdh
/** * Returns the date field which this panel is attached to. * * @return the "parent" date field */ protected VDateField<R> getDateField() { return parent; }
3.26
framework_VAbstractCalendarPanel_getResetKey_rdh
/** * Returns the reset key which will reset the calendar to the previous * selection. By default this is backspace but it can be overridden to * change the key to whatever you want. * * @return the reset key */ protected int getResetKey() { return KeyCodes.KEY_BACKSPACE; }
3.26
framework_VAbstractCalendarPanel_doRenderCalendar_rdh
/** * Performs the rendering required by the {@link #renderCalendar(boolean)}. * Subclasses may override this method to provide a custom implementation * avoiding {@link #renderCalendar(boolean)} override. The latter method * contains a common logic which should not be overridden. * * @param updateDate * The v...
3.26
framework_VAbstractCalendarPanel_focusPreviousMonth_rdh
/** * Selects the previous month */ @SuppressWarnings("deprecation") private void focusPreviousMonth() { if (focusedDate == null) { return; } Date requestedPreviousMonthDate = ((Date) (focusedDate.clone())); removeOneMonth(requestedPreviousMonthDate); if (!isDateInsideRange(requestedPreviousMonthDate, getResolution(...
3.26
framework_VAbstractCalendarPanel_setSubmitListener_rdh
/** * The submit listener is called when the user selects a value from the * calendar either by clicking the day or selects it by keyboard. * * @param submitListener * The listener to trigger */ public void setSubmitListener(SubmitListener submitListener) { this.submitListener = submitListener; }
3.26
framework_CurrentInstance_clearAll_rdh
/** * Clears all current instances. */ public static void clearAll() { INSTANCES.remove(); }
3.26
framework_CurrentInstance_defineFallbackResolver_rdh
/** * Adds a CurrentInstanceFallbackResolver, that is triggered when * {@link #get(Class)} can't find a suitable instance for the given type * parameter. * * @param type * the class used on {@link #get(Class)} invocations to retrieve * the curre...
3.26
framework_CurrentInstance_getInstances_rdh
/** * Gets the currently set instances so that they can later be restored using * {@link #restoreInstances(Map)}. * * @since 8.0 * @return a map containing the current instances */ public static Map<Class<?>, CurrentInstance> getInstances() { Map<Class<?>, CurrentInstance> map = INSTANCES.get();if (map == null)...
3.26
framework_CurrentInstance_set_rdh
/** * Sets the current instance of the given type. * * @see ThreadLocal * @param type * the class that should be used when getting the current * instance back * @param instance * the actual instance */ public static <T> CurrentInstance set(Class<T> type, T instance) { Map<Class<?>, CurrentInstance> ...
3.26
framework_CurrentInstance_restoreInstances_rdh
/** * Restores the given instances to the given values. Note that this should * only be used internally to restore Vaadin classes. * * @since 7.1 * @param old * A Class -> CurrentInstance map to set as current instances */ public static void restoreInstances(Map<Class<?>, CurrentInstance> old) { boolean ...
3.26
framework_AbstractEmbedded_setSource_rdh
/** * Sets the object source resource. The dimensions are assumed if possible. * The type is guessed from resource. * * @param source * the source to set. */public void setSource(Resource source) { setResource(AbstractEmbeddedState.SOURCE_RESOURCE, source); }
3.26
framework_AbstractEmbedded_getSource_rdh
/** * Get the object source resource. * * @return the source */public Resource getSource() { return getResource(AbstractEmbeddedState.SOURCE_RESOURCE); }
3.26
framework_StreamResource_getMIMEType_rdh
/** * * @see com.vaadin.server.Resource#getMIMEType() */ @Override public String getMIMEType() { if (mimeType != null) { return mimeType; } return FileTypeResolver.getMIMEType(filename); }
3.26
framework_StreamResource_setStreamSource_rdh
/** * Sets the source for this <code>StreamResource</code>. * <code>StreamSource</code> is queried when the resource is about to be * streamed to the client. * * @param streamSource * the source to set. */ public void setStreamSource(StreamSource streamSource) { this.streamSource = streamSource; }
3.26
framework_StreamResource_getStreamSource_rdh
/** * Returns the source for this <code>StreamResource</code>. StreamSource is * queried when the resource is about to be streamed to the client. * * @return Source of the StreamResource. */ public StreamSource getStreamSource() {...
3.26
framework_StreamResource_setBufferSize_rdh
/** * Sets the size of the download buffer used for this resource. * * @param bufferSize * the size of the buffer in bytes. */ public void setBufferSize(int bufferSize) { this.bufferSize = bufferSize; }
3.26
framework_StreamResource_setMIMEType_rdh
/** * Sets the mime type of the resource. * * @param mimeType * the MIME type to be set. */ public void setMIMEType(String mimeType) { this.mimeType = mimeType; }
3.26
framework_StreamResource_getCacheTime_rdh
/** * Gets the length of cache expiration time. This gives the adapter the * possibility cache streams sent to the client. The caching may be made in * adapter or at the client if the client supports caching. Default is * <code>DownloadStream.DEFAULT_CACHETIME</code>. * * @return Cache time in milliseconds. */ p...
3.26
framework_StreamResource_setFilename_rdh
/** * Sets the filename. * * @param filename * the filename to set. */ public void setFilename(String filename) {this.filename = filename; }
3.26
framework_VaadinServletResponse_doSetCacheTime_rdh
// Implementation shared with VaadinPortletResponse static void doSetCacheTime(VaadinResponse response, long milliseconds) { if (milliseconds <= 0) {response.setHeader("Cache-Control", "no-cache"); response.setHeader("Pragma", "no-cache"); response.setDateHeader("Expires", 0); } else { ...
3.26
framework_GridBasics_createDetailsMenu_rdh
/* DetailsGenerator related things */ private void createDetailsMenu(MenuItem detailsMenu) { MenuItem generatorsMenu = detailsMenu.addItem("Generators", null); generators.forEach((name, gen) -> generatorsMenu.addItem(name, item -> grid.setDetailsGenerator(gen))); generatorsMenu.addItem("- Change Component",...
3.26
framework_GridDragSourceConnector_getSelectedRowsInRange_rdh
/** * Get all selected rows from a subset of rows defined by {@code range}. * * @param range * Range of indexes. * @return List of data of all selected rows in the given range. */ private List<JsonObject> getSelectedRowsInRange(Range range) { List<JsonObject> selectedRows = new ArrayList<>(); for (int i...
3.26
framework_GridDragSourceConnector_addDraggedStyle_rdh
/** * Add {@code v-grid-row-dragged} class name to each row being dragged. * * @param event * The dragstart event. */ @Overrideprotected void addDraggedStyle(NativeEvent event) { getDraggedRowElementStream().forEach(rowElement -> rowElement.addClassName(draggedStyleName)); }
3.26
framework_GridDragSourceConnector_m0_rdh
/** * Remove {@code v-grid-row-dragged} class name from dragged rows. * * @param event * The dragend event. */ @Override protected void m0(NativeEvent event) { getDraggedRowElementStream().forEach(rowElement -> rowElement.removeClassName(draggedStyleName)); }
3.26
framework_FileDropTarget_createUrl_rdh
/** * Creates an upload URL for the given file and file ID. * * @param file * File to be uploaded. * @param id * Generated ID for the file. * @return Upload URL for uploading the file to the server. */ private String createUrl(Html5File file, String id) { return getStreamVariableTargetUrl("rec-" + id, n...
3.26
framework_FileDropTarget_disposeStreamVariable_rdh
/** * Calling this method has no effect. DD files are receive only once * anyway. */ @Override public void disposeStreamVariable() { }
3.26
framework_FileDropTarget_getParent_rdh
/** * Returns the component this extension is attached to. * * @return Extended component. */ @Override public T getParent() { return super.getParent(); }
3.26
framework_FileDropTarget_onDrop_rdh
/** * Invoked when a file or files have been dropped on client side. Fires the * {@link FileDropEvent}. * * @param fileParams * map from file ids to actual file details */ protected void onDrop(Map<String, FileParameters> fileParams) { Map<String, Html5File> files = new HashMap<>(); Map<String, String> ...
3.26
framework_DataChangeEvent_getItem_rdh
/** * Gets the refreshed item. * * @return the refreshed item */ public T getItem() { return item; }
3.26
framework_CommErrorEmulatorUI_setup_rdh
// Server exceptions will occur in this test as we are writing the response // here and not letting the servlet write it @Override protected void setup(VaadinRequest request) {String transport = request.getParameter("transport");if ("websocket".equalsIgnoreCase(transport)) { log("Using websocket"); } else i...
3.26
framework_WidgetRenderer_getWidget_rdh
/** * Returns the widget contained inside the given cell element, or null if it * is not an instance of the given class. Cannot be called for cells that do * not contain a widget. * * @param <W> * the Widget type * @param e * the element inside to find a widget * @param klass * the type of the widget to...
3.26
framework_AbstractSelectionModel_getGrid_rdh
/** * Returns the grid this selection model is attached to using, or throws * {@link IllegalStateException} if not attached to any selection model. * * @return the grid this selection model is attached to * @throws IllegalStateException * if this selection mode is not attached to any...
3.26
framework_SharedUtil_join_rdh
/** * Joins the words in the input array together into a single string by * inserting the separator string between each word. * * @since 7.4 * @param parts * The array of words * @par...
3.26
framework_SharedUtil_splitCamelCase_rdh
/** * Splits a camelCaseString into an array of words with the casing * preserved. * * @since 7.4 * @param camelCaseString * The input string in camelCase format * @return An array with one entry per word in the input string */ public static String[] splitCamelCase(String camelCaseString) { StringBuilder...
3.26
framework_SharedUtil_m0_rdh
/** * Capitalizes the first character in the given string in a way suitable for * use in code (methods, properties etc). * * @since 7.4 * @param string * The string to capitalize * @return The capitalized string */ public static String m0(String string) { if (string == null) { return null; } ...
3.26
framework_SharedUtil_trimTrailingSlashes_rdh
/** * Trims trailing slashes (if any) from a string. * * @param value * The string value to be trimmed. Cannot be null. * @return String value without trailing slashes. */ public static String trimTrailingSlashes(String value) { return value.replaceAll("/*$", ""); }
3.26
framework_SharedUtil_upperCaseUnderscoreToHumanFriendly_rdh
/** * Converts an UPPER_CASE_STRING to a human friendly format (Upper Case * String). * <p> * Splits words on {@code _}. Examples: * <p> * {@literal MY_BEAN_CONTAINER} becomes {@literal My Bean Container} * {@literal AWESOME_URL_FACTORY} becomes {@literal Awesome Url Factory} * {@literal SOMETHING} becomes {@li...
3.26
framework_SharedUtil_camelCaseToHumanFriendly_rdh
/** * Converts a camelCaseString to a human friendly format (Camel case * string). * <p> * In general splits words when the casing changes but also handles special * cases such as consecutive upper case characters. Examples: * <p> * {@literal MyBeanContainer} becomes {@literal My Bean Container} * {@literal Awe...
3.26
framework_SharedUtil_equals_rdh
/** * Checks if a and b are equals using {@link #equals(Object)}. Handles null * values as well. Does not ensure that objects are of the same type. * Assumes that the first object's equals method handle equals properly. * * @param o1 * The first value to compare * @param o2 * The second value to compare * ...
3.26
framework_SharedUtil_addGetParameters_rdh
/** * Adds the get parameters to the uri and returns the new uri that contains * the parameters. * * @param uri * The uri to which the parameters should be added. * @param extraParams * One or more parameters in t...
3.26
framework_SharedUtil_propertyIdToHumanFriendly_rdh
/** * Converts a property id to a human friendly format. Handles nested * properties by only considering the last part, e.g. "address.streetName" * is equal to "streetName" for this method. * * @since 7.4 * @param propertyId * The propertyId to format * @return A human friendly version of the property id */ ...
3.26
framework_HeartbeatHandler_synchronizedHandleRequest_rdh
/** * Handles a heartbeat request for the given session. Reads the GET * parameter named {@link UIConstants#UI_ID_PARAMETER} to identify the UI. * If the UI is found in the session, sets it * {@link UI#getLastHeartbeatTimestamp() heartbeat timestamp} to the current * time. Otherwise, writes...
3.26
framework_TooltipInfo_setErrorLevel_rdh
/** * Sets the error level. * * @param errorLevel * the error level to set * @since 8.2 */ public void setErrorLevel(ErrorLevel errorLevel) { this.errorLevel = errorLevel; }
3.26
framework_TooltipInfo_getTitle_rdh
/** * Gets the tooltip title. * * @return the title */ public String getTitle() { return f0; }
3.26
framework_TooltipInfo_setIdentifier_rdh
/** * Sets the tooltip's identifier. * * @param identifier * the identifier to set */ public void setIdentifier(Object identifier) { this.identifier = identifier; }
3.26
framework_TooltipInfo_setErrorMessage_rdh
/** * Sets the error message. * * @param errorMessage * the error message to set */ public void setErrorMessage(String errorMessage) { errorMessageHtml = errorMessage; }
3.26
framework_TooltipInfo_setTitle_rdh
/** * Sets the tooltip title. * * @param title * the title to set */ public void setTitle(String title) { this.f0 = title; }
3.26
framework_TooltipInfo_setContentMode_rdh
/** * Sets the tooltip title's content mode. * * @param contentMode * the content mode to set */ public void setContentMode(ContentMode contentMode) { this.contentMode = contentMode; }
3.26
framework_TooltipInfo_equals_rdh
/** * Indicates whether another tooltip info instance is equal to this one. Two * instances are equal if their title, error message, error level and * identifier are equal. * * @param other * the reference tooltip info instance with which to compare * @return {@code true} if the instances are equal, {@code fal...
3.26
framework_TooltipInfo_getIdentifier_rdh
/** * Gets the tooltip's identifier. * * @return the identifier */ public Object getIdentifier() { return identifier; }
3.26
framework_MultiSelectionModelImpl_fetchAllDescendants_rdh
/** * Fetch all the descendants of the given parent item from the given data * provider. * * @since 8.1 * @param parent * the parent item to fetch descendants for * @param dataProvider * the data provider to fetch from * @return the stream of all descendant items */ private Stream<T> fetchAllDescendants(T...
3.26
framework_MultiSelectionModelImpl_updateSelection_rdh
/** * Updates the selection by adding and removing the given items. * <p> * All selection updates should go through this method, since it handles * incorrect parameters, removing duplicates, notifying data communicator * and and firing events. * * @param addedItems * the items added to selection, not {@code }...
3.26
framework_MultiSelectionModelImpl_m4_rdh
/** * Triggered when the user checks the select all checkbox. * * @param userOriginated * {@code true} if originated from client side by user */ protected void m4(boolean userOriginated) { if (userOriginated) { verifyUserCanSelectAll(); // all selected state has been updated in client side already getS...
3.26
framework_MultiSelectionModelImpl_selectionContainsId_rdh
/** * Returns if the given id belongs to one of the selected items. * * @param id * the id to check for * @return {@code true} if id is selected, {@code false} if not */ protected boolean selectionContainsId(Object id) { DataProvider<T, ?> ...
3.26
framework_MultiSelectionModelImpl_fetchAll_rdh
/** * Fetch all items from the given data provider. * * @since 8.1 * @param dataProvider * the data provider to fetch from * @return all items in this data provider */ private Stream<T> fetchAll(DataProvider<T, ?> dataProvider) { return dataProvider.fetch(new Query<>()); }
3.26
framework_MultiSelectionModelImpl_fetchAllHierarchical_rdh
/** * Fetch all items from the given hierarchical data provider. * * @since 8.1 * @param dataProvider * the data provider to fetch from * @return all items in the data provider */ private Stream<T> fetchAllHierarchical(HierarchicalDataProvider<T, ?> dataProvider) { return fetchAllDescendants(null, dataProvide...
3.26
framework_MultiSelectionModelImpl_onDeselectAll_rdh
/** * Triggered when the user unchecks the select all checkbox. * * @param userOriginated * {@code true} if originated from client side by user */ protected void onDeselectAll(boolean userOriginated) { if (userOriginated) { verifyUserCanSelectAll();// all selected state has been update in client side already get...
3.26
framework_MultiSelectionModelImpl_m2_rdh
/** * Gets a wrapper for using this grid as a multiselect in a binder. * * @return a multiselect wrapper for grid */ @Override public MultiSelect<T> m2() { return new MultiSelect<T>() { @Override public void setValue(Set<T> value) { Objects.requireNonNull(value); Set<T> c...
3.26
framework_MultiSelectionModelImpl_updateCanSelectAll_rdh
/** * Controls whether the select all checkbox is visible in the grid default * header, or not. * <p> * This is updated as a part of {@link #beforeClientResponse(boolean)}, * since the data provider for grid can be changed on the fly. * * @see SelectAllCheckBoxVisibility */ protected void updateCanSelectAll() {...
3.26
framework_ConnectorHierarchyChangeEvent_getOldChildren_rdh
/** * Returns a collection of the old children for the connector. This was the * state before the update was received from the server. * * @return A collection of old child connectors. Never returns null. */ public List<ComponentConnector> getOldChildren() { return f0; }
3.26
framework_ConnectorHierarchyChangeEvent_setOldChildren_rdh
/** * Sets the collection of the old children for the connector. * * @param oldChildren * The old child connectors. Must not be null. */ public void setOldChildren(List<ComponentConnector> oldChildren) { this.f0 = oldChildren; } /** * Returns the {@link HasComponentsConnector} for which this event occurred...
3.26
framework_AbstractListing_deserializeDeclarativeRepresentation_rdh
/** * Deserializes a string to a data item. * <p> * Default implementation is able to handle only {@link String} as an item * type. There will be a {@link ClassCastException} if {@code T} is not a * {@link String}. * * @see #serializeDeclarativeRepresentation(Object) * @param item * string to deserialize * ...
3.26
framework_AbstractListing_doReadDesign_rdh
/** * Reads the listing specific state from the given design. * <p> * This method is separated from {@link #readDesign(Element, DesignContext)} * to be overridable in subclasses that need to replace this, but still must * be able to call {@code super.readDesign(...)}. * * @see #doWriteDesign(Element, DesignConte...
3.26
framework_AbstractListing_removeDataGenerator_rdh
/** * Removes the given data generator from this listing. If this listing does * not have the generator, does nothing. * * @param generator * the data generator to remove, not null */ protected void removeDataGenerator(DataGenerator<T> generator) { getDataCommunicator().removeDataGenerator(generator); }
3.26
framework_AbstractListing_refresh_rdh
/** * A helper method for refreshing the client-side representation of a * single data item. * * @param item * the item to refresh */ protected void refresh(T item) { getParent().getDataCommunicator().refresh(item); }
3.26
framework_AbstractListing_getDataCommunicator_rdh
/** * Returns the data communicator of this listing. * * @return the data communicator, not null */ public DataCommunicator<T> getDataCommunicator() { return dataCommunicator;}
3.26
framework_AbstractListing_getData_rdh
/** * Gets a data object based on its client-side identifier key. * * @param key * key for data object * @return the data object */ protected T getData(String key) { return getParent().getDataCommunicator().getKeyMapper().get(key); }
3.26
framework_AbstractListing_writeItem_rdh
/** * Writes a data source Item to a design. Hierarchical select components * should override this method to recursively write any child items as well. * * @param design * the element into which to insert the item * @param item * the item to write * @param context * the DesignContext instance used in wri...
3.26
framework_AbstractListing_writeItems_rdh
/** * Writes the data source items to a design. Hierarchical select components * should override this method to only write the root items. * * @param design * the element into which to insert the items * @param context * the DesignContext instance used in writing */ protected void writeItems(Element design,...
3.26
framework_AbstractListing_m0_rdh
/** * Sets the item icon generator that is used to produce custom icons for * shown items. The generator can return null for items with no icon. * <p> * Implementations that support item icons make this method public. * * @see IconGenerator * @param itemIconGenerator * the item icon generator to set, not null...
3.26
framework_AbstractListing_readItem_rdh
/** * Reads an Item from a design and inserts it into the data source. * <p> * Doesn't care about selection/value (if any). * * @param child * a child element representing the item * @param context * the DesignContext instance used in parsing * @return the item id of the new item * @throws DesignException...
3.26
framework_AbstractListing_setItemCaptionGenerator_rdh
/** * Sets the item caption generator that is used to produce the strings shown * in the combo box for each item. By default, * {@link String#valueOf(Object)} is used. * * @param itemCaptionGenerator * the item caption provider to use, not null */ protected void setItemCaptionGenerator(ItemCaptionGenerator<T> ...
3.26
framework_AbstractListing_doWriteDesign_rdh
/** * Writes listing specific state into the given design. * <p> * This method is separated from * {@link #writeDesign(Element, DesignContext)} to be overridable in * subclasses that need to replace this, but still must be able to call * {@code super.writeDesign(...)}. * * @see #doReadDesign(Element, DesignCont...
3.26
framework_AbstractListing_serializeDeclarativeRepresentation_rdh
/** * Serializes an {@code item} to a string for saving declarative format. * <p> * Default implementation delegates a call to {@code item.toString()}. * * @see #deserializeDeclarativeRepresentation(String) * @param item * a data item * @return string representation of the {@code item}. */ protected String s...
3.26
framework_AbstractListing_extend_rdh
/** * Adds this extension to the given parent listing. * * @param listing * the parent component to add to */ public void extend(AbstractListing<T> listing) { super.extend(listing); listing.addDataGenerator(this); }
3.26
framework_AbstractListing_getItemIconGenerator_rdh
/** * Gets the currently used item icon generator. The default item icon * provider returns null for all items, resulting in no icons being used. * <p> * Implementations that support item icons make this method public. * * @see IconGenerator * @see #setItemIconGenerator(IconGener...
3.26
framework_Video_getPoster_rdh
/** * * @return The poster image. */ public Resource getPoster() { return getResource(VideoConstants.POSTER_RESOURCE); }
3.26
framework_FocusableHTML_m0_rdh
/** * Focus the panel. */ @Override public void m0() { setFocus(true); }
3.26
framework_FocusableHTML_setFocus_rdh
/** * Sets/Removes the keyboard focus to the panel. * * @param focus * If set to true then the focus is moved to the panel, if set to * false the focus is removed */ public void setFocus(boolean focus) { if (focus) { FocusImpl.getFocusImplForPanel().focus(getElement()); } else { Focus...
3.26
framework_VMediaBase_setPreload_rdh
/** * Sets the preload attribute that is intended to provide a hint to the * browser how the media should be preloaded. See * AbstractMedia.setPreload(PreloadMode) and PreloadMode for more * information. * * @param preload * preload mode * @since 7.7.11 */ public void setPreload(final String preload) { m...
3.26
framework_VMediaBase_setLoop_rdh
/** * Enables or disables looping. * * @param loop * if true, enable looping * @since 7.7.11 */ public void setLoop(final boolean loop) { media.setLoop(loop); }
3.26
framework_VaadinSession_setConverterFactory_rdh
/** * Sets the {@code ConverterFactory} used to locate a suitable * {@code Converter} for fields in the session. * <p> * The {@code ConverterFactory} is used to find a suitable converter when * binding data to a UI component and the data type does not match the UI * component type, e.g. binding a Double to a Text...
3.26
framework_VaadinSession_removeUIProvider_rdh
/** * Removes a UI provider association from this session. * * @param uiProvider * the UI provider that should be removed */ public void removeUIProvider(UIProvider uiProvider) { assert hasLock(); uiProviders.remove(uiProvider); }
3.26
framework_VaadinSession_addUI_rdh
/** * Adds an initialized UI to this session. * * @param ui * the initialized UI to add. */ public void addUI(UI ui) { assert hasLock(); if (ui.getUIId() == (-1)) { throw new IllegalArgumentException("Can not add an UI that has not been initialized."); } if (ui.getSession() != this) { throw n...
3.26
framework_VaadinSession_addRequestHandler_rdh
/** * Adds a request handler to this session. Request handlers can be added to * provide responses to requests that are not handled by the default * functionality of the framework. * <p> * Handlers are called in reverse order of addition, so the most recently * added handler will be called first. * </p> * * @p...
3.26
framework_VaadinSession_hasLock_rdh
/** * Checks if the current thread has exclusive access to the given * WrappedSession. * * @return true if this thread has exclusive access, false otherwise * @since 7.6 */ protected static boolean hasLock(VaadinService service, WrappedSession session) { ReentrantLock l = ((ReentrantLock) (service.getSessionL...
3.26
framework_VaadinSession_setState_rdh
/** * Sets the lifecycle state of this session. The allowed transitions are * OPEN to CLOSING and CLOSING to CLOSED. * * @since 7.2 * @param state * the new state */ protected void setState(State state) { assert hasLock(); assert this.state.isValidChange(state) : (("Invalid session state change " + this.state...
3.26
framework_VaadinSession_setCurrent_rdh
/** * Sets the thread local for the current session. This method is used by the * framework to set the current session whenever a new request is processed * and it is cleared when the request has been processed. * <p> * The application develop...
3.26
framework_VaadinSession_getPendingAccessQueue_rdh
/** * Gets the queue of tasks submitted using {@link #access(Runnable)}. It is * safe to call this method and access the returned queue without holding * the {@link #lock() session lock}. * * @since 7.1 * @return the queue of pending access tasks */ public Queue<FutureAccess> getPendingAccessQueue() { return pen...
3.26
framework_VaadinSession_addBootstrapListener_rdh
/** * Adds a listener that will be invoked when the bootstrap HTML is about to * be generated. This can be used to modify the contents of the HTML that * loads the Vaadin application in the browser and the HTTP headers that are * included in the response serving the HTML. * * @see BootstrapListener#modifyBootstra...
3.26
framework_VaadinSession_m4_rdh
/** * Gets the push connection identifier for this session. Used when * establishing a push connection with the client. * * @return the push connection identifier string * @since 8.0.6 */ public String m4() { assert hasLock(); return pushId;}
3.26
framework_VaadinSession_getCsrfToken_rdh
/** * Gets the CSRF token (aka double submit cookie) that is used to protect * against Cross Site Request Forgery attacks. * * @since 7.1 * @return the csrf token string */ public String getCsrfToken() { assert hasLock(); return csrfToken; }
3.26
framework_VaadinSession_refreshLock_rdh
/** * Updates the transient session lock from VaadinService. */ private void refreshLock() { assert (lock == null) || (lock == service.getSessionLock(session)) : "Cannot change the lock from one instance to another"; assert hasLock(service, session); lock = service.getSessionLock(session); }
3.26
framework_VaadinSession_getAllSessions_rdh
/** * Retrieves all {@link VaadinSession}s which are stored in the given HTTP * session. * * @since 7.2 * @param httpSession * the HTTP session * @return the found VaadinSessions */ public static Collection<VaadinSession> getAllSessions(HttpSession httpSession) { Set<VaadinSession> sessions = new HashSet<...
3.26
framework_VaadinSession_close_rdh
/** * Sets this session to be closed and all UI state to be discarded at the * end of the current request, or at the end of the next request if there is * no ongoing one. * <p> * After the session has been discarded, any UIs that have been left open * will give a Session Expired error and a new session will be cr...
3.26
framework_VaadinSession_handleError_rdh
/** * Handles exceptions thrown during the execution of this task. * * @since 7.1.8 * @param exception * the thrown exception. */ public void handleError(Exception exception) { try { exception = ErrorHandlingRunnable.processException(runnable, exception); if (exception != null) { ...
3.26
framework_VaadinSession_getUIs_rdh
/** * Gets all the UIs of this session. This includes UIs that have been * requested but not yet initialized. UIs that receive no heartbeat requests * from the client are eventually removed from the session. * * @return a collection of UIs belonging to this application * @since 7.0 */ public Collection<UI> getUI...
3.26
framework_VaadinSession_getUIProviders_rdh
/** * Gets the UI providers configured for this session. * * @return an unmodifiable list of UI providers */ public List<UIProvider> getUIProviders() { assert hasLock(); return Collections.unmodifiableList(uiProviders); }
3.26