home *** CD-ROM | disk | FTP | other *** search
- package sessions;
-
- import java.util.Vector;
- import javax.servlet.http.HttpServletRequest;
-
- public class DummyCart {
- // $FF: renamed from: v java.util.Vector
- Vector field_0 = new Vector();
- String submit = null;
- String item = null;
-
- private void addItem(String name) {
- this.field_0.addElement(name);
- }
-
- private void removeItem(String name) {
- this.field_0.removeElement(name);
- }
-
- public void setItem(String name) {
- this.item = name;
- }
-
- public void setSubmit(String s) {
- this.submit = s;
- }
-
- public String[] getItems() {
- String[] s = new String[this.field_0.size()];
- this.field_0.copyInto(s);
- return s;
- }
-
- public void processRequest(HttpServletRequest request) {
- if (this.submit == null) {
- this.addItem(this.item);
- }
-
- if (this.submit.equals("add")) {
- this.addItem(this.item);
- } else if (this.submit.equals("remove")) {
- this.removeItem(this.item);
- }
-
- this.reset();
- }
-
- private void reset() {
- this.submit = null;
- this.item = null;
- }
- }
-