PageRenderTime 13ms CodeModel.GetById 2ms app.highlight 31ms RepoModel.GetById 1ms app.codeStats 1ms

/src/main/java/com/sogou/qadev/service/cynthia/service/DataAccessSession.java

https://github.com/desktopqa/Cynthia
Java | 1793 lines | 219 code | 193 blank | 1381 comment | 0 complexity | de465793957ffb828a57a109ea7dc536 MD5 | raw file
   1package com.sogou.qadev.service.cynthia.service;
   2
   3import java.sql.Timestamp;
   4import java.util.List;
   5import java.util.Map;
   6
   7import com.sogou.qadev.service.cynthia.bean.Action;
   8import com.sogou.qadev.service.cynthia.bean.Attachment;
   9import com.sogou.qadev.service.cynthia.bean.Data;
  10import com.sogou.qadev.service.cynthia.bean.DataAccessAction;
  11import com.sogou.qadev.service.cynthia.bean.Field;
  12import com.sogou.qadev.service.cynthia.bean.Filter;
  13import com.sogou.qadev.service.cynthia.bean.Flow;
  14import com.sogou.qadev.service.cynthia.bean.GuideBean;
  15import com.sogou.qadev.service.cynthia.bean.JSTree;
  16import com.sogou.qadev.service.cynthia.bean.Option;
  17import com.sogou.qadev.service.cynthia.bean.Pair;
  18import com.sogou.qadev.service.cynthia.bean.QueryCondition;
  19import com.sogou.qadev.service.cynthia.bean.Role;
  20import com.sogou.qadev.service.cynthia.bean.Script;
  21import com.sogou.qadev.service.cynthia.bean.Stat;
  22import com.sogou.qadev.service.cynthia.bean.TagBean;
  23import com.sogou.qadev.service.cynthia.bean.Template;
  24import com.sogou.qadev.service.cynthia.bean.TemplateOperateLog;
  25import com.sogou.qadev.service.cynthia.bean.TemplateType;
  26import com.sogou.qadev.service.cynthia.bean.Timer;
  27import com.sogou.qadev.service.cynthia.bean.TimerAction;
  28import com.sogou.qadev.service.cynthia.bean.UUID;
  29import com.sogou.qadev.service.cynthia.bean.UserInfo;
  30
  31/**
  32 * @description:data process interface
  33 * @author:liming
  34 * @mail:liming@sogou-inc.com
  35 * @date:2014-5-6 上午10:13:32
  36 * @version:v1.0
  37 */
  38public interface DataAccessSession
  39{
  40	/**
  41	 * @description:update cache
  42	 * @date:2014-5-6 上午10:12:00
  43	 * @version:v1.0
  44	 * @param daa: delete update 
  45	 * @param key:cache data key
  46	 * @param object:cache data 
  47	 */
  48	public void updateCache(DataAccessAction daa, String key ,Object object);
  49	
  50	/**
  51	 * @description:return data filter interface
  52	 * @date:2014-5-6 上午10:13:26
  53	 * @version:v1.0
  54	 * @return
  55	 */
  56	public DataFilter getDataFilter();
  57
  58	/**
  59	 * @description:return current user
  60	 * @date:2014-5-6 上午10:14:11
  61	 * @version:v1.0
  62	 * @return
  63	 */
  64	public String getUsername();
  65
  66	/**
  67	 * @description:TODO
  68	 * @date:2014-5-6 上午10:14:29
  69	 * @version:v1.0
  70	 * @return
  71	 */
  72	public long getKeyId();
  73
  74	/**
  75	 * @description:TODO
  76	 * @date:2014-5-6 上午10:14:35
  77	 * @version:v1.0
  78	 * @return
  79	 */
  80	public String getAgent();
  81	
  82	/**
  83	 * @description:remove flow from database
  84	 * @date:2014-5-6 上午10:14:40
  85	 * @version:v1.0
  86	 * @param flowId
  87	 * @return
  88	 */
  89	public ErrorCode removeFlow(UUID flowId);
  90
  91	/**
  92	 * @description:begin transcation
  93	 * @date:2014-5-6 上午10:15:29
  94	 * @version:v1.0
  95	 * @return
  96	 */
  97	public ErrorCode beginTranscation();
  98
  99	/**
 100	 * @description:transcation rollback
 101	 * @date:2014-5-6 上午10:15:48
 102	 * @version:v1.0
 103	 * @return
 104	 */
 105	public ErrorCode rollbackTranscation();
 106
 107	/**
 108	 * @description:commit transcation
 109	 * @date:2014-5-6 上午10:16:01
 110	 * @version:v1.0
 111	 * @return
 112	 */
 113	public ErrorCode commitTranscation();
 114
 115	/**
 116	 * @description:query data by data id
 117	 * @date:2014-5-6 上午10:16:11
 118	 * @version:v1.0
 119	 * @param id:data id
 120	 * @return
 121	 */
 122	public Data queryData(UUID id); 
 123	
 124	/**
 125	 * @description:query data from data id and template id
 126	 * @date:2014-5-6 上午10:16:24
 127	 * @version:v1.0
 128	 * @param id
 129	 * @param templateId
 130	 * @return
 131	 */
 132	public Data queryData(UUID id , UUID templateId);   
 133	
 134	/**
 135	 * @description:query data from sql
 136	 * @date:2014-5-6 上午10:16:47
 137	 * @version:v1.0
 138	 * @param sql
 139	 * @param needLog:need data log
 140	 * @param templateId
 141	 * @return
 142	 */
 143	public List<Data> queryDataBySql(String sql , boolean needLog, UUID templateId);
 144
 145	/**
 146	 * @description:add data, get data uuid
 147	 * @date:2014-5-6 上午10:17:13
 148	 * @version:v1.0
 149	 * @param templateId
 150	 * @return
 151	 */
 152	public Data addData(UUID templateId);
 153	
 154	/**
 155	 * @description:copy data
 156	 * @date:2014-5-6 上午10:18:00
 157	 * @version:v1.0
 158	 * @param dataId
 159	 * @param templateId
 160	 * @param actionId
 161	 * @param actionUser
 162	 * @param actionComment
 163	 * @param baseValueMap
 164	 * @param extValueMap
 165	 * @return
 166	 */
 167	public Data copyData(UUID dataId, UUID templateId, UUID actionId, String actionUser, String actionComment,
 168			Map<String, Pair<Object, Object>> baseValueMap, Map<UUID, Pair<Object, Object>> extValueMap); 
 169
 170	/**
 171	 * @description:remove template from database
 172	 * @date:2014-5-6 上午10:18:23
 173	 * @version:v1.0
 174	 * @param templateId
 175	 * @return
 176	 */
 177	public ErrorCode removeTemplate(Template templateId);
 178
 179	/**
 180	 * @description:query template from cache or database
 181	 * @date:2014-5-6 上午10:18:35
 182	 * @version:v1.0
 183	 * @param templateId
 184	 * @return
 185	 */
 186	public Template queryTemplate(UUID templateId); 
 187	
 188	/**
 189	 * @description:query all templates by templatetype
 190	 * @date:2014-5-6 上午10:19:15
 191	 * @version:v1.0
 192	 * @param templateTypeId
 193	 * @return
 194	 */
 195	public List<Template> queryTemplates(UUID templateTypeId); 
 196
 197	/**
 198	 * @description:query field from templates by fieldId
 199	 * @date:2014-5-6 上午10:19:34
 200	 * @version:v1.0
 201	 * @param fieldId
 202	 * @return
 203	 */
 204	public Field queryField(UUID fieldId); 
 205	
 206	/**
 207	 * @description:query field from template
 208	 * @date:2014-5-6 上午10:20:02
 209	 * @version:v1.0
 210	 * @param fieldId
 211	 * @param templateId
 212	 * @return
 213	 */
 214	public Field queryField(UUID fieldId , UUID templateId); 
 215
 216	/**
 217	 * @description:query option from template by template id
 218	 * @date:2014-5-6 上午10:20:25
 219	 * @version:v1.0
 220	 * @param optionId
 221	 * @param templateId
 222	 * @return
 223	 */
 224	public Option queryOption(UUID optionId ,UUID templateId);
 225	
 226	/**
 227	 * @description:query option from template
 228	 * @date:2014-5-6 上午10:21:04
 229	 * @version:v1.0
 230	 * @param optionId
 231	 * @param template
 232	 * @return
 233	 */
 234	public Option queryOption(UUID optionId, Template template); 
 235	
 236	/**
 237	 * @description:query datas by template id and other query conditions
 238	 * @date:2014-5-6 上午10:21:18
 239	 * @version:v1.0
 240	 * @param templateId
 241	 * @param queryConditions
 242	 * @param needLog
 243	 * @return
 244	 */
 245	public Data[] queryDatas(UUID templateId, List<QueryCondition> queryConditions,boolean needLog);
 246
 247	/**
 248	 * @description:query template type by templatetype id
 249	 * @date:2014-5-6 上午10:22:05
 250	 * @version:v1.0
 251	 * @param templateTypeId
 252	 * @return
 253	 */
 254	public TemplateType queryTemplateType(UUID templateTypeId); 
 255
 256	/**
 257	 * @description:create attachment from name and atta data
 258	 * @date:2014-5-6 上午10:22:20
 259	 * @version:v1.0
 260	 * @param name
 261	 * @param data
 262	 * @return
 263	 */
 264	public Attachment createAttachment(String name, byte[] data); 
 265
 266	/**
 267	 * @description:query attachement by id 
 268	 * @date:2014-5-6 上午10:22:46
 269	 * @version:v1.0
 270	 * @param id
 271	 * @param needData:if attachment data need
 272	 * @return
 273	 */
 274	public Attachment queryAttachment(UUID id, boolean needData);
 275
 276	/**
 277	 * @description: query attachments by ids
 278	 * @date:2014-5-6 上午10:23:24
 279	 * @version:v1.0
 280	 * @param ids
 281	 * @param needData:if attachment data need
 282	 * @return
 283	 */
 284	public Attachment[] queryAttachments(UUID[] ids, boolean needData); 
 285
 286	/**
 287	 * @description:modify data
 288	 * @date:2014-5-6 上午10:24:11
 289	 * @version:v1.0
 290	 * @param data
 291	 * @return
 292	 */
 293	public Pair<ErrorCode, String> modifyData(Data data);  
 294
 295	/**
 296	 * @description:remove data
 297	 * @date:2014-5-6 上午10:24:22
 298	 * @version:v1.0
 299	 * @param data
 300	 * @return
 301	 */
 302	public ErrorCode removeData(Data data); 
 303
 304	/**
 305	 * @description:set all Template Data valid true or false
 306	 * @date:2014-8-7 下午5:04:27
 307	 * @version:v1.0
 308	 * @param templateId
 309	 * @param isValid
 310	 */
 311	public boolean setValidDataOfTemplate(UUID templateId , boolean isValid);
 312	
 313	/**
 314	 * @description:remove data from cache
 315	 * @date:2014-5-6 上午10:24:31
 316	 * @version:v1.0
 317	 * @param data
 318	 * @return
 319	 */
 320	public ErrorCode removeDataFromCache(Data data);   
 321
 322	/**
 323	 * @description:close and commit transcation
 324	 * @date:2014-5-6 上午10:25:20
 325	 * @version:v1.0
 326	 */
 327	public void close();  
 328
 329	/**
 330	 * @description:return is transcation is commit automatic
 331	 * @date:2014-5-6 上午10:25:40
 332	 * @version:v1.0
 333	 * @return
 334	 */
 335	public boolean isAutoCommit();   
 336
 337	/**
 338	 * @description:set transcation if commit automatic 
 339	 * @date:2014-5-6 上午10:26:40
 340	 * @version:v1.0
 341	 * @param b:true auto ,  false not
 342	 */
 343	public void setAutoCommit(boolean b);   
 344
 345	/**
 346	 * @description:return script process interface
 347	 * @date:2014-5-6 上午10:27:26
 348	 * @version:v1.0
 349	 * @return
 350	 */
 351	public ScriptAccessSession createScriptAccessSession(); 
 352
 353	/**
 354	 * @description:create flow
 355	 * @date:2014-5-6 上午10:28:37
 356	 * @version:v1.0
 357	 * @param userName:create user name
 358	 * @return
 359	 */
 360	public Flow createFlow(String userName); 
 361
 362	/**
 363	 * @description:create template
 364	 * @date:2014-5-6 上午10:29:37
 365	 * @version:v1.0
 366	 * @param templateTypeId:template type
 367	 * @return
 368	 */
 369	public Template createTemplate(UUID templateTypeId); 
 370
 371	/**
 372	 * @description:update template
 373	 * @date:2014-5-6 上午10:31:08
 374	 * @version:v1.0
 375	 * @param template
 376	 * @return
 377	 */
 378	public ErrorCode updateTemplate(Template template);   
 379
 380	/**
 381	 * @description:query flow by flow id
 382	 * @date:2014-5-6 上午10:31:49
 383	 * @version:v1.0
 384	 * @param flowId
 385	 * @return
 386	 */
 387	public Flow queryFlow(UUID flowId);  
 388	
 389	/**
 390	 * @description:update flow svgcode
 391	 * @date:2014-5-6 上午10:32:01
 392	 * @version:v1.0
 393	 * @param flowId
 394	 * @param svgCode
 395	 * @return
 396	 */
 397	public boolean updateSvg(UUID flowId,String svgCode);
 398	
 399	/**
 400	 * @description:query flow svgcode
 401	 * @date:2014-5-6 上午10:32:16
 402	 * @version:v1.0
 403	 * @param flowId
 404	 * @return
 405	 */
 406	public String queryFlowSvg(UUID flowId); 
 407
 408	/**
 409	 * @description:query stat from flow
 410	 * @date:2014-5-6 上午10:32:26
 411	 * @version:v1.0
 412	 * @param statId
 413	 * @param flowId
 414	 * @return
 415	 */
 416	public Stat queryStat(UUID statId , UUID flowId); 
 417
 418	/**
 419	 * @description:query action from flow
 420	 * @date:2014-5-6 上午10:32:36
 421	 * @version:v1.0
 422	 * @param actionId
 423	 * @param flowId
 424	 * @return
 425	 */
 426	public Action queryAction(UUID actionId , UUID flowId); 
 427	
 428	/**
 429	 * @description:query role from flow
 430	 * @date:2014-5-6 上午10:32:45
 431	 * @version:v1.0
 432	 * @param roleId
 433	 * @param flowId
 434	 * @return
 435	 */
 436	public Role queryRole(UUID roleId , UUID flowId); 
 437
 438	/**
 439	 * @description:query flows by from ids
 440	 * @date:2014-5-6 上午10:32:56
 441	 * @version:v1.0
 442	 * @param flowIdArray
 443	 * @return
 444	 */
 445	public Flow[] queryFlows(UUID[] flowIdArray); 
 446
 447	/**
 448	 * @description:query templates by template ids
 449	 * @date:2014-5-6 上午10:33:09
 450	 * @version:v1.0
 451	 * @param templateIdArray
 452	 * @return
 453	 */
 454	public Template[] queryTemplates(UUID[] templateIdArray); 
 455
 456	/**
 457	 * @description:query templatetypes by templatetype ids
 458	 * @date:2014-5-6 上午10:33:23
 459	 * @version:v1.0
 460	 * @param templateTypeIdArray
 461	 * @return
 462	 */
 463	public TemplateType[] queryTemplateTypes(UUID[] templateTypeIdArray);
 464
 465	/**
 466	 * @description:update flow
 467	 * @date:2014-5-6 上午10:33:37
 468	 * @version:v1.0
 469	 * @param flow
 470	 * @return
 471	 */
 472	public ErrorCode updateFlow(Flow flow);  
 473
 474	/**
 475	 * @description:query all flows
 476	 * @date:2014-5-6 上午10:33:54
 477	 * @version:v1.0
 478	 * @return
 479	 */
 480	public Flow[] queryAllFlows();  
 481
 482	/**
 483	 * @Title: queryAllFlows
 484	 * @Description: query user all flows
 485	 * @param userMail
 486	 * @return
 487	 * @return: Flow[]
 488	 */
 489	public Flow[] queryAllFlows(String userMail);  
 490	/**
 491	 * @description:query all templates
 492	 * @date:2014-5-6 上午10:34:27
 493	 * @version:v1.0
 494	 * @return
 495	 */
 496	public Template[] queryAllTemplates(); 
 497 
 498	/**
 499	 * @description:query all templatetypes
 500	 * @date:2014-5-6 上午10:34:47
 501	 * @version:v1.0
 502	 * @return
 503	 */
 504	public TemplateType[] queryAllTemplateTypes(); 
 505
 506	/**
 507	 * @description:add filter to database
 508	 * @date:2014-5-6 上午10:35:05
 509	 * @version:v1.0
 510	 * @param filter
 511	 * @return
 512	 */
 513	public Filter addFilter(Filter filter); 
 514
 515	/**
 516	 * @description:query filter by filter id
 517	 * @date:2014-5-6 上午10:35:18
 518	 * @version:v1.0
 519	 * @param filterId
 520	 * @return
 521	 */
 522	public Filter queryFilter(UUID filterId); 
 523
 524	/**
 525	 * @description:query all filters of user
 526	 * @date:2014-5-6 上午10:37:27
 527	 * @version:v1.0
 528	 * @param username
 529	 * @return
 530	 */
 531	public Filter[] queryFilters(String username); 
 532
 533	/**
 534	 * @description:query filter id and name of user
 535	 * @date:2014-5-6 上午10:37:53
 536	 * @version:v1.0
 537	 * @param userName
 538	 * @return
 539	 */
 540	public Map<String,String> queryFilterIdNameMap(String userName);
 541	
 542	/**
 543	 * @description:query system filters
 544	 * @date:2014-5-6 上午10:38:15
 545	 * @version:v1.0
 546	 * @param username
 547	 * @return
 548	 */
 549	public Filter[] querySysFilters(String username);  
 550
 551	/**
 552	 * @description:query all focus filter of user
 553	 * @date:2014-5-6 上午10:39:04
 554	 * @version:v1.0
 555	 * @param username
 556	 * @return
 557	 */
 558	public Filter[] queryFocusFilters(String username); 
 559
 560	/**
 561	 * @description:query all filters
 562	 * @date:2014-5-6 上午10:39:33
 563	 * @version:v1.0
 564	 * @return
 565	 */
 566	public List<Filter> queryAllFilters();  
 567
 568	/**
 569	 * @description:remove filter by filter id
 570	 * @date:2014-5-6 上午10:39:42
 571	 * @version:v1.0
 572	 * @param filterId
 573	 * @return
 574	 */
 575	public ErrorCode removeFilter(UUID filterId);  
 576
 577	/**
 578	 * 	@description:update filter 
 579	 * @date:2014-5-6 上午10:39:56
 580	 * @version:v1.0
 581	 * @param filter
 582	 * @return
 583	 */
 584	public ErrorCode updateFilter(Filter filter); 
 585
 586	/**
 587	 * @description:create filter 
 588	 * @date:2014-5-6 上午10:40:11
 589	 * @version:v1.0
 590	 * @param createUser
 591	 * @param createTime
 592	 * @param fatherId:father folder id
 593	 * @return
 594	 */
 595	public Filter createFilter(String createUser, Timestamp createTime, UUID fatherId); 
 596
 597	/**
 598	 * @description:create tmp filter
 599	 * @date:2014-5-6 上午10:40:59
 600	 * @version:v1.0
 601	 * @param createUser
 602	 * @param createTime
 603	 * @param fatherId
 604	 * @return
 605	 */
 606	public Filter createTempFilter(String createUser, Timestamp createTime, UUID fatherId); 
 607
 608	/**
 609	 * @description:get filters new and old datas
 610	 * @date:2014-5-6 上午10:42:15
 611	 * @version:v1.0
 612	 * @param filterIdArray
 613	 * @param username
 614	 * @return:xml
 615	 */
 616	public String getNewTaskIdsByFilterAndUser(UUID[] filterIdArray, String username); 
 617
 618	/**
 619	 * @description:set data old of filter
 620	 * @date:2014-5-6 上午10:43:12
 621	 * @version:v1.0
 622	 * @param filterId
 623	 * @param taskIdArray
 624	 * @param username
 625	 * @return
 626	 */
 627	public String cleanNewTagByTaskIds(UUID filterId, UUID[] taskIdArray, String username);  
 628
 629	/**
 630	 * @description:remove old data
 631	 * @date:2014-5-6 上午10:45:38
 632	 * @version:v1.0
 633	 * @param dataId
 634	 */
 635	public void deleteFilterUserTasks(UUID dataId);
 636	
 637	/**
 638	 * @description:query filters focused by user
 639	 * @date:2014-5-6 上午10:45:58
 640	 * @version:v1.0
 641	 * @param username
 642	 * @return
 643	 */
 644	public UUID[] queryUserFocusFilters(String username);   
 645
 646	/**
 647	 * @description:remove user focus filter
 648	 * @date:2014-5-6 上午10:46:15
 649	 * @version:v1.0
 650	 * @param username
 651	 * @param filterId
 652	 * @return
 653	 */
 654	public ErrorCode removeUserFocusFilter(String username, UUID filterId);  
 655
 656	/**
 657	 * @description:remove all focus filter
 658	 * @date:2014-8-5 下午8:01:47
 659	 * @version:v1.0
 660	 * @param filterId
 661	 * @return
 662	 */
 663	public ErrorCode removeUserFocusFilter(UUID filterId);  
 664	/**
 665	 * @description:add user focus filter
 666	 * @date:2014-5-6 上午10:46:29
 667	 * @version:v1.0
 668	 * @param username
 669	 * @param filterId
 670	 * @return
 671	 */
 672	public ErrorCode addUserFocusFilter(String username, UUID filterId);  
 673
 674	/**
 675	 * @description:remove user by username
 676	 * @date:2014-5-6 上午10:46:43
 677	 * @version:v1.0
 678	 * @param username
 679	 * @return
 680	 */
 681	public ErrorCode removeRelatedUser(String username); 
 682
 683	/**
 684	 * @description:create timer return uuid
 685	 * @date:2014-5-6 上午10:48:01
 686	 * @version:v1.0
 687	 * @param createUser
 688	 * @return
 689	 */
 690	public Timer createTimer(String createUser);  
 691
 692	/**
 693	 * @description:add timer to database
 694	 * @date:2014-5-6 上午10:48:13
 695	 * @version:v1.0
 696	 * @param timer
 697	 * @return
 698	 */
 699	public ErrorCode addTimer(Timer timer); 
 700
 701	/**
 702	 * @description:remove timer from database
 703	 * @date:2014-5-6 上午10:49:06
 704	 * @version:v1.0
 705	 * @param timerId
 706	 * @return
 707	 */
 708	public ErrorCode removeTimer(UUID timerId); 
 709
 710	/**
 711	 * @description:modify timer
 712	 * @date:2014-5-6 上午10:49:17
 713	 * @version:v1.0
 714	 * @param timer
 715	 * @return
 716	 */
 717	public ErrorCode modifyTimer(Timer timer); 
 718
 719	/**
 720	 * @description:query timer from timer id
 721	 * @date:2014-5-6 上午10:49:32
 722	 * @version:v1.0
 723	 * @param timerId
 724	 * @return
 725	 */
 726	public Timer queryTimer(UUID timerId); 
 727
 728	/**
 729	 * @description:query timers by user
 730	 * @date:2014-5-6 上午10:49:46
 731	 * @version:v1.0
 732	 * @param username
 733	 * @return
 734	 */
 735	public Timer[] queryTimers(String username); 
 736
 737	/**
 738	 * @description:query all timers
 739	 * @date:2014-5-6 上午10:49:57
 740	 * @version:v1.0
 741	 * @return
 742	 */
 743	public Timer[] queryTimers(); 
 744	
 745	/**
 746	 * @description:query timer by timer action id
 747	 * @date:2014-5-6 上午10:50:08
 748	 * @version:v1.0
 749	 * @param timerActionId
 750	 * @return
 751	 */
 752	public Timer[] queryTimersByActionId(UUID timerActionId);
 753
 754	/**
 755	 * @description:create timer action
 756	 * @date:2014-5-6 上午10:50:22
 757	 * @version:v1.0
 758	 * @return
 759	 */
 760	public TimerAction createTimerAction();  
 761
 762	/**
 763	 * @description:add timer action to database
 764	 * @date:2014-5-6 上午10:50:33
 765	 * @version:v1.0
 766	 * @param timerAction
 767	 * @return
 768	 */
 769	public ErrorCode addTimerAction(TimerAction timerAction); 
 770
 771	/**
 772	 * @description:remove timer action from database
 773	 * @date:2014-5-6 上午10:50:46
 774	 * @version:v1.0
 775	 * @param timerActionId
 776	 * @return
 777	 */
 778	public ErrorCode removeTimerAction(UUID timerActionId); 
 779
 780	/**
 781	 * @description:modify timer action from database
 782	 * @date:2014-5-6 上午10:51:01
 783	 * @version:v1.0
 784	 * @param timerAction
 785	 * @return
 786	 */
 787	public ErrorCode modifyTimerAction(TimerAction timerAction); 
 788
 789	/**
 790	 * @description:query timer action from timer action id
 791	 * @date:2014-5-6 上午10:51:16
 792	 * @version:v1.0
 793	 * @param timerActionId
 794	 * @return
 795	 */
 796	public TimerAction queryTimerAction(UUID timerActionId); 
 797
 798	/**
 799	 * @description:query all timer actions
 800	 * @date:2014-5-6 上午10:51:30
 801	 * @version:v1.0
 802	 * @return
 803	 */
 804	public TimerAction[] queryTimerActions(); 
 805
 806	/**
 807	 * @description:query data create users by templatetype id
 808	 * @date:2014-5-6 上午10:52:36
 809	 * @version:v1.0
 810	 * @param templateTypeId
 811	 * @return
 812	 */
 813	public String[] queryTemplateTypeCreateUsers(UUID templateTypeId); 
 814
 815	/**
 816	 * @description:query all assign users by templatetype id
 817	 * @date:2014-5-6 上午10:52:54
 818	 * @version:v1.0
 819	 * @param templateTypeId
 820	 * @return
 821	 */
 822	public String[] queryTemplateTypeAssignUsers(UUID templateTypeId); 
 823
 824	/**
 825	 * @description:query all statu names by template type id
 826	 * @date:2014-5-6 上午10:53:12
 827	 * @version:v1.0
 828	 * @param templateTypeId
 829	 * @return
 830	 */
 831	public String[] queryTemplateTypeStats(UUID templateTypeId);  
 832	
 833	/**
 834	 * @description:query all datas by template id(need datalog)
 835	 * @date:2014-5-6 上午10:54:08
 836	 * @version:v1.0
 837	 * @param templateId
 838	 * @return
 839	 */
 840	public Data[] queryTemplateDatas(UUID templateId);  
 841	
 842	/**
 843	 * @description:query all datas by template id
 844	 * @date:2014-5-6 上午10:54:22
 845	 * @version:v1.0
 846	 * @param templateId
 847	 * @param needLog:if need data log
 848	 * @return
 849	 */
 850	public Data[] queryTemplateDatas(UUID templateId , boolean needLog);  
 851	
 852	/**
 853	 * @description:query datas by template id and create time 
 854	 * @date:2014-5-6 上午10:55:16
 855	 * @version:v1.0
 856	 * @param templateId
 857	 * @param needLog
 858	 * @param startTime:createTime start
 859	 * @param endTime:createTime end
 860	 * @return
 861	 */
 862	public Data[] queryTemplateDatas(UUID templateId , boolean needLog , Timestamp startTime , Timestamp endTime);  
 863	
 864	/**
 865	 * @description:query datas by template id
 866	 * @date:2014-5-6 上午10:56:07
 867	 * @version:v1.0
 868	 * @param templateId
 869	 * @param needLog
 870	 * @param startTime
 871	 * @param endTime
 872	 * @param allQueryList:other query conditions
 873	 * @return
 874	 */
 875	public Data[] queryTemplateDatas(UUID templateId , boolean needLog , Timestamp startTime, Timestamp endTime , List<QueryCondition> allQueryList);
 876
 877	/**
 878	 * @description:query datas of template by lastmodifytime
 879	 * @date:2014-5-6 上午10:56:35
 880	 * @version:v1.0
 881	 * @param templateId
 882	 * @param needLog
 883	 * @param startTime:last modify time start
 884	 * @param endTime:last modify time end
 885	 * @return
 886	 */
 887	public Data[] queryTemplateDatasByLastModifyTime(UUID templateId , boolean needLog , Timestamp startTime , Timestamp endTime);  
 888	
 889	/**
 890	 * @description:query all createusers by template id
 891	 * @date:2014-5-6 上午10:57:08
 892	 * @version:v1.0
 893	 * @param templateId
 894	 * @return
 895	 */
 896	public String[] queryTemplateCreateUsers(UUID templateId); 
 897
 898	/**
 899	 * @description:query all assign users by template id
 900	 * @date:2014-5-6 上午10:57:32
 901	 * @version:v1.0
 902	 * @param templateId
 903	 * @return
 904	 */
 905	public String[] queryTemplateAssignUsers(UUID templateId);  
 906
 907	/**
 908	 * @description:query all stats by template id
 909	 * @date:2014-5-6 上午10:57:44
 910	 * @version:v1.0
 911	 * @param templateId
 912	 * @return
 913	 */
 914	public Stat[] queryTemplateStats(UUID templateId);  
 915
 916	/**
 917	 * @description:query all reference datas by template id and reference field id
 918	 * @date:2014-5-6 上午11:00:38
 919	 * @version:v1.0
 920	 * @param templateId
 921	 * @param fieldId
 922	 * @return
 923	 */
 924	public Data[] queryTemplateFieldReferences(UUID templateId, UUID fieldId); 
 925
 926	/**
 927	 * @description:query all attachments by template and field id
 928	 * @date:2014-5-6 上午11:01:13
 929	 * @version:v1.0
 930	 * @param templateId
 931	 * @param fieldId
 932	 * @return
 933	 */
 934	public Attachment[] queryTemplateFieldAttachments(UUID templateId, UUID fieldId); 
 935
 936	/**
 937	 * @description:check user privilege of data
 938	 * @date:2014-5-6 上午11:02:23
 939	 * @version:v1.0
 940	 * @param data
 941	 * @param action
 942	 * @return
 943	 */
 944	public boolean checkUserPrivilege(Data data, DataAccessAction action);
 945			
 946	/**
 947	 * @description:check user privilege
 948	 * @date:2014-5-6 上午11:02:48
 949	 * @version:v1.0
 950	 * @param data
 951	 * @param action
 952	 * @param template
 953	 * @param flow
 954	 * @return
 955	 */
 956	public boolean checkUserPrivilege(Data data, DataAccessAction action ,Template template , Flow flow); 
 957
 958	/**
 959	 * @description:check if data exist
 960	 * @date:2014-5-6 上午11:03:20
 961	 * @version:v1.0
 962	 * @param dataId
 963	 * @return
 964	 */
 965	public boolean isDataExist(UUID dataId); 
 966
 967	/**
 968	 * @description:query all focus user of filter
 969	 * @date:2014-5-6 上午11:04:21
 970	 * @version:v1.0
 971	 * @param filterId
 972	 * @return
 973	 */
 974	public List<String> queryFocusUsersByFilter(UUID filterId); 
 975
 976	/**
 977	 * @description:query all children nodes by node id and user
 978	 * @date:2014-5-6 上午11:04:39
 979	 * @version:v1.0
 980	 * @param id
 981	 * @param userName
 982	 * @return
 983	 */
 984	public List<JSTree> queryChilderNodes(int nodeId ,String userName); 
 985
 986	/**
 987	 * @description:query JStree node by nodeId
 988	 * @date:2014-5-6 上午11:05:45
 989	 * @version:v1.0
 990	 * @param nodeId
 991	 * @return
 992	 */
 993	public JSTree queryJSTreeNodeById(int nodeId); 
 994
 995	/**
 996	 * @description:add jstree node
 997	 * @date:2014-5-6 上午11:06:00
 998	 * @version:v1.0
 999	 * @param parentId
1000	 * @param position
1001	 * @param title
1002	 * @param userName
1003	 * @return
1004	 */
1005	public int addJSTreeNode(int parentId,int position,String title,String userName); 
1006
1007	/**
1008	 * @description:remove jstree node
1009	 * @date:2014-5-6 上午11:06:12
1010	 * @version:v1.0
1011	 * @param id
1012	 * @param userName
1013	 * @return
1014	 */
1015	public boolean removJSTreeNode(int id,String userName); 
1016 
1017	/**
1018	 * @description:update jstree node title 
1019	 * @date:2014-5-6 上午11:06:24
1020	 * @version:v1.0
1021	 * @param id
1022	 * @param title
1023	 * @return
1024	 */
1025	public boolean updateJSTreeNode(int id,String title); 
1026
1027	/**
1028	 * @description:move jstree node
1029	 * @date:2014-5-6 上午11:06:37
1030	 * @version:v1.0
1031	 * @param id
1032	 * @param refId
1033	 * @param position
1034	 * @param title
1035	 * @param copy
1036	 * @param userName
1037	 * @return
1038	 */
1039	public boolean moveJSTreeNode(int id,int refId,int position,String title, boolean copy,String userName); 
1040
1041	/**
1042	 * @description:move filter position in jstree
1043	 * @date:2014-5-6 上午11:06:58
1044	 * @version:v1.0
1045	 * @param filterId
1046	 * @param refId
1047	 * @param parentId
1048	 * @return
1049	 */
1050	public boolean moveFilterNode(int filterId,int refId,int parentId);  
1051
1052	/**
1053	 * @description:query all filters from jstree
1054	 * @date:2014-5-6 上午11:07:22
1055	 * @version:v1.0
1056	 * @param userName
1057	 * @return
1058	 */
1059	public List<String> queryAllFolderFilters(String userName); 
1060
1061	/**
1062	 * @description:query timers by filter id
1063	 * @date:2014-5-6 上午11:08:07
1064	 * @version:v1.0
1065	 * @param filterId
1066	 * @return
1067	 */
1068	public Timer[] queryTimerByFilterId(UUID filterId); 
1069
1070	/**
1071	 * @description:query filters by folder node if
1072	 * @date:2014-5-6 上午11:08:42
1073	 * @version:v1.0
1074	 * @param nodeId
1075	 * @return
1076	 */
1077	public List<String> queryFolderFilters(int nodeId); 
1078
1079	/**
1080	 * @description:query all root node of jstree
1081	 * @date:2014-5-6 上午11:09:03
1082	 * @version:v1.0
1083	 * @param id
1084	 * @return
1085	 */
1086	public List<JSTree> queryRootNode(int id); 
1087
1088	/**
1089	 * @description:remove filter from jstree
1090	 * @date:2014-5-6 上午11:09:22
1091	 * @version:v1.0
1092	 * @param filterId
1093	 * @param parentId
1094	 * @return
1095	 */
1096	public boolean removeFilterId(int filterId,int parentId); 
1097
1098	/**
1099	 * @description:query all favorite filters by user
1100	 * @date:2014-5-6 上午11:10:15
1101	 * @version:v1.0
1102	 * @param userName
1103	 * @return
1104	 */
1105	public String[] queryFavoriteFilters(String userName); 
1106
1107	/**
1108	 * @description:add favorite filter of user
1109	 * @date:2014-5-6 上午11:10:40
1110	 * @version:v1.0
1111	 * @param userName
1112	 * @param filterId
1113	 * @return
1114	 */
1115	public boolean addFavoriteFilter(String userName,String filterId); 
1116
1117	/**
1118	 * @description:remove favorite filter of user
1119	 * @date:2014-5-6 上午11:11:02
1120	 * @version:v1.0
1121	 * @param userName
1122	 * @param filterId
1123	 * @return
1124	 */
1125	public boolean removeFavoriteFilter(String userName,String filterId); 
1126
1127	/**
1128	 * @description:update all favorite filters of user
1129	 * @date:2014-5-6 上午11:12:52
1130	 * @version:v1.0
1131	 * @param filterarrays
1132	 * @param userName
1133	 * @return
1134	 */
1135	public boolean updataFavoriteFilters(String filterarrays,String userName); 
1136
1137	/**
1138	 * @description:query user home filter
1139	 * @date:2014-5-6 上午11:13:11
1140	 * @version:v1.0
1141	 * @param userName
1142	 * @return
1143	 */
1144	public String queryHomeFilter(String userName); 
1145
1146	/**
1147	 * @description:add home filter 
1148	 * @date:2014-5-6 上午11:13:21
1149	 * @version:v1.0
1150	 * @param userName
1151	 * @param filterId
1152	 * @return
1153	 */
1154	public boolean addHomeFilter(String userName,String filterId); 
1155 
1156	/**
1157	 * @description:update home filter
1158	 * @date:2014-5-6 上午11:13:32
1159	 * @version:v1.0
1160	 * @param userName
1161	 * @param filterId
1162	 * @return
1163	 */
1164	public boolean updateHomeFilter(String userName,String filterId); 
1165
1166	/**
1167	 * @description:update favoriter filter position
1168	 * @date:2014-5-6 上午11:13:47
1169	 * @version:v1.0
1170	 * @param filterId
1171	 * @param position
1172	 * @param userName
1173	 * @return
1174	 */
1175	public boolean updateFavoritesFilters(String filterId,int position,String userName); 
1176
1177	/**
1178	 * @description:add filter to jstree node
1179	 * @date:2014-5-6 上午11:15:16
1180	 * @version:v1.0
1181	 * @param fitlerId
1182	 * @param nodeId
1183	 * @return
1184	 */
1185	public boolean addFilterToFolder(String fitlerId,int nodeId); 
1186
1187	/**
1188	 * @description:query all scripts of user
1189	 * @date:2014-5-6 上午11:21:03
1190	 * @version:v1.0
1191	 * @param userName
1192	 * @param keyId
1193	 * @return
1194	 */
1195	public List<Script> queryAllScripts(String userName,long keyId); 
1196
1197	/**
1198	 * @description:update filter orders of node
1199	 * @date:2014-5-6 上午11:21:34
1200	 * @version:v1.0
1201	 * @param folderId
1202	 * @param userName
1203	 * @param newOrders
1204	 * @return
1205	 */
1206	public boolean updateFilterOrders(int folderId,String userName,String newOrders); 
1207
1208	/**
1209	 * @description:update default filters
1210	 * @date:2014-5-6 上午11:21:52
1211	 * @version:v1.0
1212	 * @param userName
1213	 * @param filters
1214	 * @return
1215	 */
1216	public boolean updateDefaultFilters(String userName,String filters); 
1217
1218	/**
1219	 * @description:query all default filters
1220	 * @date:2014-5-6 上午11:25:51
1221	 * @version:v1.0
1222	 * @param userName
1223	 * @return
1224	 */
1225	public List<String> queryDefaultFilters(String userName); 
1226 
1227	/**
1228	 * @description:add event
1229	 * @date:2014-5-6 上午11:27:22
1230	 * @version:v1.0
1231	 * @param eventName
1232	 * @return
1233	 */
1234	public boolean addEvent(String eventName);  
1235
1236	/**
1237	 * @description:update event
1238	 * @date:2014-5-6 上午11:27:34
1239	 * @version:v1.0
1240	 * @param eventName
1241	 * @return
1242	 */
1243	public boolean updateEvent(String eventName); 
1244
1245	/**
1246	 * @description:add event user
1247	 * @date:2014-5-6 上午11:27:45
1248	 * @version:v1.0
1249	 * @param userName
1250	 * @param eventId
1251	 * @return
1252	 */
1253	public boolean addEventUser(String userName,int eventId); 
1254
1255	/**
1256	 * @description:remove event user
1257	 * @date:2014-5-6 上午11:27:56
1258	 * @version:v1.0
1259	 * @param userName
1260	 * @param eventId
1261	 * @return
1262	 */
1263	public boolean removeEventUser(String userName,int eventId); 
1264
1265	/**
1266	 * @description:query if user is valid of event
1267	 * @date:2014-5-6 上午11:28:27
1268	 * @version:v1.0
1269	 * @param userName
1270	 * @param eventId
1271	 * @return
1272	 */
1273	public boolean isValidUser(String userName,int eventId); 
1274
1275	/**
1276	 * @description:query template by template name
1277	 * @date:2014-5-6 上午11:30:47
1278	 * @version:v1.0
1279	 * @param templateName
1280	 * @return
1281	 */
1282	public Template queryTemplateByName(String templateName); 
1283
1284	/**
1285	 * @description:query all scripts
1286	 * @date:2014-5-6 上午11:31:04
1287	 * @version:v1.0
1288	 * @return
1289	 */
1290	public List<Script> queryAllScripts(); 
1291
1292	/**
1293	 * @description:add script
1294	 * @date:2014-5-6 上午11:31:13
1295	 * @version:v1.0
1296	 * @param script
1297	 * @return
1298	 */
1299	public UUID addScript(Script script); 
1300
1301	/**
1302	 * @description:update script to database
1303	 * @date:2014-5-6 上午11:31:23
1304	 * @version:v1.0
1305	 * @param script
1306	 * @return
1307	 */
1308	public ErrorCode updateScript(Script script); 
1309
1310	/**
1311	 * @description:query script by id
1312	 * @date:2014-5-6 上午11:31:35
1313	 * @version:v1.0
1314	 * @param scriptId
1315	 * @return
1316	 */
1317	public Script queryScript(UUID scriptId); 
1318	
1319	/**
1320	 * @description:query script not contain import info
1321	 * @date:2014-5-6 上午11:31:49
1322	 * @version:v1.0
1323	 * @param scriptId
1324	 * @return
1325	 */
1326	public Script queryScriptNoImport(UUID scriptId); 
1327
1328	/**
1329	 * @description:remove script
1330	 * @date:2014-5-6 上午11:32:14
1331	 * @version:v1.0
1332	 * @param scriptId
1333	 * @return
1334	 */
1335	public ErrorCode removeScript(UUID scriptId); 
1336
1337	/**
1338	 * @description:create script by user
1339	 * @date:2014-5-6 上午11:32:24
1340	 * @version:v1.0
1341	 * @param createUser
1342	 * @return
1343	 */
1344	public Script createScript(String createUser); 
1345
1346	/**
1347	 * @description:query allow template scripts
1348	 * @date:2014-5-6 上午11:35:13
1349	 * @version:v1.0
1350	 * @param templateId
1351	 * @return
1352	 */
1353	public Script[] queryAllowedTemplateScripts(UUID templateId); 
1354
1355	/**
1356	 * @description:query template scripts
1357	 * @date:2014-5-6 上午11:35:25
1358	 * @version:v1.0
1359	 * @param templateId
1360	 * @return
1361	 */
1362	public Script[] queryTemplateScripts(UUID templateId); 
1363
1364	/**
1365	 * @description:query user default template
1366	 * @date:2014-5-6 上午11:35:38
1367	 * @version:v1.0
1368	 * @param userName
1369	 * @return
1370	 */
1371	public String getUserDefaultTemplate(String userName); 
1372
1373	/**
1374	 * @description:add or update user default template
1375	 * @date:2014-5-6 上午11:35:51
1376	 * @version:v1.0
1377	 * @param userName
1378	 * @param templateId
1379	 * @return
1380	 */
1381	public boolean addOrUpdateUserDefaultTemplate(String userName,String templateId); 
1382
1383	/**
1384	 * @description:add user
1385	 * @date:2014-5-6 上午11:36:06
1386	 * @version:v1.0
1387	 * @param userInfo
1388	 * @return
1389	 */
1390	public boolean addUserInfo(UserInfo userInfo); 
1391
1392	/**
1393	 * @description:update user
1394	 * @date:2014-5-6 上午11:36:14
1395	 * @version:v1.0
1396	 * @param userInfo
1397	 * @return
1398	 */
1399	public boolean updateUserInfo(UserInfo userInfo); 
1400
1401	/**
1402	 * @description:query user by userid
1403	 * @date:2014-5-6 上午11:36:23
1404	 * @version:v1.0
1405	 * @param userId
1406	 * @return
1407	 */
1408	public UserInfo queryUserInfoById(int userId); 
1409
1410	/**
1411	 * @description:query user by userMail
1412	 * @date:2014-5-6 上午11:36:43
1413	 * @version:v1.0
1414	 * @param userMail
1415	 * @return
1416	 */
1417	public UserInfo queryUserInfoByUserName(String userMail); 
1418	
1419	/**
1420	 * @description:query userInfo by usermails
1421	 * @date:2014-8-13 下午5:23:56
1422	 * @version:v1.0
1423	 * @param userMails
1424	 * @return
1425	 */
1426	public Map<String, UserInfo> queryUserInfoByUserNames(String[] userMails); 
1427
1428	/**
1429	 * @description:remove user
1430	 * @date:2014-5-6 上午11:36:58
1431	 * @version:v1.0
1432	 * @param userInfo
1433	 * @return
1434	 */
1435	public boolean removeUserInfo(UserInfo userInfo); 
1436
1437	/**
1438	 * @description:query if user is exist
1439	 * @date:2014-5-6 上午11:37:07
1440	 * @version:v1.0
1441	 * @param userName
1442	 * @return
1443	 */
1444	public boolean isUserExisted(String userName); 
1445	
1446
1447	/*******************************tag data start****************************************/
1448	/**
1449	 * @description:return all user tag datas
1450	 * @date:2014-5-6 上午11:42:20
1451	 * @version:v1.0
1452	 * @param userName
1453	 * @return
1454	 */
1455	public Map<String,String> getUserClassifyDataMap(String userName); 
1456	
1457	/**
1458	 * @description:add tag
1459	 * @date:2014-5-6 上午11:43:07
1460	 * @version:v1.0
1461	 * @param userName
1462	 * @param tagName
1463	 * @param tagColor
1464	 * @return
1465	 */
1466	public int addTag(String userName, String tagName, String tagColor);
1467	
1468	/**
1469	 * @description:update tag
1470	 * @date:2014-5-6 上午11:43:15
1471	 * @version:v1.0
1472	 * @param tagId
1473	 * @param tagName
1474	 * @param tagColor
1475	 * @return
1476	 */
1477	public boolean updateTag(String tagId, String tagName, String tagColor);
1478	
1479	/**
1480	 * @description:delete tag
1481	 * @date:2014-5-6 上午11:43:25
1482	 * @version:v1.0
1483	 * @param tagId
1484	 * @return
1485	 */
1486	public boolean deleteTag(String tagId);
1487	
1488	/**
1489	 * @description:get all tags of user
1490	 * @date:2014-5-6 上午11:43:34
1491	 * @version:v1.0
1492	 * @param userName
1493	 * @return
1494	 */
1495	public List<TagBean> getAllTag(String userName);
1496	
1497	/**
1498	 * @description:add datas to tag
1499	 * @date:2014-5-6 上午11:43:45
1500	 * @version:v1.0
1501	 * @param toTagId
1502	 * @param dataIds
1503	 * @return
1504	 */
1505	public boolean addTagData(String toTagId, String[] dataIds);
1506	
1507	/**
1508	 * @description:delete datas from tag
1509	 * @date:2014-5-6 上午11:43:57
1510	 * @version:v1.0
1511	 * @param tagId
1512	 * @param dataIds
1513	 * @return
1514	 */
1515	public boolean deleteTagData(String tagId, String[] dataIds);
1516	
1517	/**
1518	 * @description:get all datas of tag
1519	 * @date:2014-5-6 上午11:44:07
1520	 * @version:v1.0
1521	 * @param tagId
1522	 * @return
1523	 */
1524	public String[] getTagDataById(String tagId);
1525	
1526	/**
1527	 * @description:get all tags of data
1528	 * @date:2014-5-6 上午11:44:24
1529	 * @version:v1.0
1530	 * @param userName
1531	 * @param dataId
1532	 * @return
1533	 */
1534	public List<TagBean> getDataTags(String userName,String dataId);
1535	/*****************************tag data end**********************************************/
1536	
1537	/*****************************user start************************************************/
1538	/**
1539	 * @description:query all users by user array
1540	 * @date:2014-5-6 上午11:46:10
1541	 * @version:v1.0
1542	 * @param userArray
1543	 * @return
1544	 */
1545	public List<UserInfo> queryAllUserInfo(String[] userArray);
1546	
1547	/**
1548	 * @description:query all users by user array
1549	 * @date:2014-5-6 上午11:46:31
1550	 * @version:v1.0
1551	 * @param userArray
1552	 * @param isQuit:user is quit
1553	 * @return
1554	 */
1555	public List<UserInfo> queryAllUserInfo(String[] userArray, boolean isQuit);
1556	/*****************************user end**************************************************/
1557	
1558	
1559	
1560	/**
1561	 * @description:query database colname of field
1562	 * @date:2014-5-6 上午11:46:51
1563	 * @version:v1.0
1564	 * @param fieldId
1565	 * @param templateId
1566	 * @return
1567	 */
1568	public String getDbFieldName(UUID fieldId, UUID templateId);  
1569	
1570	/**
1571	 * @description:add template operate log
1572	 * @date:2014-5-6 上午11:47:15
1573	 * @version:v1.0
1574	 * @param templateOperateLog
1575	 * @return
1576	 */
1577	public boolean addTemplateOpreateLog(TemplateOperateLog templateOperateLog);
1578	
1579	
1580	
1581	/*****************************default values start******************************************/
1582	/**
1583	 * @description:set user template default values
1584	 * @date:2014-5-6 上午11:48:11
1585	 * @version:v1.0
1586	 * @param userName
1587	 * @param templateId
1588	 * @param defaultValueJson
1589	 * @return
1590	 */
1591	public boolean setDefaultValues(String userName, String templateId, String defaultValueJson);
1592	
1593	/**
1594	 * @description:get user template default values
1595	 * @date:2014-5-6 上午11:48:22
1596	 * @version:v1.0
1597	 * @param userName
1598	 * @param templateId
1599	 * @return
1600	 */
1601	public String getDefaultValues(String userName, String templateId);
1602	/*****************************default values end********************************************/
1603	
1604	/**
1605	 * @description:return all users has back rights
1606	 * @date:2014-5-6 上午11:48:58
1607	 * @version:v1.0
1608	 * @return
1609	 */
1610	public List<UserInfo> getBackRightUsers();  //查询所有后台权限人员
1611	
1612	/**
1613	 * @description:add back right of user
1614	 * @date:2014-5-6 上午11:49:14
1615	 * @version:v1.0
1616	 * @param userMail
1617	 * @return
1618	 */
1619	public boolean addBackRightUser(String userMail);  //添加后台权限人员 
1620	  
1621	/**
1622	 * @description:remove back right of user
1623	 * @date:2014-5-6 上午11:49:28
1624	 * @version:v1.0
1625	 * @param userMail
1626	 * @return
1627	 */
1628	public boolean delBackRightUser(String userMail);  //删除后台权限人员
1629	
1630	/**
1631	 * @description:get template operate right users
1632	 * @date:2014-5-6 上午11:49:41
1633	 * @version:v1.0
1634	 * @param templateId
1635	 * @return
1636	 */
1637	public List<UserInfo> getTemplateRightUser(String templateId);
1638	
1639	/**
1640	 * @description:remove user template operate right
1641	 * @date:2014-5-6 上午11:50:11
1642	 * @version:v1.0
1643	 * @param templateId
1644	 * @param userMail
1645	 * @return
1646	 */
1647	public boolean delUserTemplateRight(String templateId, String userMail);
1648	
1649	/**
1650	 * @description:add user template operate right
1651	 * @date:2014-5-6 上午11:50:27
1652	 * @version:v1.0
1653	 * @param templateId
1654	 * @param userMail
1655	 * @return
1656	 */
1657	public boolean addUserTemplateRight(String[] templateId, String userMail);
1658	
1659	/**
1660	 * @description:query all template rights of user
1661	 * @date:2014-5-6 上午11:51:02
1662	 * @version:v1.0
1663	 * @param userMail
1664	 * @return
1665	 */
1666	public Map<String, String> queryUserTemplateRights(String userMail);
1667	
1668	
1669	/**
1670	 * @description:set system setting(json)
1671	 * @date:2014-5-6 上午11:51:20
1672	 * @version:v1.0
1673	 * @param systemJson
1674	 * @return
1675	 */
1676	public boolean setSystemOption(String systemJson);
1677	
1678	/**
1679	 * @description:get system setting(json)
1680	 * @date:2014-5-6 上午11:51:35
1681	 * @version:v1.0
1682	 * @param userMail
1683	 * @return
1684	 */
1685	public String getSystemOption(String userMail);  //系统设置
1686	
1687	/**
1688	 * @description:update data log
1689	 * @date:2014-5-6 上午11:51:53
1690	 * @version:v1.0
1691	 * @param dataId
1692	 * @param logIndex
1693	 * @param logContent
1694	 * @return
1695	 */
1696	public boolean updateDataLog(UUID dataId, int logIndex, String logContent);
1697	
1698	/**
1699	 * @description:add field database colname to database
1700	 * @date:2014-5-6 上午11:52:32
1701	 * @version:v1.0
1702	 * @param templateId
1703	 * @param fieldColName
1704	 * @param fieldId
1705	 * @param fieldType
1706	 * @return
1707	 */
1708	public boolean addFieldColName(String templateId,String fieldColName,String fieldId,String fieldType);
1709	
1710	/**
1711	 * @description:query all statistics of user
1712	 * @date:2014-5-6 上午11:52:53
1713	 * @version:v1.0
1714	 * @param userName
1715	 * @return
1716	 */
1717	public TimerAction[] queryStatisticByUser(String userName);
1718	
1719	/**
1720	 * @description:query all users by user status
1721	 * @date:2014-5-6 上午11:53:14
1722	 * @version:v1.0
1723	 * @param userStat
1724	 * @param userName
1725	 * @return
1726	 */
1727	public List<UserInfo> queryAllUsersByStatAndName(String curUser,String userStat,String queryUserName);
1728	
1729	/**
1730	 * @description:update attachment
1731	 * @date:2014-5-6 上午11:53:34
1732	 * @version:v1.0
1733	 * @param attachment
1734	 * @return
1735	 */
1736	public boolean updateAttachment(Attachment attachment);
1737	
1738	/**
1739	 * @description:add template right user
1740	 * @date:2014-5-6 上午11:53:45
1741	 * @version:v1.0
1742	 * @param templateId
1743	 * @param userMails
1744	 * @return
1745	 */
1746	public boolean addtemplateUserRight(String templateId,String[] userMails);
1747	
1748	/**
1749	 * @description:remove template operate user
1750	 * @date:2014-5-6 上午11:53:59
1751	 * @version:v1.0
1752	 * @param templateId
1753	 * @param user
1754	 * @return
1755	 */
1756	public boolean delTemplateUserRight(String templateId,String user);
1757	
1758	/********************使用说明开始********************************************/
1759	/**
1760	 * @description:get all guide
1761	 * @date:2014-6-10 上午11:25:33
1762	 * @version:v1.0
1763	 * @return
1764	 */
1765	public List<GuideBean> queryAllGuide();
1766	
1767	/**
1768	 * @description:get guide by guideId
1769	 * @date:2014-6-10 上午11:25:55
1770	 * @version:v1.0
1771	 * @param guideId
1772	 * @return
1773	 */
1774	public String queryGuideHtmlByGuideId( String guideId);
1775	
1776	/**
1777	 * @description:save guide by guideid
1778	 * @date:2014-6-10 上午11:26:31
1779	 * @version:v1.0
1780	 * @param guideId
1781	 * @param guideHtml
1782	 * @return
1783	 */
1784	public boolean saveGuideHtml(String guideId , String guideHtml);
1785	/********************使用说明结束********************************************/
1786	
1787	public enum ErrorCode
1788	{
1789		success, privilegeFail, dbFail, scriptBeforeFail, scriptAfterFail, nullClientFail, unknownFail, noSuchTemplateFail, noSuchTemplateTypeFail, alreadyDeleted, alreadyUpdate, autoCommitted;
1790	}
1791
1792	
1793}