01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.workflow.util;
06:
07: import com.opensymphony.module.propertyset.PropertySet;
08:
09: import com.opensymphony.workflow.FunctionProvider;
10: import com.opensymphony.workflow.WorkflowContext;
11:
12: import java.util.Map;
13:
14: /**
15: * Sets the transient variable "caller" to the current user executing an action.
16: *
17: * @author <a href="mailto:plightbo@hotmail.com">Pat Lightbody</a>
18: * @version $Revision: 1.4 $
19: */
20: public class Caller implements FunctionProvider {
21: //~ Methods ////////////////////////////////////////////////////////////////
22:
23: public void execute(Map transientVars, Map args, PropertySet ps) {
24: WorkflowContext context = (WorkflowContext) transientVars
25: .get("context");
26: transientVars.put("caller", context.getCaller());
27: }
28: }
|