1 16 package org.apache.commons.chain.impl; 17 18 19 import org.apache.commons.chain.Chain; 20 import org.apache.commons.chain.Command; 21 import org.apache.commons.chain.Context; 22 23 24 33 34 public class AddingCommand extends NonDelegatingCommand { 35 36 37 39 40 public AddingCommand() { 41 this("", null); 42 } 43 44 public AddingCommand(String id, Chain parent) { 46 super(id); 47 this.parent = parent; 48 } 49 50 51 private Chain parent = null; 53 54 55 57 58 public boolean execute(Context context, Chain chain) throws Exception { 60 61 super.execute(context); 62 parent.addCommand(new NonDelegatingCommand("NEW")); return (true); 64 65 } 66 67 68 } 69 | Popular Tags |