01: /**
02: *
03: */package org.drools.scm.jcr;
04:
05: import java.util.ArrayList;
06: import java.util.Collections;
07: import java.util.Iterator;
08: import java.util.List;
09:
10: import org.drools.scm.ScmAction;
11: import org.tmatesoft.svn.core.SVNException;
12: import org.tmatesoft.svn.core.io.ISVNEditor;
13:
14: public class CompositeJcrAction implements ScmAction {
15: private List actions;
16:
17: public CompositeJcrAction() {
18: this .actions = Collections.EMPTY_LIST;
19: }
20:
21: public void addScmAction(ScmAction action) {
22: if (actions == Collections.EMPTY_LIST) {
23: this .actions = new ArrayList();
24: }
25: this .actions.add(action);
26: }
27:
28: public void applyAction(Object context) throws SVNException {
29: // ISVNEditor editor = ( ISVNEditor ) context;
30: for (Iterator it = this .actions.iterator(); it.hasNext();) {
31: ScmAction action = (ScmAction) it.next();
32: // action.applyAction( editor );
33: }
34: }
35: }
|