01: package org.jicengine.operation;
02:
03: /**
04: *
05: * <p>
06: * Copyright (C) 2004 Timo Laitinen
07: * </p>
08: *
09: * @author Timo Laitinen
10: * @created 2004-09-20
11: * @since JICE-0.10
12: *
13: */
14:
15: public class UnexecutableOperation implements Operation {
16: String explanation;
17:
18: public UnexecutableOperation() {
19: this ("execution not allowed.");
20: }
21:
22: public UnexecutableOperation(String explanation) {
23: this .explanation = explanation;
24: }
25:
26: public boolean needsParameters() {
27: return false;
28: }
29:
30: public boolean needsParameter(String name) {
31: return false;
32: }
33:
34: public Object execute(Context context) throws OperationException {
35: throw new OperationException(this.explanation);
36: }
37: }
|