Class DragAndDropService
- java.lang.Object
-
- com.vaadin.server.DragAndDropService
-
- All Implemented Interfaces:
ClientConnector,VariableOwner,Connector,Serializable
@Deprecated public class DragAndDropService extends Object implements VariableOwner, ClientConnector
Deprecated.Since 8.1, no direct replacement, seeDragSourceExtensionandDropTargetExtension.- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
-
Constructor Summary
Constructors Constructor Description DragAndDropService(VaadinSession session)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description RegistrationaddAttachListener(ClientConnector.AttachListener listener)Deprecated.Add a listener for connector attach events.RegistrationaddDetachListener(ClientConnector.DetachListener listener)Deprecated.Add a listener for connector detach events.voidattach()Deprecated.Notifies the connector that it is connected to a VaadinSession (and therefore also to a UI).voidbeforeClientResponse(boolean initial)Deprecated.Called before the shared state and RPC invocations are sent to the client.voidchangeVariables(Object source, Map<String,Object> variables)Deprecated.Called when one or more variables handled by the implementing class are changed.voiddetach()Deprecated.Notifies the connector that it is detached from its VaadinSession.elemental.json.JsonObjectencodeState()Deprecated.Called by the framework to encode the state to a JSONObject.StringgetConnectorId()Deprecated.ErrorHandlergetErrorHandler()Deprecated.Gets the error handler for the connector.Collection<Extension>getExtensions()Deprecated.Get a read-only collection of all extensions attached to this connector.ClientConnectorgetParent()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.UIgetUI()Deprecated.Returns the UI this connector is attached to.booleanhandleConnectorRequest(VaadinRequest request, VaadinResponse response, String path)Deprecated.Handle a request directed to this connector.booleanisAttached()Deprecated.Checks if the connector is attached to a VaadinSession.booleanisConnectorEnabled()Deprecated.Checks if the communicator is enabled.booleanisEnabled()Deprecated.Tests if the variable owner is enabled or not.voidmarkAsDirty()Deprecated.Marks that this connector's state might have changed.voidmarkAsDirtyRecursive()Deprecated.Causes this connector and all connectors below it to be marked as dirty.voidprintJSONResponse(Writer outWriter)Deprecated.voidremoveAttachListener(ClientConnector.AttachListener listener)Deprecated.voidremoveDetachListener(ClientConnector.DetachListener listener)Deprecated.voidremoveExtension(Extension extension)Deprecated.Remove an extension from this connector.voidrequestRepaint()Deprecated.voidrequestRepaintAll()Deprecated.List<ClientMethodInvocation>retrievePendingRpcCalls()Deprecated.Returns the list of pending server to client RPC calls and clears the list.voidsetErrorHandler(ErrorHandler errorHandler)Deprecated.Sets the error handler for the connector.
-
-
-
Constructor Detail
-
DragAndDropService
public DragAndDropService(VaadinSession session)
Deprecated.
-
-
Method Detail
-
changeVariables
public void changeVariables(Object source, Map<String,Object> variables)
Deprecated.Description copied from interface:VariableOwnerCalled when one or more variables handled by the implementing class are changed.- Specified by:
changeVariablesin interfaceVariableOwner- Parameters:
source- 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.
-
isEnabled
public boolean isEnabled()
Deprecated.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.- Specified by:
isEnabledin interfaceVariableOwner- Returns:
trueif the variable owner is enabled,falseif not
-
printJSONResponse
public void printJSONResponse(Writer outWriter) throws IOException
Deprecated.- Throws:
IOException
-
getConnectorId
public String getConnectorId()
Deprecated.- Specified by:
getConnectorIdin interfaceConnector
-
isConnectorEnabled
public boolean isConnectorEnabled()
Deprecated.Description copied from interface:ClientConnectorChecks if the communicator is enabled. An enabled communicator is allowed to receive messages from its counter-part.- Specified by:
isConnectorEnabledin interfaceClientConnector- Returns:
- true if the connector can receive messages, false otherwise
-
retrievePendingRpcCalls
public List<ClientMethodInvocation> retrievePendingRpcCalls()
Deprecated.Description copied from interface:ClientConnectorReturns the list of pending server to client RPC calls and clears the list.- Specified by:
retrievePendingRpcCallsin interfaceClientConnector- Returns:
- an unmodifiable ordered list of pending server to client method calls (not null)
-
getRpcManager
public ServerRpcManager<?> getRpcManager(String interfaceName)
Deprecated.Description copied from interface:ClientConnectorReturns the RPC manager instance to use when receiving calls for an RPC interface.- Specified by:
getRpcManagerin interfaceClientConnector- Parameters:
interfaceName- name of the interface for which the call was made- Returns:
- ServerRpcManager or null if none found for the interface
-
getStateType
public Class<? extends SharedState> getStateType()
Deprecated.Description copied from interface:ClientConnectorReturns the type of the shared state for this connector.- Specified by:
getStateTypein interfaceClientConnector- Returns:
- The type of the state. Must never return null.
-
requestRepaint
@Deprecated public void requestRepaint()
Deprecated.- Specified by:
requestRepaintin interfaceClientConnector
-
markAsDirty
public void markAsDirty()
Deprecated.Description copied from interface:ClientConnectorMarks that this connector's state might have changed. When the framework is about to send new data to the client-side, it will runClientConnector.beforeClientResponse(boolean)followed byClientConnector.encodeState()for all connectors that are marked as dirty and send any updated state info to the client.- Specified by:
markAsDirtyin interfaceClientConnector
-
getParent
public ClientConnector getParent()
Deprecated.- Specified by:
getParentin interfaceClientConnector- Specified by:
getParentin interfaceConnector
-
requestRepaintAll
@Deprecated public void requestRepaintAll()
Deprecated.- Specified by:
requestRepaintAllin interfaceClientConnector
-
markAsDirtyRecursive
public void markAsDirtyRecursive()
Deprecated.Description copied from interface:ClientConnectorCauses this connector and all connectors below it to be marked as dirty.This should only be used in special cases, e.g when the state of a descendant depends on the state of an ancestor.
- Specified by:
markAsDirtyRecursivein interfaceClientConnector- See Also:
ClientConnector.markAsDirty()
-
attach
public void attach()
Deprecated.Description copied from interface:ClientConnectorNotifies the connector that it is connected to a VaadinSession (and therefore also to a UI).The caller of this method is
Component.setParent(HasComponents)if the parent is itself already attached to the session. If not, the parent will call theClientConnector.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.- Specified by:
attachin interfaceClientConnector
-
detach
public void detach()
Deprecated.Description copied from interface:ClientConnectorNotifies the connector that it is detached from its VaadinSession.The caller of this method is
Component.setParent(HasComponents)if the parent is in the session. When the parent is detached from the session it is its responsibility to callClientConnector.detach()for each of its children.- Specified by:
detachin interfaceClientConnector
-
getExtensions
public Collection<Extension> getExtensions()
Deprecated.Description copied from interface:ClientConnectorGet a read-only collection of all extensions attached to this connector.- Specified by:
getExtensionsin interfaceClientConnector- Returns:
- a collection of extensions
-
removeExtension
public void removeExtension(Extension extension)
Deprecated.Description copied from interface:ClientConnectorRemove an extension from this connector.- Specified by:
removeExtensionin interfaceClientConnector- Parameters:
extension- the extension to remove.
-
getUI
public UI getUI()
Deprecated.Description copied from interface:ClientConnectorReturns the UI this connector is attached to.- Specified by:
getUIin interfaceClientConnector- Returns:
- The UI this connector is attached to or null if it is not attached to any UI
-
beforeClientResponse
public void beforeClientResponse(boolean initial)
Deprecated.Description copied from interface:ClientConnectorCalled before the shared state and RPC invocations are sent to the client. Gives the connector an opportunity to set computed/dynamic state values or to invoke last minute RPC methods depending on other component features.- Specified by:
beforeClientResponsein interfaceClientConnector- Parameters:
initial-trueif the client-side connector will be created and initialized after this method has been invoked.falseif there is already an initialized client-side connector.
-
encodeState
public elemental.json.JsonObject encodeState()
Deprecated.Description copied from interface:ClientConnectorCalled by the framework to encode the state to a JSONObject. This is typically done by calling the static methodLegacyCommunicationManager.encodeState(ClientConnector, SharedState).- Specified by:
encodeStatein interfaceClientConnector- Returns:
- a JSON object with the encoded connector state
-
handleConnectorRequest
public boolean handleConnectorRequest(VaadinRequest request, VaadinResponse response, String path) throws IOException
Deprecated.Description copied from interface:ClientConnectorHandle a request directed to this connector. This can be used by connectors to dynamically generate a response and it is also used internally when servingConnectorResources.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.
- Specified by:
handleConnectorRequestin interfaceClientConnector- Parameters:
request- the request that should be handledresponse- the response object to which the response should be writtenpath- the requested relative path- Returns:
trueif the request has been handled,falseif no response has been written.- Throws:
IOException- if there is a problem generating a response.
-
getErrorHandler
public ErrorHandler getErrorHandler()
Deprecated.Description copied from interface:ClientConnectorGets the error handler for the connector. The error handler is dispatched whenever there is an error processing the data coming from the client to this connector.- Specified by:
getErrorHandlerin interfaceClientConnector- Returns:
- The error handler or null if not set
-
setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)
Deprecated.Description copied from interface:ClientConnectorSets the error handler for the connector. The error handler is dispatched whenever there is an error processing the data coming from the client for this connector.- Specified by:
setErrorHandlerin interfaceClientConnector- Parameters:
errorHandler- The error handler for this connector
-
addAttachListener
public Registration addAttachListener(ClientConnector.AttachListener listener)
Deprecated.Description copied from interface:ClientConnectorAdd a listener for connector attach events.- Specified by:
addAttachListenerin interfaceClientConnector- Parameters:
listener- an AttachListener implementation- Returns:
- Registration for unregistering the listener
-
removeAttachListener
@Deprecated public void removeAttachListener(ClientConnector.AttachListener listener)
Deprecated.- Specified by:
removeAttachListenerin interfaceClientConnector
-
addDetachListener
public Registration addDetachListener(ClientConnector.DetachListener listener)
Deprecated.Description copied from interface:ClientConnectorAdd a listener for connector detach events.- Specified by:
addDetachListenerin interfaceClientConnector- Parameters:
listener- an AttachListener implementation- Returns:
- Registration for unregistering the listener
-
removeDetachListener
@Deprecated public void removeDetachListener(ClientConnector.DetachListener listener)
Deprecated.- Specified by:
removeDetachListenerin interfaceClientConnector
-
isAttached
public boolean isAttached()
Deprecated.Description copied from interface:ClientConnectorChecks if the connector is attached to a VaadinSession.- Specified by:
isAttachedin interfaceClientConnector- Returns:
- true if the connector is attached to a session, false otherwise
-
-