From 222fc5c6ab58dd5a356e4b359e2aa2e9faea207b Mon Sep 17 00:00:00 2001 From: bwcx_jzy Date: Thu, 26 Sep 2019 10:26:54 +0800 Subject: [PATCH] javadoc --- .../java/io/jpom/JpomServerApplication.java | 1 + .../main/java/io/jpom/build/BuildManage.java | 1 + .../common/GlobalDefaultExceptionHandler.java | 4 +++ .../io/jpom/common/forward/NodeForward.java | 28 +++++++++++++++---- .../java/io/jpom/controller/LoginControl.java | 1 + .../monitor/MonitorListController.java | 20 +++++++++++++ .../monitor/MonitorLogController.java | 8 +++++- .../node/manage/ConsoleController.java | 1 + .../node/manage/EditProjectController.java | 1 + .../node/manage/ProjectManageControl.java | 4 +-- .../node/manage/file/ProjectFileControl.java | 3 ++ .../node/monitor/InternalController.java | 8 ++++-- .../node/system/nginx/NginxController.java | 12 ++++++++ .../system/ssl/CertificateController.java | 7 +++-- .../node/tomcat/TomcatManageController.java | 1 + .../system/CacheManageController.java | 1 + .../system/SystemMailConfigController.java | 2 ++ .../controller/user/UserListController.java | 4 +++ .../user/log/UserOptLogController.java | 7 ++++- .../user/role/UserRoleListController.java | 2 ++ .../java/io/jpom/outgiving/OutGivingRun.java | 4 +-- .../jpom/permission/BaseDynamicService.java | 1 + .../permission/CacheControllerFeature.java | 2 +- .../java/io/jpom/permission/DynamicData.java | 1 - .../dblog/DbMonitorNotifyLogService.java | 5 ++-- .../io/jpom/service/node/ssh/SshService.java | 10 +++---- .../system/WhitelistDirectoryService.java | 1 + .../io/jpom/service/user/RoleService.java | 7 +++-- .../jpom/socket/ServiceFileTailWatcher.java | 1 + .../main/java/io/jpom/util/CheckPassword.java | 1 + .../main/java/io/jpom/util/SvnKitUtil.java | 11 ++++++-- 31 files changed, 129 insertions(+), 31 deletions(-) diff --git a/modules/server/src/main/java/io/jpom/JpomServerApplication.java b/modules/server/src/main/java/io/jpom/JpomServerApplication.java index b98bff34f..43e6c8209 100644 --- a/modules/server/src/main/java/io/jpom/JpomServerApplication.java +++ b/modules/server/src/main/java/io/jpom/JpomServerApplication.java @@ -26,6 +26,7 @@ public class JpomServerApplication implements ApplicationEventLoad { * 启动执行 * * @param args 参数 + * @throws Exception 异常 */ public static void main(String[] args) throws Exception { JpomApplication jpomApplication = new JpomApplication(Type.Server, JpomServerApplication.class, args); diff --git a/modules/server/src/main/java/io/jpom/build/BuildManage.java b/modules/server/src/main/java/io/jpom/build/BuildManage.java index 20e235ec1..b81f06ce3 100644 --- a/modules/server/src/main/java/io/jpom/build/BuildManage.java +++ b/modules/server/src/main/java/io/jpom/build/BuildManage.java @@ -57,6 +57,7 @@ public class BuildManage extends BaseBuild implements Runnable { * 取消构建 * * @param id id + * @return bool */ public static boolean cancel(String id) { BuildManage buildManage = BUILD_MANAGE_MAP.get(id); diff --git a/modules/server/src/main/java/io/jpom/common/GlobalDefaultExceptionHandler.java b/modules/server/src/main/java/io/jpom/common/GlobalDefaultExceptionHandler.java index fb53edad7..dfba464de 100644 --- a/modules/server/src/main/java/io/jpom/common/GlobalDefaultExceptionHandler.java +++ b/modules/server/src/main/java/io/jpom/common/GlobalDefaultExceptionHandler.java @@ -34,6 +34,10 @@ public class GlobalDefaultExceptionHandler { /** * 声明要捕获的异常 + * + * @param request 请求 + * @param response 响应 + * @param e 异常 */ @ExceptionHandler({AgentException.class, AuthorizeException.class, RuntimeException.class, Exception.class}) public void paramExceptionHandler(HttpServletRequest request, HttpServletResponse response, Exception e) { diff --git a/modules/server/src/main/java/io/jpom/common/forward/NodeForward.java b/modules/server/src/main/java/io/jpom/common/forward/NodeForward.java index 3d7138b32..7c86f06f4 100644 --- a/modules/server/src/main/java/io/jpom/common/forward/NodeForward.java +++ b/modules/server/src/main/java/io/jpom/common/forward/NodeForward.java @@ -39,6 +39,7 @@ public class NodeForward { * @param nodeModel 节点 * @param request 请求 * @param nodeUrl 节点的url + * @param 泛型 * @return JSON */ public static JsonMessage request(NodeModel nodeModel, HttpServletRequest request, NodeUrl nodeUrl) { @@ -48,8 +49,10 @@ public class NodeForward { /** * 普通消息转发 * - * @param nodeModel 节点 - * @param nodeUrl 节点的url + * @param nodeModel 节点 + * @param nodeUrl 节点的url + * @param jsonObject 数据 + * @param userModel user * @return JSON */ public static JsonMessage request(NodeModel nodeModel, NodeUrl nodeUrl, UserModel userModel, JSONObject jsonObject) { @@ -61,6 +64,9 @@ public class NodeForward { * * @param nodeModel 节点 * @param nodeUrl 节点的url + * @param pName 主参数名 + * @param pVal 主参数值 + * @param val 其他参数 * @return JSON */ public static JsonMessage requestBySys(NodeModel nodeModel, NodeUrl nodeUrl, String pName, Object pVal, Object... val) { @@ -73,6 +79,13 @@ public class NodeForward { * @param nodeModel 节点 * @param request 请求 * @param nodeUrl 节点的url + * @param pVal 主参数值 + * @param pName 主参数名 + * @param userModel 用户 + * @param jsonData 数据 + * @param mustUser 是否必须需要user + * @param val 其他参数 + * @param 泛型 * @return JSON */ private static JsonMessage request(NodeModel nodeModel, @@ -144,10 +157,13 @@ public class NodeForward { /** * 普通消息转发,并解析数据 * - * @param nodeModel 节点 - * @param nodeUrl 节点的url - * @param tClass 要解析的类 - * @param 泛型 + * @param nodeModel 节点 + * @param nodeUrl 节点的url + * @param tClass 要解析的类 + * @param 泛型 + * @param name 参数名 + * @param parameters 其他参数 + * @param value 值 * @return T */ public static T requestData(NodeModel nodeModel, NodeUrl nodeUrl, Class tClass, String name, Object value, Object... parameters) { diff --git a/modules/server/src/main/java/io/jpom/controller/LoginControl.java b/modules/server/src/main/java/io/jpom/controller/LoginControl.java index 40cb217cb..31a96c9a0 100644 --- a/modules/server/src/main/java/io/jpom/controller/LoginControl.java +++ b/modules/server/src/main/java/io/jpom/controller/LoginControl.java @@ -133,6 +133,7 @@ public class LoginControl extends BaseServerController { * * @param userName 登录名 * @param userPwd 登录密码 + * @param code 验证码 * @return json */ @RequestMapping(value = "userLogin", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) diff --git a/modules/server/src/main/java/io/jpom/controller/monitor/MonitorListController.java b/modules/server/src/main/java/io/jpom/controller/monitor/MonitorListController.java index 85db4f295..b638cb79b 100644 --- a/modules/server/src/main/java/io/jpom/controller/monitor/MonitorListController.java +++ b/modules/server/src/main/java/io/jpom/controller/monitor/MonitorListController.java @@ -56,6 +56,8 @@ public class MonitorListController extends BaseServerController { /** * 展示监控页面 + * + * @return page */ @RequestMapping(value = "list.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.LIST) @@ -65,6 +67,9 @@ public class MonitorListController extends BaseServerController { /** * 修改监控 + * + * @param id id + * @return json */ @RequestMapping(value = "edit.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.EDIT) @@ -97,6 +102,8 @@ public class MonitorListController extends BaseServerController { /** * 展示监控列表 + * + * @return json */ @RequestMapping(value = "getMonitorList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody @@ -108,6 +115,9 @@ public class MonitorListController extends BaseServerController { /** * 删除列表 + * + * @param id id + * @return json */ @RequestMapping(value = "deleteMonitor", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody @@ -126,6 +136,11 @@ public class MonitorListController extends BaseServerController { /** * 增加或修改监控 + * + * @param id id + * @param name name + * @param notifyUser user + * @return json */ @RequestMapping(value = "updateMonitor", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody @@ -181,6 +196,11 @@ public class MonitorListController extends BaseServerController { /** * 开启或关闭监控 + * + * @param id id + * @param status 状态 + * @param type 类型 + * @return json */ @RequestMapping(value = "changeStatus", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody diff --git a/modules/server/src/main/java/io/jpom/controller/monitor/MonitorLogController.java b/modules/server/src/main/java/io/jpom/controller/monitor/MonitorLogController.java index b069d8d75..0861beb42 100644 --- a/modules/server/src/main/java/io/jpom/controller/monitor/MonitorLogController.java +++ b/modules/server/src/main/java/io/jpom/controller/monitor/MonitorLogController.java @@ -20,7 +20,6 @@ import io.jpom.plugin.ClassFeature; import io.jpom.plugin.Feature; import io.jpom.plugin.MethodFeature; import io.jpom.service.dblog.DbMonitorNotifyLogService; -import io.jpom.service.node.NodeService; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -46,6 +45,8 @@ public class MonitorLogController extends BaseServerController { /** * 展示监控页面 + * + * @return page */ @RequestMapping(value = "log.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.LOG) @@ -62,6 +63,11 @@ public class MonitorLogController extends BaseServerController { /** * 展示用户列表 + * + * @param selectNode 节点 + * @param limit 限制 + * @param notifyStatus 状态 + * @return json */ @RequestMapping(value = "list_data.json", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody diff --git a/modules/server/src/main/java/io/jpom/controller/node/manage/ConsoleController.java b/modules/server/src/main/java/io/jpom/controller/node/manage/ConsoleController.java index 701419d57..db4cc12c9 100644 --- a/modules/server/src/main/java/io/jpom/controller/node/manage/ConsoleController.java +++ b/modules/server/src/main/java/io/jpom/controller/node/manage/ConsoleController.java @@ -30,6 +30,7 @@ public class ConsoleController extends BaseServerController { /** * 管理项目 * + * @param id id * @return page */ @RequestMapping(value = "console", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) diff --git a/modules/server/src/main/java/io/jpom/controller/node/manage/EditProjectController.java b/modules/server/src/main/java/io/jpom/controller/node/manage/EditProjectController.java index 77f1d2b8b..4d1552581 100644 --- a/modules/server/src/main/java/io/jpom/controller/node/manage/EditProjectController.java +++ b/modules/server/src/main/java/io/jpom/controller/node/manage/EditProjectController.java @@ -80,6 +80,7 @@ public class EditProjectController extends BaseServerController { /** * 保存项目 * + * @param id id * @return json */ @RequestMapping(value = "saveProject", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) diff --git a/modules/server/src/main/java/io/jpom/controller/node/manage/ProjectManageControl.java b/modules/server/src/main/java/io/jpom/controller/node/manage/ProjectManageControl.java index 6e0836baf..428f7e4d2 100644 --- a/modules/server/src/main/java/io/jpom/controller/node/manage/ProjectManageControl.java +++ b/modules/server/src/main/java/io/jpom/controller/node/manage/ProjectManageControl.java @@ -25,7 +25,6 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; -import java.io.IOException; import java.util.List; /** @@ -89,13 +88,14 @@ public class ProjectManageControl extends BaseServerController { /** * 删除项目 * + * @param id id * @return json */ @RequestMapping(value = "deleteProject", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody @OptLog(value = UserOperateLogV1.OptType.DelProject) @Feature(method = MethodFeature.DEL) - public String deleteProject(@ValidatorItem(value = ValidatorRule.NOT_BLANK) String id) throws IOException { + public String deleteProject(@ValidatorItem(value = ValidatorRule.NOT_BLANK) String id) { NodeModel nodeModel = getNode(); // 检查节点分发 List outGivingModels = outGivingServer.list(); diff --git a/modules/server/src/main/java/io/jpom/controller/node/manage/file/ProjectFileControl.java b/modules/server/src/main/java/io/jpom/controller/node/manage/file/ProjectFileControl.java index 185bd1c3d..3e3223ed3 100644 --- a/modules/server/src/main/java/io/jpom/controller/node/manage/file/ProjectFileControl.java +++ b/modules/server/src/main/java/io/jpom/controller/node/manage/file/ProjectFileControl.java @@ -35,6 +35,7 @@ public class ProjectFileControl extends BaseServerController { * 文件管理页面 * * @param id 项目id + * @return page */ @RequestMapping(value = "list.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.FILE) @@ -50,6 +51,8 @@ public class ProjectFileControl extends BaseServerController { /** * 列出目录下的文件 + * + * @return json */ @RequestMapping(value = "getFileList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody diff --git a/modules/server/src/main/java/io/jpom/controller/node/monitor/InternalController.java b/modules/server/src/main/java/io/jpom/controller/node/monitor/InternalController.java index 35caf4fc6..9c41ba9fd 100644 --- a/modules/server/src/main/java/io/jpom/controller/node/monitor/InternalController.java +++ b/modules/server/src/main/java/io/jpom/controller/node/monitor/InternalController.java @@ -23,9 +23,11 @@ public class InternalController extends BaseServerController { /** * 获取内存信息 + * + * @return page */ @RequestMapping(value = "internal", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) - public String getInternal(String tag) throws Exception { + public String getInternal(String tag) { setAttribute("tag", tag); JSONObject data = NodeForward.requestData(getNode(), NodeUrl.Manage_internal_data, getRequest(), JSONObject.class); setAttribute("data", data); @@ -34,6 +36,8 @@ public class InternalController extends BaseServerController { /** * 查询监控线程列表 + * + * @return json */ @RequestMapping(value = "threadInfos", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody @@ -57,7 +61,7 @@ public class InternalController extends BaseServerController { @RequestMapping(value = "ram", method = RequestMethod.GET) @ResponseBody @OptLog(UserOperateLogV1.OptType.ExportRam) - public void ram() throws Exception { + public void ram() { NodeForward.requestDownload(getNode(), getRequest(), getResponse(), NodeUrl.Manage_internal_ram); } } diff --git a/modules/server/src/main/java/io/jpom/controller/node/system/nginx/NginxController.java b/modules/server/src/main/java/io/jpom/controller/node/system/nginx/NginxController.java index 0cb7be0b4..86b1468ce 100644 --- a/modules/server/src/main/java/io/jpom/controller/node/system/nginx/NginxController.java +++ b/modules/server/src/main/java/io/jpom/controller/node/system/nginx/NginxController.java @@ -41,6 +41,8 @@ public class NginxController extends BaseServerController { /** * 配置列表 + * + * @return json */ @RequestMapping(value = "list_data.json", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody @@ -80,6 +82,8 @@ public class NginxController extends BaseServerController { /** * 获取nginx状态 + * + * @return json */ @RequestMapping(value = "status", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody @@ -90,6 +94,8 @@ public class NginxController extends BaseServerController { /** * 获取nginx配置状态 + * + * @return json */ @RequestMapping(value = "config", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody @@ -100,6 +106,8 @@ public class NginxController extends BaseServerController { /** * 启动nginx + * + * @return json */ @RequestMapping(value = "open", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody @@ -110,6 +118,8 @@ public class NginxController extends BaseServerController { /** * 关闭nginx + * + * @return json */ @RequestMapping(value = "close", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody @@ -121,6 +131,8 @@ public class NginxController extends BaseServerController { /** * 修改nginx + * + * @return json */ @RequestMapping(value = "updateConf", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody diff --git a/modules/server/src/main/java/io/jpom/controller/node/system/ssl/CertificateController.java b/modules/server/src/main/java/io/jpom/controller/node/system/ssl/CertificateController.java index d3361adf9..d7360d340 100644 --- a/modules/server/src/main/java/io/jpom/controller/node/system/ssl/CertificateController.java +++ b/modules/server/src/main/java/io/jpom/controller/node/system/ssl/CertificateController.java @@ -60,6 +60,8 @@ public class CertificateController extends BaseServerController { /** * 证书列表 + * + * @return json */ @RequestMapping(value = "/getCertList", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody @@ -71,14 +73,13 @@ public class CertificateController extends BaseServerController { /** * 删除证书 * - * @param id id * @return json */ @RequestMapping(value = "/delete", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody @OptLog(UserOperateLogV1.OptType.DelCert) @Feature(method = MethodFeature.DEL) - public String delete(String id) { + public String delete() { return NodeForward.request(getNode(), getRequest(), NodeUrl.System_Certificate_delete).toString(); } @@ -90,7 +91,7 @@ public class CertificateController extends BaseServerController { @ResponseBody @OptLog(UserOperateLogV1.OptType.ExportCert) @Feature(method = MethodFeature.DOWNLOAD) - public void export(String id) { + public void export() { NodeForward.requestDownload(getNode(), getRequest(), getResponse(), NodeUrl.System_Certificate_export); } } diff --git a/modules/server/src/main/java/io/jpom/controller/node/tomcat/TomcatManageController.java b/modules/server/src/main/java/io/jpom/controller/node/tomcat/TomcatManageController.java index 7989f7e6d..a70355ada 100644 --- a/modules/server/src/main/java/io/jpom/controller/node/tomcat/TomcatManageController.java +++ b/modules/server/src/main/java/io/jpom/controller/node/tomcat/TomcatManageController.java @@ -55,6 +55,7 @@ public class TomcatManageController extends BaseServerController { /** * 查询tomcat的项目 * + * @param id id * @return tomcat的项目信息 */ @RequestMapping(value = "getTomcatProject", method = RequestMethod.POST, produces = MediaType.TEXT_HTML_VALUE) diff --git a/modules/server/src/main/java/io/jpom/controller/system/CacheManageController.java b/modules/server/src/main/java/io/jpom/controller/system/CacheManageController.java index 9add586da..c112979ff 100644 --- a/modules/server/src/main/java/io/jpom/controller/system/CacheManageController.java +++ b/modules/server/src/main/java/io/jpom/controller/system/CacheManageController.java @@ -75,6 +75,7 @@ public class CacheManageController extends BaseServerController { /** * 清空缓存 * + * @param type 类型 * @return json */ @RequestMapping(value = "clearCache.json", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) diff --git a/modules/server/src/main/java/io/jpom/controller/system/SystemMailConfigController.java b/modules/server/src/main/java/io/jpom/controller/system/SystemMailConfigController.java index 9741adfe1..fbbae87c7 100644 --- a/modules/server/src/main/java/io/jpom/controller/system/SystemMailConfigController.java +++ b/modules/server/src/main/java/io/jpom/controller/system/SystemMailConfigController.java @@ -32,6 +32,8 @@ public class SystemMailConfigController extends BaseServerController { /** * 展示监控页面 + * + * @return page */ @RequestMapping(value = "mailConfig.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @SystemPermission diff --git a/modules/server/src/main/java/io/jpom/controller/user/UserListController.java b/modules/server/src/main/java/io/jpom/controller/user/UserListController.java index 8cc33dc2f..c74619455 100644 --- a/modules/server/src/main/java/io/jpom/controller/user/UserListController.java +++ b/modules/server/src/main/java/io/jpom/controller/user/UserListController.java @@ -37,6 +37,8 @@ public class UserListController extends BaseServerController { /** * 展示用户列表 + * + * @return page */ @RequestMapping(value = "list", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.LIST) @@ -49,6 +51,8 @@ public class UserListController extends BaseServerController { /** * 查询所有用户 + * + * @return json */ @RequestMapping(value = "getUserList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody diff --git a/modules/server/src/main/java/io/jpom/controller/user/log/UserOptLogController.java b/modules/server/src/main/java/io/jpom/controller/user/log/UserOptLogController.java index 02434f6d3..e56d3c47a 100644 --- a/modules/server/src/main/java/io/jpom/controller/user/log/UserOptLogController.java +++ b/modules/server/src/main/java/io/jpom/controller/user/log/UserOptLogController.java @@ -17,7 +17,6 @@ import io.jpom.plugin.ClassFeature; import io.jpom.plugin.Feature; import io.jpom.plugin.MethodFeature; import io.jpom.service.dblog.DbUserOperateLogService; -import io.jpom.service.node.NodeService; import io.jpom.service.user.UserService; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; @@ -45,6 +44,8 @@ public class UserOptLogController extends BaseServerController { /** * 展示用户列表 + * + * @return page */ @RequestMapping(value = "list.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE) @Feature(method = MethodFeature.LOG) @@ -61,6 +62,10 @@ public class UserOptLogController extends BaseServerController { /** * 展示用户列表 + * + * @param limit 大小 + * @param page page + * @return json */ @RequestMapping(value = "list_data.json", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody diff --git a/modules/server/src/main/java/io/jpom/controller/user/role/UserRoleListController.java b/modules/server/src/main/java/io/jpom/controller/user/role/UserRoleListController.java index d0f7dd33b..8f3c5fdf2 100644 --- a/modules/server/src/main/java/io/jpom/controller/user/role/UserRoleListController.java +++ b/modules/server/src/main/java/io/jpom/controller/user/role/UserRoleListController.java @@ -62,6 +62,8 @@ public class UserRoleListController extends BaseServerController { /** * 查询所有用户 + * + * @return json */ @RequestMapping(value = "list_data.json", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody diff --git a/modules/server/src/main/java/io/jpom/outgiving/OutGivingRun.java b/modules/server/src/main/java/io/jpom/outgiving/OutGivingRun.java index 6b103ed25..82c336504 100644 --- a/modules/server/src/main/java/io/jpom/outgiving/OutGivingRun.java +++ b/modules/server/src/main/java/io/jpom/outgiving/OutGivingRun.java @@ -21,7 +21,6 @@ import io.jpom.service.node.NodeService; import io.jpom.service.node.OutGivingServer; import java.io.File; -import java.io.IOException; import java.util.List; import java.util.Objects; import java.util.concurrent.Callable; @@ -53,11 +52,12 @@ public class OutGivingRun implements Callable { * @param id 分发id * @param file 文件 * @param userModel 操作的用户 + * @param unzip 解压 */ public static void startRun(String id, File file, UserModel userModel, - boolean unzip) throws IOException { + boolean unzip) { OutGivingServer outGivingServer = SpringUtil.getBean(OutGivingServer.class); OutGivingModel item = outGivingServer.getItem(id); Objects.requireNonNull(item, "不存在分发"); diff --git a/modules/server/src/main/java/io/jpom/permission/BaseDynamicService.java b/modules/server/src/main/java/io/jpom/permission/BaseDynamicService.java index bd7ac539c..49a30090e 100644 --- a/modules/server/src/main/java/io/jpom/permission/BaseDynamicService.java +++ b/modules/server/src/main/java/io/jpom/permission/BaseDynamicService.java @@ -192,6 +192,7 @@ public interface BaseDynamicService { * * @param classFeature 功能 * @param jsonArray array + * @return list */ default List parserChildren(ClassFeature classFeature, JSONArray jsonArray) { Set children = DynamicData.getChildren(classFeature); diff --git a/modules/server/src/main/java/io/jpom/permission/CacheControllerFeature.java b/modules/server/src/main/java/io/jpom/permission/CacheControllerFeature.java index 7188491da..ffff767ce 100644 --- a/modules/server/src/main/java/io/jpom/permission/CacheControllerFeature.java +++ b/modules/server/src/main/java/io/jpom/permission/CacheControllerFeature.java @@ -46,7 +46,7 @@ public class CacheControllerFeature { * 获取url 功能方法对象 * * @param url url - * @return + * @return url功能 */ public static UrlFeature getUrlFeature(String url) { return URL_FEATURE_MAP.get(url); diff --git a/modules/server/src/main/java/io/jpom/permission/DynamicData.java b/modules/server/src/main/java/io/jpom/permission/DynamicData.java index 56c9d331d..39532d69a 100644 --- a/modules/server/src/main/java/io/jpom/permission/DynamicData.java +++ b/modules/server/src/main/java/io/jpom/permission/DynamicData.java @@ -56,7 +56,6 @@ public class DynamicData { /** * 获取子级功能 * - * @param classFeature 功能 * @return 子级 */ public static List getRoot() { diff --git a/modules/server/src/main/java/io/jpom/service/dblog/DbMonitorNotifyLogService.java b/modules/server/src/main/java/io/jpom/service/dblog/DbMonitorNotifyLogService.java index 404e7f087..1dd899dda 100644 --- a/modules/server/src/main/java/io/jpom/service/dblog/DbMonitorNotifyLogService.java +++ b/modules/server/src/main/java/io/jpom/service/dblog/DbMonitorNotifyLogService.java @@ -30,8 +30,9 @@ public class DbMonitorNotifyLogService extends BaseDbLogService implements BaseDynamic /** * 下载文件 * - * @param sshModel - * @param remoteFile - * @param save - * @throws FileNotFoundException - * @throws SftpException + * @param sshModel 实体 + * @param remoteFile 远程文件 + * @param save 文件对象 + * @throws FileNotFoundException io + * @throws SftpException sftp */ public void download(SshModel sshModel, String remoteFile, File save) throws FileNotFoundException, SftpException { Session session = null; diff --git a/modules/server/src/main/java/io/jpom/service/system/WhitelistDirectoryService.java b/modules/server/src/main/java/io/jpom/service/system/WhitelistDirectoryService.java index b65232c80..4e6bf6e1f 100644 --- a/modules/server/src/main/java/io/jpom/service/system/WhitelistDirectoryService.java +++ b/modules/server/src/main/java/io/jpom/service/system/WhitelistDirectoryService.java @@ -24,6 +24,7 @@ public class WhitelistDirectoryService { /** * 获取项目路径白名单 * + * @param model 实体 * @return project */ public List getProjectDirectory(NodeModel model) { diff --git a/modules/server/src/main/java/io/jpom/service/user/RoleService.java b/modules/server/src/main/java/io/jpom/service/user/RoleService.java index 65185350b..e64b68ca7 100644 --- a/modules/server/src/main/java/io/jpom/service/user/RoleService.java +++ b/modules/server/src/main/java/io/jpom/service/user/RoleService.java @@ -44,6 +44,7 @@ public class RoleService extends BaseOperService { * * @param roleId 角色id * @param classFeature 功能 + * @param dataId 数据id * @return list */ public List listDynamicData(String roleId, ClassFeature classFeature, String dataId) { @@ -58,10 +59,10 @@ public class RoleService extends BaseOperService { /** * 调用对应功能动态数据list * - * @param roleId - * @param classFeature + * @param roleId 角色id + * @param classFeature 功能 * @param dataId 数据id - * @return + * @return array */ public JSONArray listDynamic(String roleId, ClassFeature classFeature, String dataId) { Map dynamicDataMap = DynamicData.getDynamicDataMap(); diff --git a/modules/server/src/main/java/io/jpom/socket/ServiceFileTailWatcher.java b/modules/server/src/main/java/io/jpom/socket/ServiceFileTailWatcher.java index f32e74796..316d56877 100644 --- a/modules/server/src/main/java/io/jpom/socket/ServiceFileTailWatcher.java +++ b/modules/server/src/main/java/io/jpom/socket/ServiceFileTailWatcher.java @@ -90,6 +90,7 @@ public class ServiceFileTailWatcher extends BaseFileTailWatcher { * 关闭文件读取流 * * @param fileName 文件名 + * @param session 回话 */ public static void offlineFile(File fileName, WebSocketSession session) { ServiceFileTailWatcher serviceFileTailWatcher = CONCURRENT_HASH_MAP.get(fileName); diff --git a/modules/server/src/main/java/io/jpom/util/CheckPassword.java b/modules/server/src/main/java/io/jpom/util/CheckPassword.java index a4973cf7a..ab7317011 100644 --- a/modules/server/src/main/java/io/jpom/util/CheckPassword.java +++ b/modules/server/src/main/java/io/jpom/util/CheckPassword.java @@ -12,6 +12,7 @@ public class CheckPassword { * 密码强度 * Z = 字母 S = 数字 T = 特殊字符 * + * @param passwordStr 密码字符串 * @return 0 弱 1 中 2强 */ public static int checkPassword(String passwordStr) { diff --git a/modules/server/src/main/java/io/jpom/util/SvnKitUtil.java b/modules/server/src/main/java/io/jpom/util/SvnKitUtil.java index 46f349f1b..cc806218a 100644 --- a/modules/server/src/main/java/io/jpom/util/SvnKitUtil.java +++ b/modules/server/src/main/java/io/jpom/util/SvnKitUtil.java @@ -41,8 +41,10 @@ public class SvnKitUtil { /** * 判断当前仓库url是否匹配 * - * @param wcDir 仓库路径 - * @param url url + * @param wcDir 仓库路径 + * @param url url + * @param userName 用户名 + * @param userPwd 密码 * @return true 匹配 * @throws SVNException 异常 */ @@ -76,7 +78,12 @@ public class SvnKitUtil { /** * SVN检出 * + * @param userName 用户名 + * @param userPwd 密码 + * @param svnPath 仓库路径 + * @param targetPath 目录 * @return Boolean + * @throws SVNException svn */ public static String checkOut(String svnPath, String userName, String userPwd, File targetPath) throws SVNException { DefaultSVNOptions options = SVNWCUtil.createDefaultOptions(true);