org.mmbase.datatypes.handlers
Interface Handler<C>

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractHandler, AreaHandler, BinaryHandler, CaptchaDataType.Handler, EnumHandler, HtmlHandler, IntegerHandler, StringHandler, TextHandler

public interface Handler<C>
extends Serializable

Handlers can be associated to DataTypes, but different Handlers can be associated with different content types. The most important implementation will of course be one that produces HTML, like forms, and post and things like that.

Since:
MMBase-1.9.1
Version:
$Id: Handler.java 39191 2009-10-17 21:42:51Z michiel $
Author:
Michiel Meeuwissen
See Also:
org.mmbase.datatypes.handlers

Method Summary
 C check(Request request, Node node, Field field, boolean errors)
          Checks the user input, and invalidates the request, if this user input was invalid.
 String id(Request request, Field field)
          Generates a unique id for the field in the request
 C input(Request request, Node node, Field field, boolean search)
          Produces an form input field for the given Node, and Field.
 Constraint search(Request request, Field field, Query query)
          Uses the user's input to create a constraint for the given query
 boolean set(Request request, Node node, Field field)
          Sets the user's input into the field of the node
 

Method Detail

id

String id(Request request,
          Field field)
Generates a unique id for the field in the request

Since:
MMBase-1.9.2

input

C input(Request request,
        Node node,
        Field field,
        boolean search)
Produces an form input field for the given Node, and Field.

Parameters:
search - if true, then a search field is produced.

check

C check(Request request,
        Node node,
        Field field,
        boolean errors)
Checks the user input, and invalidates the request, if this user input was invalid.

Parameters:
errors - If true then report the errors, otherwise the return value can remain empty.

set

boolean set(Request request,
            Node node,
            Field field)
Sets the user's input into the field of the node


search

Constraint search(Request request,
                  Field field,
                  Query query)
Uses the user's input to create a constraint for the given query



MMBase 2.0-SNAPSHOT - null