KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jicengine > operation > UnexecutableOperation


1 package org.jicengine.operation;
2
3 /**
4  *
5  * <p>
6  * Copyright (C) 2004 Timo Laitinen
7  * </p>
8  *
9  * @author Timo Laitinen
10  * @created 2004-09-20
11  * @since JICE-0.10
12  *
13  */

14
15 public class UnexecutableOperation implements Operation {
16     String JavaDoc explanation;
17
18     public UnexecutableOperation()
19     {
20         this("execution not allowed.");
21     }
22
23     public UnexecutableOperation(String JavaDoc explanation) {
24         this.explanation = explanation;
25     }
26
27
28     public boolean needsParameters() {
29         return false;
30     }
31
32     public boolean needsParameter(String JavaDoc name)
33     {
34         return false;
35     }
36
37     public Object JavaDoc execute(Context context) throws OperationException
38     {
39         throw new OperationException(this.explanation);
40     }
41 }
42
Popular Tags