00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef TASK_H
00025 #define TASK_H
00026
00027 #include "TaskDataInfo.h"
00028 #include "TaskFilterInfo.h"
00029
00030 #include <string>
00031 #include <vector>
00032 #include <map>
00033
00034 using namespace std;
00035
00046 class Task
00047 {
00048 private:
00052 bool mModel;
00053
00054
00055
00056
00057
00061 string mTaskId;
00065 string mPriority;
00069 string mTaskName;
00073 string mCreationDate;
00077 string mExpiration;
00081 string mUserName;
00085 string mUserMail;
00089 string mBinSourcePath;
00093 string mBinCommand;
00097 string mResultLocalDir;
00101 string mResultStoragePath;
00105 vector <TaskDataInfo*> mDataInfoVect;
00109 map <string, TaskFilterInfo*> mFilterInfoMap;
00113
00114
00115 public:
00116
00117
00121 static const std::string kFILTER_CPU_LOAD;
00125 static const std::string kFILTER_CPU_TYPE;
00129 static const std::string kFILTER_SYSTEM_TYPE;
00133 static const std::string kFILTER_ESTIMATED_DURATION;
00137 static const std::string kFILTER_DISK_SPACE;
00141 static const std::string kFILTER_MEM_FREE;
00145 static const std::string kFILTER_TARGET_HOST;
00146
00150 static const std::string kTASK_STATE;
00151
00152
00153
00158 Task();
00163 ~Task();
00164
00165
00170 void initialize();
00176 bool getModel();
00177
00178
00179
00180
00181
00182
00188 string getTaskId();
00194 string getPriority();
00200 string getTaskName();
00206 string getCreationDate();
00212 string getExpiration();
00218 string getUserName();
00224 string getUserMail();
00230 string getBinSourcePath();
00236 string getBinCommand();
00242 string getResultLocalDir();
00248 string getResultStoragePath();
00249
00250
00251
00252 void addFilterInfo( TaskFilterInfo* aFilterInfo);
00253 void addFilterInfo(string aFilterType, string aComparaisonOperator,string aFilterValue);
00254 string getFilterValue(string aFilterType);
00255 string getFilterOperator(string aFilterType);
00256 TaskFilterInfo* getFilterInfo(string aFilterType);
00257 vector<string> Task::getFilterInfoSet();
00258
00259
00264 int getNbDataInfo();
00270 TaskDataInfo* getDataInfo(int index);
00275 void addDataInfo( TaskDataInfo* aData);
00276 void addDataInfo( bool aShared, string aSourcePath, string aLocalDir );
00277
00278
00279
00280
00281 void setModel(bool model);
00282
00283 void setTaskId(string taskId);
00284 void setPriority(string priority);
00285 void setTaskName(string taskName);
00286 void setCreationDate(string creationDate);
00287 void setExpiration(string expiration);
00288 void setUserName(string userName);
00289 void setUserMail(string userMail);
00290 void setBinSourcePath(string binSourcePath);
00291 void setBinCommand(string binCommand) ;
00292 void setResultLocalDir(string resultLocalDir);
00293 void setResultStoragePath(string resultStoragePath);
00294
00295 string toString();
00296
00297
00298 };
00299
00300
00301 #endif
00302
00303
00304
00305
00306