KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > util > Caller


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 package com.opensymphony.workflow.util;
6
7 import com.opensymphony.module.propertyset.PropertySet;
8
9 import com.opensymphony.workflow.FunctionProvider;
10 import com.opensymphony.workflow.WorkflowContext;
11
12 import java.util.Map JavaDoc;
13
14
15 /**
16  * Sets the persistent variable "caller" to the current user executing an action.
17  *
18  * @author <a HREF="mailto:plightbo@hotmail.com">Pat Lightbody</a>
19  * @version $Revision: 1.2 $
20  */

21 public class Caller implements FunctionProvider {
22     //~ Methods ////////////////////////////////////////////////////////////////
23

24     public void execute(Map JavaDoc transientVars, Map JavaDoc args, PropertySet ps) {
25         WorkflowContext context = (WorkflowContext) transientVars.get("context");
26         transientVars.put("caller", context.getCaller());
27     }
28 }
29
Popular Tags