001: package org.syrup.helpers;
002:
003: import org.syrup.PTask;
004:
005: /**
006: * A generic PTask Implementation.
007: *
008: * @author Robbert van Dalen
009: */
010: public class PTaskImpl implements PTask {
011: static final String COPYRIGHT = "Copyright 2005 Robbert van Dalen."
012: + "At your option, you may copy, distribute, or make derivative works under "
013: + "the terms of The Artistic License. This License may be found at "
014: + "http://www.opensource.org/licenses/artistic-license.php. "
015: + "THERE IS NO WARRANTY; USE THIS PRODUCT AT YOUR OWN RISK.";
016:
017: private final String parentKey_;
018:
019: private final String key_;
020:
021: private final boolean or_type_;
022:
023: private final String function_class_;
024:
025: private final String name_;
026:
027: private final String description_;
028:
029: private final String parameter_;
030:
031: private final String environment_;
032:
033: private final boolean done_;
034:
035: private final long creation_time_;
036:
037: private final long modification_time_;
038:
039: private final long modifications_;
040:
041: private final boolean executable_;
042:
043: private final String worker_;
044:
045: private final boolean isParent_;
046:
047: /**
048: * Constructor for the PTaskImpl object
049: *
050: * @param parentKey
051: * The parentKey attribute.
052: * @param key
053: * The key attribute.
054: * @param or_type
055: * the orType attribute.
056: * @param function_class
057: * The functionClass attribute.
058: * @param name
059: * The name attribute.
060: * @param description
061: * The description attribute.
062: * @param environment
063: * The environment attribute.
064: * @param parameter
065: * The parameter attribute
066: * @param done
067: * The done attribute.
068: * @param creation_time
069: * The creationTime attribute.
070: * @param modification_time
071: * The modificationTime attribute.
072: * @param modifications
073: * The modifications attribute.
074: * @param executable
075: * The executable attribute.
076: * @param worker
077: * The worker attribute.
078: * @param isParent
079: * The isParent attribute.
080: */
081: public PTaskImpl(String parentKey, String key, boolean or_type,
082: String function_class, String name, String description,
083: String parameter, String environment, boolean done,
084: long creation_time, long modification_time,
085: long modifications, boolean executable, String worker,
086: boolean isParent) {
087: parentKey_ = parentKey;
088: key_ = key;
089: or_type_ = or_type;
090: function_class_ = function_class;
091: name_ = name;
092: description_ = description;
093: parameter_ = parameter;
094: environment_ = environment;
095: done_ = done;
096: creation_time_ = creation_time;
097: modification_time_ = modification_time;
098: modifications_ = modifications;
099: executable_ = executable;
100: worker_ = worker;
101: isParent_ = isParent;
102: }
103:
104: /**
105: */
106: public String name() {
107: return name_;
108: }
109:
110: /**
111: */
112: public String description() {
113: return description_;
114: }
115:
116: /**
117: */
118: public String environment() {
119: return environment_;
120: }
121:
122: /**
123: */
124: public String functionClass() {
125: return function_class_;
126: }
127:
128: /**
129: */
130: public boolean orType() {
131: return or_type_;
132: }
133:
134: /** */
135: public String parameter() {
136: return parameter_;
137: }
138:
139: /**
140: */
141: public String parentKey() {
142: return parentKey_;
143: }
144:
145: /**
146: */
147: public String key() {
148: return key_;
149: }
150:
151: /**
152: */
153: public long modifications() {
154: return modifications_;
155: }
156:
157: /**
158: */
159: public long modificationTime() {
160: return modification_time_;
161: }
162:
163: /**
164: */
165: public long creationTime() {
166: return creation_time_;
167: }
168:
169: /**
170: */
171: public boolean executable() {
172: return executable_;
173: }
174:
175: /**
176: */
177: public boolean done() {
178: return done_;
179: }
180:
181: /**
182: */
183: public String worker() {
184: return worker_;
185: }
186:
187: /**
188: */
189: public boolean isParent() {
190: return isParent_;
191: }
192:
193: /**
194: */
195: public String toString() {
196: return "PTask(id=" + key_ + ", p_id=" + parentKey_
197: + ", isParent=" + isParent_ + ", executable="
198: + executable_ + ", name=" + name_ + ", environment="
199: + environment_ + ")";
200: }
201: }
|