01: /*
02:
03: This software is OSI Certified Open Source Software.
04: OSI Certified is a certification mark of the Open Source Initiative.
05:
06: The license (Mozilla version 1.0) can be read at the MMBase site.
07: See http://www.MMBase.org/license
08:
09: */
10: package org.mmbase.datatypes.processors;
11:
12: import org.mmbase.bridge.*;
13:
14: /**
15: * This processor can be used as a 'commit' processor on a string field. The field will then be set
16: * to the current user id when the node is committed.
17: *
18: * @author Michiel Meeuwissen
19: * @version $Id: LastModifier.java,v 1.4 2006/02/14 22:46:41 michiel Exp $
20: * @since MMBase-1.8
21: * @see LastModified
22: * @see Creator
23: */
24:
25: public class LastModifier implements CommitProcessor {
26:
27: private static final long serialVersionUID = 1L;
28:
29: public void commit(Node node, Field field) {
30: node.setValueWithoutProcess(field.getName(), node.getCloud()
31: .getUser().getIdentifier());
32: }
33:
34: public String toString() {
35: return "lastmodifier";
36: }
37: }
|