MCPcopy Index your code
hub / github.com/OWASP/SecurityShepherd / closeAllModules

Method closeAllModules

src/main/java/dbProcs/Setter.java:75–94  ·  view source on GitHub ↗

This method sets every module status to Closed. @param ApplicationRoot Current running director of the application @param moduleId The identifier of the module that is been set to open status @return Boolean result depicting success of statement

(String ApplicationRoot)

Source from the content-addressed store, hash-verified

73 * @return Boolean result depicting success of statement
74 */
75 public static boolean closeAllModules (String ApplicationRoot)
76 {
77 log.debug("*** Setter.closeAllModules ***");
78 boolean result = false;
79 Connection conn = Database.getCoreConnection(ApplicationRoot);
80 try
81 {
82 PreparedStatement callstmt = conn.prepareStatement("UPDATE modules SET moduleStatus = 'closed'");
83 callstmt.execute();
84 log.debug("All modules Set to closed");
85 result = true;
86 }
87 catch (SQLException e)
88 {
89 log.error("Could not close all modules: " + e.toString());
90 }
91 Database.closeConnection(conn);
92 log.debug("*** END closeAllModules ***");
93 return result;
94 }
95
96 /**
97 * Used to increment bad submission counter in DB. DB will handle point deductions once the counter hits 40

Calls 2

getCoreConnectionMethod · 0.95
closeConnectionMethod · 0.95