Example usage for com.vaadin.shared ApplicationConstants DRAG_AND_DROP_CONNECTOR_ID

List of usage examples for com.vaadin.shared ApplicationConstants DRAG_AND_DROP_CONNECTOR_ID

Introduction

In this page you can find the example usage for com.vaadin.shared ApplicationConstants DRAG_AND_DROP_CONNECTOR_ID.

Prototype

String DRAG_AND_DROP_CONNECTOR_ID

To view the source code for com.vaadin.shared ApplicationConstants DRAG_AND_DROP_CONNECTOR_ID.

Click Source Link

Usage

From source file:org.semanticsoft.vaaclipse.app.servlet.VaaclipseServerRpcHandler.java

License:Open Source License

private MethodInvocation parseInvocation(JSONArray invocationJson, MethodInvocation previousInvocation,
        ConnectorTracker connectorTracker, long lastSyncIdSeenByClient) throws JSONException {
    String connectorId = invocationJson.getString(0);
    String interfaceName = invocationJson.getString(1);
    String methodName = invocationJson.getString(2);

    if (connectorTracker.getConnector(connectorId) == null
            && !connectorId.equals(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID)) {

        if (!connectorTracker.connectorWasPresentAsRequestWasSent(connectorId, lastSyncIdSeenByClient)) {
            getLogger().log(Level.WARNING,
                    "RPC call to " + interfaceName + "." + methodName + " received for connector " + connectorId
                            + " but no such connector could be found. Resynchronizing client.");
            // This is likely an out of sync issue (client tries to update a
            // connector which is not present). Force resync.
            connectorTracker.markAllConnectorsDirty();
        }/*  w  w  w.j ava  2s.c o  m*/
        return null;
    }

    JSONArray parametersJson = invocationJson.getJSONArray(3);

    if (LegacyChangeVariablesInvocation.isLegacyVariableChange(interfaceName, methodName)) {
        if (!(previousInvocation instanceof LegacyChangeVariablesInvocation)) {
            previousInvocation = null;
        }

        return parseLegacyChangeVariablesInvocation(connectorId, interfaceName, methodName,
                (LegacyChangeVariablesInvocation) previousInvocation, parametersJson, connectorTracker);
    } else {
        return parseServerRpcInvocation(connectorId, interfaceName, methodName, parametersJson,
                connectorTracker);
    }

}