PageRenderTime 72ms CodeModel.GetById 2ms app.highlight 61ms RepoModel.GetById 1ms app.codeStats 1ms

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

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