Commits

Anonymous committed 32abfae

Just adding some docs for the ParameterFilterInterceptor

CVS: Submitted by: Gabe
CVS: If this code has been contributed to the project by someone else; i.e.,
CVS: they sent us a patch or a set of diffs, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@835e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork/interceptor/ParameterFilterInterceptor.java

 
 /**
  * @author Gabe
+ * 
+ * <!-- START SNIPPET: description -->
  *
- *         Filters parameters
+ * <p>The Parameter Filter Interceptor blocks parameters from getting
+ * to the rest of the stack or your action. You can use multiple 
+ * parameter filter interceptors for a given action, so, for example,
+ * you could use one in your default stack that filtered parameters
+ * you wanted blocked from every action and those you wanted blocked 
+ * from an individual action you could add an additional interceptor
+ * for each action.</p>
+ * 
+ * <!-- END SNIPPET: description -->
+ * 
+ * <!-- START SNIPPET: parameters -->
+ *
+ * <ul>
+ *
+ * <li>allowed - a comma delimited list of parameter prefixes
+ *  that are allowed to pass to the action</li>
+ * <li>blocked - a comma delimited list of parameter prefixes 
+ * that are not allowed to pass to the action</li>
+ * <li>defaultBlock - boolean (default to false) whether by
+ * default a given parameter is blocked. If true, then a parameter
+ * must have a prefix in the allowed list in order to be able 
+ * to pass to the action
+ * </ul>
+ * 
+ * <p>The way parameters are filtered for the least configuration is that
+ * if a string is in the allowed or blocked lists, then any parameter
+ * that is a member of the object represented by the parameter is allowed
+ * or blocked respectively.</p>
+ * 
+ * <p>For example, if the parameters are:
+ * <ul>
+ * <li>blocked: person,person.address.createDate,personDao</li>
+ * <li>allowed: person.address</li>
+ * <li>defaultBlock: false</li>
+ * </ul>
+ * <br>
+ * The parameters person.name, person.phoneNum etc would be blocked 
+ * because 'person' is in the blocked list. However, person.address.street
+ * and person.address.city would be allowed because person.address is
+ * in the allowed list (the longer string determines permissions).</p> 
+ * 
+ *
+ * <!-- END SNIPPET: parameters -->
  */
 public class ParameterFilterInterceptor implements Interceptor {
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.