IManagerService.java 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* Copyright 2013-2015 www.snakerflow.com.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. package org.snaker.engine;
  16. import java.util.List;
  17. import org.snaker.engine.access.Page;
  18. import org.snaker.engine.access.QueryFilter;
  19. import org.snaker.engine.entity.Surrogate;
  20. /**
  21. * 管理服务接口,用于流程管理控制服务
  22. * 委托管理
  23. * 时限控制
  24. * @author yuqs
  25. * @since 1.4
  26. */
  27. public interface IManagerService {
  28. /**
  29. * 保存或更新委托代理对象
  30. * @param surrogate 委托代理对象
  31. */
  32. public void saveOrUpdate(Surrogate surrogate);
  33. /**
  34. * 删除委托代理对象
  35. * @param id 委托代理主键id
  36. */
  37. public void deleteSurrogate(String id);
  38. /**
  39. * 根据主键id查询委托代理对象
  40. * @param id 主键id
  41. * @return surrogate 委托代理对象
  42. */
  43. public Surrogate getSurrogate(String id);
  44. /**
  45. * 根据过滤条件查询委托代理对象
  46. * @param filter 查询过滤器
  47. * @return List<Surrogate> 委托代理对象集合
  48. */
  49. public List<Surrogate> getSurrogate(QueryFilter filter);
  50. /**
  51. * 根据授权人、流程名称获取最终代理人
  52. * 如存在user1->user2->user3,那么最终返回user3
  53. * @param operator 授权人
  54. * @param processName 流程名称
  55. * @return String 代理人
  56. */
  57. public String getSurrogate(String operator, String processName);
  58. /**
  59. * 根据过滤条件查询委托代理对象
  60. * @param page 分页对象
  61. * @param filter 查询过滤器
  62. * @return List<Surrogate> 委托代理对象集合
  63. */
  64. public List<Surrogate> getSurrogate(Page<Surrogate> page, QueryFilter filter);
  65. }