01: /*
02: * Created on 21 May 2007
03: */
04: package uk.org.ponder.rsf.viewstate.support;
05:
06: import java.util.List;
07:
08: import uk.org.ponder.rsf.viewstate.ViewParameters;
09: import uk.org.ponder.rsf.viewstate.ViewParamsReporter;
10:
11: /** Coordinates all the DefaultViewsInferrers in the system **/
12:
13: public class DefaultViewInferrerManager implements ViewParamsReporter {
14:
15: private List inferrers;
16:
17: public void setInferrers(List inferrers) {
18: this .inferrers = inferrers;
19: }
20:
21: public ViewParameters getViewParameters() {
22: for (int i = 0; i < inferrers.size(); ++i) {
23: ViewParamsReporter reporter = (ViewParamsReporter) inferrers
24: .get(i);
25: ViewParameters params = reporter.getViewParameters();
26: if (params != null)
27: return params;
28: }
29: return null;
30: }
31:
32: }
|