Class ServerSideCriterion
- java.lang.Object
-
- com.vaadin.event.dd.acceptcriteria.ServerSideCriterion
-
- All Implemented Interfaces:
AcceptCriterion,Serializable
public abstract class ServerSideCriterion extends Object implements AcceptCriterion
Parent class for criteria which are verified on the server side during a drag operation to accept/discard dragged content (presented byTransferable).Subclasses should implement the
AcceptCriterion.accept(com.vaadin.event.dd.DragAndDropEvent)method.As all server side state can be used to make a decision, this is more flexible than
ClientSideCriterion. However, this does require additional requests from the browser to the server during a drag operation.- Since:
- 6.3
- See Also:
AcceptCriterion,ClientSideCriterion, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ServerSideCriterion()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetIdentifier()booleanisClientSideVerifiable()Returns whether the criteria can be checked on the client or whether a server request is needed to check the criteria.voidpaint(PaintTarget target)voidpaintContent(PaintTarget target)voidpaintResponse(PaintTarget target)This needs to be implemented if and only if a criterion does some lazy server side initialization.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.event.dd.acceptcriteria.AcceptCriterion
accept
-
-
-
-
Method Detail
-
isClientSideVerifiable
public final boolean isClientSideVerifiable()
Description copied from interface:AcceptCriterionReturns whether the criteria can be checked on the client or whether a server request is needed to check the criteria. This requirement may depend on the state of the criterion (e.g. logical operations between criteria), so this cannot be based on a marker interface.- Specified by:
isClientSideVerifiablein interfaceAcceptCriterion
-
paint
public void paint(PaintTarget target) throws PaintException
- Specified by:
paintin interfaceAcceptCriterion- Throws:
PaintException
-
paintContent
public void paintContent(PaintTarget target)
-
paintResponse
public void paintResponse(PaintTarget target) throws PaintException
Description copied from interface:AcceptCriterionThis needs to be implemented if and only if a criterion does some lazy server side initialization. The UIDL painted in this method will be passed to client side drop handler implementation. Implementation can assume thatAcceptCriterion.accept(DragAndDropEvent)is called before this method.- Specified by:
paintResponsein interfaceAcceptCriterion- Throws:
PaintException
-
getIdentifier
protected String getIdentifier()
-
-