DragSourceExtension
and DropTargetExtension.@Deprecated public class DragAndDropService extends Object implements VariableOwner, ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener| Constructor and Description |
|---|
DragAndDropService(VaadinSession session)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Registration |
addAttachListener(ClientConnector.AttachListener listener)
Deprecated.
Add a listener for connector attach events.
|
Registration |
addDetachListener(ClientConnector.DetachListener listener)
Deprecated.
Add a listener for connector detach events.
|
void |
attach()
Deprecated.
Notifies the connector that it is connected to a VaadinSession (and
therefore also to a UI).
|
void |
beforeClientResponse(boolean initial)
Deprecated.
Called before the shared state and RPC invocations are sent to the
client.
|
void |
changeVariables(Object source,
Map<String,Object> variables)
Deprecated.
Called when one or more variables handled by the implementing class are
changed.
|
void |
detach()
Deprecated.
Notifies the connector that it is detached from its VaadinSession.
|
JsonObject |
encodeState()
Deprecated.
Called by the framework to encode the state to a JSONObject.
|
String |
getConnectorId()
Deprecated.
|
ErrorHandler |
getErrorHandler()
Deprecated.
Gets the error handler for the connector.
|
Collection<Extension> |
getExtensions()
Deprecated.
Get a read-only collection of all extensions attached to this connector.
|
ClientConnector |
getParent()
Deprecated.
|
ServerRpcManager<?> |
getRpcManager(String interfaceName)
Deprecated.
Returns the RPC manager instance to use when receiving calls for an RPC
interface.
|
Class<? extends SharedState> |
getStateType()
Deprecated.
Returns the type of the shared state for this connector.
|
UI |
getUI()
Deprecated.
Returns the UI this connector is attached to.
|
boolean |
handleConnectorRequest(VaadinRequest request,
VaadinResponse response,
String path)
Deprecated.
Handle a request directed to this connector.
|
boolean |
isAttached()
Deprecated.
Checks if the connector is attached to a VaadinSession.
|
boolean |
isConnectorEnabled()
Deprecated.
Checks if the communicator is enabled.
|
boolean |
isEnabled()
Deprecated.
Tests if the variable owner is enabled or not.
|
void |
markAsDirty()
Deprecated.
Marks that this connector's state might have changed.
|
void |
markAsDirtyRecursive()
Deprecated.
Causes this connector and all connectors below it to be marked as dirty.
|
void |
printJSONResponse(Writer outWriter)
Deprecated.
|
void |
removeAttachListener(ClientConnector.AttachListener listener)
Deprecated.
|
void |
removeDetachListener(ClientConnector.DetachListener listener)
Deprecated.
|
void |
removeExtension(Extension extension)
Deprecated.
Remove an extension from this connector.
|
void |
requestRepaint()
Deprecated.
|
void |
requestRepaintAll()
Deprecated.
|
List<ClientMethodInvocation> |
retrievePendingRpcCalls()
Deprecated.
Returns the list of pending server to client RPC calls and clears the
list.
|
void |
setErrorHandler(ErrorHandler errorHandler)
Deprecated.
Sets the error handler for the connector.
|
public DragAndDropService(VaadinSession session)
public void changeVariables(Object source, Map<String,Object> variables)
VariableOwnerchangeVariables in interface VariableOwnersource - the Source of the variable change. This is the origin of the
event. For example in Web Adapter this is the request.variables - the Mapping from variable names to new variable values.public boolean isEnabled()
Tests if the variable owner is enabled or not. The terminal should not send any variable changes to disabled variable owners.
Implementation detail: this method is originally from the VariableOwner class, which has been removed in Vaadin 8.isEnabled in interface VariableOwnertrue if the variable owner is enabled,
false if notpublic void printJSONResponse(Writer outWriter) throws IOException
IOExceptionpublic String getConnectorId()
getConnectorId in interface Connectorpublic boolean isConnectorEnabled()
ClientConnectorisConnectorEnabled in interface ClientConnectorpublic List<ClientMethodInvocation> retrievePendingRpcCalls()
ClientConnectorretrievePendingRpcCalls in interface ClientConnectorpublic ServerRpcManager<?> getRpcManager(String interfaceName)
ClientConnectorgetRpcManager in interface ClientConnectorinterfaceName - name of the interface for which the call was madepublic Class<? extends SharedState> getStateType()
ClientConnectorgetStateType in interface ClientConnector@Deprecated public void requestRepaint()
requestRepaint in interface ClientConnectorpublic void markAsDirty()
ClientConnectorClientConnector.beforeClientResponse(boolean) followed by ClientConnector.encodeState()
for all connectors that are marked as dirty and send any updated state
info to the client.markAsDirty in interface ClientConnectorpublic ClientConnector getParent()
getParent in interface ClientConnectorgetParent in interface Connector@Deprecated public void requestRepaintAll()
requestRepaintAll in interface ClientConnectorpublic void markAsDirtyRecursive()
ClientConnectorThis should only be used in special cases, e.g when the state of a descendant depends on the state of an ancestor.
markAsDirtyRecursive in interface ClientConnectorClientConnector.markAsDirty()public void attach()
ClientConnector
The caller of this method is Connector#setParent(ClientConnector)
if the parent is itself already attached to the session. If not, the
parent will call the ClientConnector.attach() for all its children when it is
attached to the session. This method is always called before the
connector's data is sent to the client-side for the first time.
The attachment logic is implemented in AbstractClientConnector.
attach in interface ClientConnectorpublic void detach()
ClientConnector
The caller of this method is #setParent(ClientConnector) if the
parent is in the session. When the parent is detached from the session it
is its responsibility to call ClientConnector.detach() for each of its children.
detach in interface ClientConnectorpublic Collection<Extension> getExtensions()
ClientConnectorgetExtensions in interface ClientConnectorpublic void removeExtension(Extension extension)
ClientConnectorremoveExtension in interface ClientConnectorextension - the extension to remove.public UI getUI()
ClientConnectorgetUI in interface ClientConnectorpublic void beforeClientResponse(boolean initial)
ClientConnectorbeforeClientResponse in interface ClientConnectorinitial - true if the client-side connector will be created
and initialized after this method has been invoked.
false if there is already an initialized
client-side connector.public JsonObject encodeState()
ClientConnectorLegacyCommunicationManager.encodeState(ClientConnector, SharedState)
.encodeState in interface ClientConnectorpublic boolean handleConnectorRequest(VaadinRequest request, VaadinResponse response, String path) throws IOException
ClientConnectorConnectorResources.
Requests to /APP/connector/[ui id]/[connector id]/ are
routed to this method with the remaining part of the requested path
available in the path parameter.
NOTE that the session is not locked when this method is called. It is the responsibility of the connector to ensure that the session is locked while handling state or other session related data. For best performance the session should be unlocked before writing a large response to the client.
handleConnectorRequest in interface ClientConnectorrequest - the request that should be handledresponse - the response object to which the response should be writtenpath - the requested relative pathtrue if the request has been handled,
false if no response has been written.IOException - if there is a problem generating a response.public ErrorHandler getErrorHandler()
ClientConnectorgetErrorHandler in interface ClientConnectorpublic void setErrorHandler(ErrorHandler errorHandler)
ClientConnectorsetErrorHandler in interface ClientConnectorerrorHandler - The error handler for this connectorpublic Registration addAttachListener(ClientConnector.AttachListener listener)
ClientConnectoraddAttachListener in interface ClientConnector@Deprecated public void removeAttachListener(ClientConnector.AttachListener listener)
removeAttachListener in interface ClientConnectorpublic Registration addDetachListener(ClientConnector.DetachListener listener)
ClientConnectoraddDetachListener in interface ClientConnector@Deprecated public void removeDetachListener(ClientConnector.DetachListener listener)
removeDetachListener in interface ClientConnectorpublic boolean isAttached()
ClientConnectorisAttached in interface ClientConnectorCopyright © 2021 Vaadin Ltd. All rights reserved.