01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: FriendMetaData.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package tutorial.friends.backend;
09:
10: import com.uwyn.rife.site.ConstrainedProperty;
11: import com.uwyn.rife.site.MetaData;
12:
13: public class FriendMetaData extends MetaData {
14: public void activateMetaData() {
15: addConstraint(new ConstrainedProperty("firstname")
16: .notNull(true).notEmpty(true).maxLength(50));
17: addConstraint(new ConstrainedProperty("lastname").notNull(true)
18: .notEmpty(true).maxLength(50));
19: addConstraint(new ConstrainedProperty("description")
20: .notNull(true));
21: addConstraint(new ConstrainedProperty("url").notNull(true)
22: .notEmpty(true).maxLength(255).url(true));
23: }
24: }
|