KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > projector > processor > form > ClearForm


1 package org.apache.slide.projector.processor.form;
2
3 import java.util.Map JavaDoc;
4
5 import org.apache.slide.projector.Context;
6 import org.apache.slide.projector.Processor;
7 import org.apache.slide.projector.Result;
8 import org.apache.slide.projector.Store;
9 import org.apache.slide.projector.descriptor.ParameterDescriptor;
10 import org.apache.slide.projector.descriptor.ResultDescriptor;
11 import org.apache.slide.projector.descriptor.StateDescriptor;
12 import org.apache.slide.projector.store.FormStore;
13
14 public class ClearForm implements Processor {
15     public Result process(Map JavaDoc parameter, Context context) throws Exception JavaDoc {
16         Store formStore = context.getStore(Store.FORM);
17         if ( formStore != null ) {
18             ((FormStore)formStore).clear();
19         }
20         return new Result(StateDescriptor.OK);
21     }
22
23     public ParameterDescriptor[] getParameterDescriptors() {
24         return ParameterDescriptor.NO_PARAMETERS;
25     }
26
27     public ResultDescriptor getResultDescriptor() {
28         return ResultDescriptor.OK;
29     }
30 }
31
Popular Tags