01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.workflow;
06:
07: import com.opensymphony.module.propertyset.PropertySet;
08:
09: import java.rmi.Remote;
10: import java.rmi.RemoteException;
11:
12: import java.util.Map;
13:
14: /**
15: * Remote interface that must be implemented to define a java-based validator in your workflow definition.
16: *
17: * @author <a href="mailto:plightbo@hotmail.com">Patrick Lightbody</a>
18: */
19: public interface ValidatorRemote extends Remote {
20: //~ Methods ////////////////////////////////////////////////////////////////
21:
22: /**
23: * Validates the user input.
24: *
25: * @param transientVars Variables that will not be persisted. These include inputs
26: * given in the {@link Workflow#initialize} and {@link Workflow#doAction} method calls.
27: * There are two special variable names: <b>entry</b> (object type:
28: * {@link com.opensymphony.workflow.spi.WorkflowEntry}) and <b>context</b>
29: * (object type: {@link com.opensymphony.workflow.WorkflowContext}).
30: * Also, any variable set as a {@link com.opensymphony.workflow.Register}), will also be
31: * available in the transient map, no matter what. These transient variables only last through
32: * the method call that they were invoked in, such as {@link Workflow#initialize}
33: * and {@link Workflow#doAction}.
34: * @param args The properties for this function invocation. Properties are created
35: * from arg nested elements within the xml, an arg element takes in a name attribute
36: * which is the properties key, and the CDATA text contents of the element map to
37: * the property value.
38: * @param ps The persistent variables that are associated with the current
39: * instance of the workflow. Any change made to the propertyset are persisted to
40: * the propertyset implementation's persistent store.
41: * @throws InvalidInputException if the input is deemed to be invalid
42: */
43: public void validate(Map transientVars, Map args, PropertySet ps)
44: throws InvalidInputException, RemoteException;
45: }
|