KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > taskmgmt > exe > TaskFormParameter


1 package org.jbpm.taskmgmt.exe;
2
3 import java.io.Serializable JavaDoc;
4
5 import org.jbpm.context.def.VariableAccess;
6
7 public class TaskFormParameter implements Serializable JavaDoc {
8
9   private static final long serialVersionUID = 1L;
10
11   protected String JavaDoc label = null;
12   protected String JavaDoc description = null;
13   protected Object JavaDoc value = null;
14   protected boolean isReadable = true;
15   protected boolean isWritable = true;
16   protected boolean isRequired = true;
17   
18   public TaskFormParameter() {
19   }
20   
21   public TaskFormParameter(VariableAccess variableAccess, Object JavaDoc value) {
22     this.label = variableAccess.getMappedName();
23     this.value = value;
24     this.isReadable = variableAccess.isReadable();
25     this.isWritable = variableAccess.isWritable();
26     this.isRequired = variableAccess.isRequired();
27   }
28
29   public TaskFormParameter(TaskFormParameter other) {
30     this.label = other.label;
31     this.description = other.description;
32     this.value = other.value;
33     this.isReadable = other.isReadable;
34     this.isWritable = other.isWritable;
35     this.isRequired = other.isRequired;
36   }
37
38   public String JavaDoc toString() {
39     return "("+label+","+value+")";
40   }
41   
42   public String JavaDoc getDescription() {
43     return description;
44   }
45   public void setDescription(String JavaDoc description) {
46     this.description = description;
47   }
48   public boolean isReadable() {
49     return isReadable;
50   }
51   public void setReadable(boolean isReadable) {
52     this.isReadable = isReadable;
53   }
54   public boolean isRequired() {
55     return isRequired;
56   }
57   public void setRequired(boolean isRequired) {
58     this.isRequired = isRequired;
59   }
60   public boolean isWritable() {
61     return isWritable;
62   }
63   public boolean isReadOnly() {
64      return !isWritable;
65   }
66   public void setWritable(boolean isWritable) {
67     this.isWritable = isWritable;
68   }
69   public String JavaDoc getLabel() {
70     return label;
71   }
72   public void setLabel(String JavaDoc label) {
73     this.label = label;
74   }
75   public Object JavaDoc getValue() {
76     return value;
77   }
78   public void setValue(Object JavaDoc value) {
79     this.value = value;
80   }
81 }
82
Popular Tags