Update of /var/cvs/src/org/mmbase/datatypes/handlers
In directory james.mmbase.org:/tmp/cvs-serv14216

Modified Files:
        Handler.java Request.java 
Added Files:
        AbstractHandler.java AbstractRequest.java JavaRequest.java 
Log Message:
more on MMB-1560


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/datatypes/handlers
See also: http://www.mmbase.org/jira/browse/MMB-1560


AbstractHandler.java is new



AbstractRequest.java is new



JavaRequest.java is new



Index: Handler.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/handlers/Handler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- Handler.java        17 Jul 2008 16:27:16 -0000      1.2
+++ Handler.java        28 Jul 2008 16:47:31 -0000      1.3
@@ -19,7 +19,7 @@
  * post and things like that.
  *
  * @author Michiel Meeuwissen
- * @version $Id: Handler.java,v 1.2 2008/07/17 16:27:16 michiel Exp $
+ * @version $Id: Handler.java,v 1.3 2008/07/28 16:47:31 michiel Exp $
  * @since MMBase-1.9.1
  */
 
@@ -32,6 +32,21 @@
      */
     C input(Request request, Node node, Field field, boolean search);
 
+    /** 
+     * Checks the user input, and invalidates the request, if this user input 
was invalid.
+     * @param errors If <code>true</code> then report the errors, otherwise 
the return value can
+     * remain empty.
+     */
+    C check(Request request, Node node, Field field, boolean errors);
 
+    /**
+     * Sets the user's input into the field of the node
+     */
+    boolean set(Request request, Node node, Field field);
+    
+    /**
+     * Uses the user's input to create a constraint for the given query
+     */
+    Constraint search(Request request, Field field, Query query);
 
 }


Index: Request.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/handlers/Request.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- Request.java        15 Jul 2008 19:41:01 -0000      1.2
+++ Request.java        28 Jul 2008 16:47:31 -0000      1.3
@@ -17,8 +17,8 @@
  * This generalizes  one rendition of a form.
  *
  * @author Michiel Meeuwissen
- * @version $Id: Request.java,v 1.2 2008/07/15 19:41:01 michiel Exp $
- * @since MMBase-1.9.0
+ * @version $Id: Request.java,v 1.3 2008/07/28 16:47:31 michiel Exp $
+ * @since MMBase-1.9.1
  */
 
 public interface Request {
@@ -26,21 +26,28 @@
      * Encounter something that would make the current form invalid.
      */
     void invalidate();
+
+    boolean isValid();
+
     /**
      * Obtains the Cloud that can be used if no Node available yet.
      */
     Cloud getCloud();
+
+    java.util.Locale getLocale();
     /**
      *
      */
-    //String getName(Field field);
+    String getName(Field field);
+
     /**
      * Gets the user specified value for a field
      */
-    Object getValue(Node node, Field field);
+    Object getValue(Field field);
+    Object getValue(Field field, String part);
 
     /**
-     * Handler implementation can put properties on the request to do some 
adminstration.
+     * Handler implementations can put properties on the request to do some 
adminstration.
      */
     <C> C setProperty(Parameter<C> name, C value);
     <C> C getProperty(Parameter<C> name);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to