|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.server.DragAndDropService
public class DragAndDropService
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 | |
---|---|
DragAndDropService(VaadinSession session)
|
Method Summary | |
---|---|
void |
addAttachListener(ClientConnector.AttachListener listener)
|
void |
addDetachListener(ClientConnector.DetachListener listener)
|
void |
attach()
Notifies the connector that it is connected to a VaadinSession (and therefore also to a UI). |
void |
beforeClientResponse(boolean initial)
Called before the shared state and RPC invocations are sent to the client. |
void |
changeVariables(java.lang.Object source,
java.util.Map<java.lang.String,java.lang.Object> variables)
Called when one or more variables handled by the implementing class are changed. |
void |
detach()
Notifies the connector that it is detached from its VaadinSession. |
elemental.json.JsonObject |
encodeState()
Called by the framework to encode the state to a JSONObject. |
java.lang.String |
getConnectorId()
|
ErrorHandler |
getErrorHandler()
Gets the error handler for the connector. |
java.util.Collection<Extension> |
getExtensions()
Get a read-only collection of all extensions attached to this connector. |
ClientConnector |
getParent()
|
ServerRpcManager<?> |
getRpcManager(java.lang.String interfaceName)
Returns the RPC manager instance to use when receiving calls for an RPC interface. |
java.lang.Class<? extends com.vaadin.shared.communication.SharedState> |
getStateType()
Returns the type of the shared state for this connector |
UI |
getUI()
Returns the UI this connector is attached to |
boolean |
handleConnectorRequest(VaadinRequest request,
VaadinResponse response,
java.lang.String path)
Handle a request directed to this connector. |
boolean |
isAttached()
Checks if the connector is attached to a VaadinSession. |
boolean |
isConnectorEnabled()
Checks if the communicator is enabled. |
boolean |
isEnabled()
Tests if the variable owner is enabled or not. |
boolean |
isImmediate()
Tests if the variable owner is in immediate mode or not. |
void |
markAsDirty()
Marks that this connector's state might have changed. |
void |
markAsDirtyRecursive()
Causes this connector and all connectors below it to be marked as dirty. |
void |
printJSONResponse(java.io.Writer outWriter)
|
void |
removeAttachListener(ClientConnector.AttachListener listener)
|
void |
removeDetachListener(ClientConnector.DetachListener listener)
|
void |
removeExtension(Extension extension)
Remove an extension from this connector. |
void |
requestRepaint()
Deprecated. |
void |
requestRepaintAll()
Deprecated. |
java.util.List<ClientMethodInvocation> |
retrievePendingRpcCalls()
Returns the list of pending server to client RPC calls and clears the list. |
void |
setErrorHandler(ErrorHandler errorHandler)
Sets the error handler for the connector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DragAndDropService(VaadinSession session)
Method Detail |
---|
public void changeVariables(java.lang.Object source, java.util.Map<java.lang.String,java.lang.Object> variables)
VariableOwner
changeVariables
in interface VariableOwner
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.public boolean isEnabled()
VariableOwner
Tests if the variable owner is enabled or not. The terminal should not send any variable changes to disabled variable owners.
isEnabled
in interface VariableOwner
true
if the variable owner is enabled,
false
if notpublic boolean isImmediate()
VariableOwner
Tests if the variable owner is in immediate mode or not. Being in immediate mode means that all variable changes are required to be sent back from the terminal immediately when they occur.
Note: VariableOwner
does not include a set-
method for the immediateness property. This is because not all
VariableOwners wish to offer the functionality. Such VariableOwners are
never in the immediate mode, thus they always return false
in VariableOwner.isImmediate()
.
isImmediate
in interface VariableOwner
true
if the component is in immediate mode,
false
if not.public void printJSONResponse(java.io.Writer outWriter) throws java.io.IOException
java.io.IOException
public java.lang.String getConnectorId()
getConnectorId
in interface com.vaadin.shared.Connector
public boolean isConnectorEnabled()
ClientConnector
isConnectorEnabled
in interface ClientConnector
public java.util.List<ClientMethodInvocation> retrievePendingRpcCalls()
ClientConnector
retrievePendingRpcCalls
in interface ClientConnector
public ServerRpcManager<?> getRpcManager(java.lang.String interfaceName)
ClientConnector
getRpcManager
in interface ClientConnector
interfaceName
- name of the interface for which the call was made
public java.lang.Class<? extends com.vaadin.shared.communication.SharedState> getStateType()
ClientConnector
getStateType
in interface ClientConnector
@Deprecated public void requestRepaint()
requestRepaint
in interface ClientConnector
public void markAsDirty()
ClientConnector
ClientConnector.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 ClientConnector
public ClientConnector getParent()
getParent
in interface ClientConnector
getParent
in interface com.vaadin.shared.Connector
@Deprecated public void requestRepaintAll()
requestRepaintAll
in interface ClientConnector
public void markAsDirtyRecursive()
ClientConnector
This 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 ClientConnector
ClientConnector.markAsDirty()
public void attach()
ClientConnector
The caller of this method is #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 ClientConnector
public 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 ClientConnector
public java.util.Collection<Extension> getExtensions()
ClientConnector
getExtensions
in interface ClientConnector
public void removeExtension(Extension extension)
ClientConnector
removeExtension
in interface ClientConnector
extension
- the extension to remove.public UI getUI()
ClientConnector
getUI
in interface ClientConnector
public void beforeClientResponse(boolean initial)
ClientConnector
This method must not alter the component hierarchy in any way. Calling
ClientConnector.markAsDirty()
from this method will have no effect.
beforeClientResponse
in interface ClientConnector
initial
- 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 elemental.json.JsonObject encodeState()
ClientConnector
LegacyCommunicationManager.encodeState(ClientConnector, SharedState)
.
encodeState
in interface ClientConnector
public boolean handleConnectorRequest(VaadinRequest request, VaadinResponse response, java.lang.String path) throws java.io.IOException
ClientConnector
ConnectorResource
s.
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 ClientConnector
request
- the request that should be handledresponse
- the response object to which the response should be writtenpath
- the requested relative path
true
if the request has been handled,
false
if no response has been written.
java.io.IOException
- if there is a problem generating a response.public ErrorHandler getErrorHandler()
ClientConnector
getErrorHandler
in interface ClientConnector
public void setErrorHandler(ErrorHandler errorHandler)
ClientConnector
setErrorHandler
in interface ClientConnector
errorHandler
- The error handler for this connectorpublic void addAttachListener(ClientConnector.AttachListener listener)
addAttachListener
in interface ClientConnector
public void removeAttachListener(ClientConnector.AttachListener listener)
removeAttachListener
in interface ClientConnector
public void addDetachListener(ClientConnector.DetachListener listener)
addDetachListener
in interface ClientConnector
public void removeDetachListener(ClientConnector.DetachListener listener)
removeDetachListener
in interface ClientConnector
public boolean isAttached()
ClientConnector
isAttached
in interface ClientConnector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |