Class GetSystemData

java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetSystemData

public class GetSystemData extends DAO
A Data Access Object for loading system data (Session/Command/HTTP log tables) and Registration blocks.
Since:
1.0
Version:
11.3
Author:
Luke
  • Constructor Details

    • GetSystemData

      public GetSystemData(Connection c)
      Initialize the Data Access Object.
      Parameters:
      c - the JDBC connection to use
  • Method Details

    • getDBVersion

      public String getDBVersion() throws DAOException
      Retrieves the database software version.
      Returns:
      the version string
      Throws:
      DAOException - if a JDBC error occurs
    • getHTTPStats

      public List<HTTPStatistics> getHTTPStats(String orderBy) throws DAOException
      Returns HTTP server statistics.
      Parameters:
      orderBy - the column to sort by
      Returns:
      a List of HTTPStatistics objects
      Throws:
      DAOException - if a JDBC error occurs
    • getHTTPTotals

      public HTTPTotals getHTTPTotals() throws DAOException
      Returns the HTTP server totals.
      Returns:
      an HTTPTotals bean with total requests, home hits and bandwidth used
      Throws:
      DAOException - if a JDBC error occurs
      See Also:
    • getCommandStats

      public Collection<CommandStatsEntry> getCommandStats(String orderBy) throws DAOException
      Returns Command invocation statistics.
      Parameters:
      orderBy - the column to order results by
      Returns:
      a Collection of CommandStatsEntry beans
      Throws:
      DAOException - if a JDBC error occurs
    • getTaskExecution

      public Map<String, TaskLastRun> getTaskExecution() throws DAOException
      Returns the last execution date/times for Scheduled Tasks.
      Returns:
      a Map of TaskLastRun beans, ordered by task ID
      Throws:
      DAOException - if a JDBC error occurs
    • getLastRun

      public Instant getLastRun(String taskID) throws DAOException
      Returns the last execution time of a Scheduled Task.
      Parameters:
      taskID - the Task ID
      Returns:
      the last execution date/time, or null if never
      Throws:
      DAOException - if a JDBC error occurs
    • getBlacklist

      public Collection<BlacklistEntry> getBlacklist() throws DAOException
      Returns the Login/Regisstration blacklist.
      Returns:
      a Collection of BlacklistEntry beans
      Throws:
      DAOException - if a JDBC error occurs
    • getBlacklist

      public BlacklistEntry getBlacklist(String addr) throws DAOException
      Returns whether an IP address is contained within a Login or Regisstration blacklist.
      Parameters:
      addr - the IP Address
      Returns:
      a BlacklistEntry, or null if not found
      Throws:
      DAOException - if a JDBC error occurs