/** * Checks to see if setup is complete, and it not locks out non-admin users by redirecting to a * static page instead of showing a forbidden error. */ private static void checkCompleteAndLicensed() { // If setup is complete, redirect if (isInitialSetupComplete() && isLicensed()) { complete(); } // If this user does not have the right roles, redirect to a static page if (Security.isSystemAdminOrRestrictedSystemAdmin() == false && Security.isSecurityAdminOrRestrictedSecurityAdmin() == false) { notLicensed(); } if (!Common.isClusterStable()) { Maintenance.maintenance(request.url); } }
/** Final initialization, once all dependencies are set. */ public void init() { setClusterServiceSql(m_sqlService.getVendor()); try { // if we are auto-creating our schema, check and create if (m_autoDdl) { m_sqlService.ddl(this.getClass().getClassLoader(), "sakai_cluster"); } // start the maintenance thread m_maintenance = new Maintenance(); m_maintenance.start(); M_log.info( "init: refresh: " + m_refresh + " expired: " + m_expired + " ghostingPercent: " + m_ghostingPercent); } catch (Throwable t) { M_log.warn("init(): ", t); } }
/** Displays the restarting screen. */ @Util private static void restarting() { flash.success(MessagesUtils.get("setup.waitStable.description")); Maintenance.maintenance(Common.reverseRoute(Setup.class, "index")); }
/** Returns to uninitialized state. */ public void destroy() { m_maintenance.stop(); m_maintenance = null; M_log.info("destroy()"); }