Ejemplo n.º 1
0
 /** 更新Model分类 */
 @RequiresPermissions("act:model:edit")
 @RequestMapping(value = "updateCategory")
 public String updateCategory(String id, String category, RedirectAttributes redirectAttributes) {
   actModelService.updateCategory(id, category);
   redirectAttributes.addFlashAttribute("message", "设置成功,模块ID=" + id);
   return "redirect:" + adminPath + "/act/model";
 }
Ejemplo n.º 2
0
 /** 根据Model部署流程 */
 @RequiresPermissions("act:model:edit")
 @RequestMapping(value = "deploy")
 public String deploy(String id, RedirectAttributes redirectAttributes) {
   String message = actModelService.deploy(id);
   redirectAttributes.addFlashAttribute("message", message);
   return "redirect:" + adminPath + "/act/process";
 }
Ejemplo n.º 3
0
 /**
  * 删除Model
  *
  * @param id
  * @param redirectAttributes
  * @return
  */
 @RequiresPermissions("act:model:edit")
 @RequestMapping(value = "delete")
 public String delete(String id, RedirectAttributes redirectAttributes) {
   actModelService.delete(id);
   redirectAttributes.addFlashAttribute("message", "删除成功,模型ID=" + id);
   return "redirect:" + adminPath + "/act/model";
 }
Ejemplo n.º 4
0
  /** 流程模型列表 */
  @RequiresPermissions("act:model:edit")
  @RequestMapping(value = {"list", ""})
  public String modelList(
      String category, HttpServletRequest request, HttpServletResponse response, Model model) {

    Page<org.activiti.engine.repository.Model> page =
        actModelService.modelList(
            new Page<org.activiti.engine.repository.Model>(request, response), category);

    model.addAttribute("page", page);
    model.addAttribute("category", category);

    return "modules/act/actModelList";
  }
Ejemplo n.º 5
0
 /** 创建模型 */
 @RequiresPermissions("act:model:edit")
 @RequestMapping(value = "create", method = RequestMethod.POST)
 public void create(
     String name,
     String key,
     String description,
     String category,
     HttpServletRequest request,
     HttpServletResponse response) {
   try {
     org.activiti.engine.repository.Model modelData =
         actModelService.create(name, key, description, category);
     response.sendRedirect(
         request.getContextPath() + "/act/rest/service/editor?id=" + modelData.getId());
   } catch (Exception e) {
     e.printStackTrace();
     logger.error("创建模型失败:", e);
   }
 }
Ejemplo n.º 6
0
 /** 导出model的xml文件 */
 @RequiresPermissions("act:model:edit")
 @RequestMapping(value = "export")
 public void export(String id, HttpServletResponse response) {
   actModelService.export(id, response);
 }