Class ExportEventProcessor

java.lang.Object
org.dspace.statistics.export.processor.ExportEventProcessor
Direct Known Subclasses:
BitstreamEventProcessor, ItemEventProcessor

public abstract class ExportEventProcessor extends Object
Abstract export event processor that contains all shared logic to handle both Items and Bitstreams from the IrusExportUsageEventListener
  • Field Details

  • Method Details

    • processEvent

      public abstract void processEvent() throws SQLException, IOException
      Processes the event
      Throws:
      SQLException
      IOException
    • processObject

      protected void processObject(String urlParameters) throws IOException, SQLException
      Process the url obtained from the object to be transmitted
      Parameters:
      urlParameters -
      Throws:
      IOException
      SQLException
    • getBaseParameters

      protected String getBaseParameters(Item item) throws UnsupportedEncodingException
      Get the base parameters for the url to be transmitted
      Parameters:
      item -
      Returns:
      the parameter string to be used in the url
      Throws:
      UnsupportedEncodingException
    • getCurrentDateString

      protected String getCurrentDateString()
      Get the current date
      Returns:
      the current date as a string
    • shouldProcessItem

      protected boolean shouldProcessItem(Item item) throws SQLException
      Checks if an item should be processed
      Parameters:
      item - to be checked
      Returns:
      whether the item should be processed
      Throws:
      SQLException
    • shouldProcessEntityType

      protected boolean shouldProcessEntityType(Item item) throws SQLException
      Checks if the item's entity type should be processed When no entity type is present, the check will not be performed and true will be returned.
      Parameters:
      item - to be checked
      Returns:
      whether the item should be processed
      Throws:
      SQLException
    • shouldProcessItemType

      protected boolean shouldProcessItemType(Item item)
      Checks if the item should be excluded based on the its type
      Parameters:
      item - to be checked
      Returns:
      whether the item should be processed