Class AccessStatusServiceImpl

java.lang.Object
org.dspace.access.status.AccessStatusServiceImpl
All Implemented Interfaces:
AccessStatusService

public class AccessStatusServiceImpl extends Object implements AccessStatusService
Implementation for the access status calculation service.
  • Field Details

  • Constructor Details

    • AccessStatusServiceImpl

      public AccessStatusServiceImpl()
  • Method Details

    • init

      public void init() throws Exception
      Initialize the bean (after dependency injection has already taken place). Ensures the configurationService is injected, so that we can get the plugin and the forever embargo date threshold from the configuration. Called by "init-method" in Spring configuration.
      Throws:
      Exception - on generic exception
    • getAccessStatus

      public AccessStatus getAccessStatus(Context context, Item item) throws SQLException
      Description copied from interface: AccessStatusService
      Calculate the access status for an Item while considering the forever embargo date threshold.
      Specified by:
      getAccessStatus in interface AccessStatusService
      Parameters:
      context - the DSpace context
      item - the item
      Returns:
      the access status
      Throws:
      SQLException - An exception that provides information on a database access error or other errors.
    • getAnonymousAccessStatus

      public AccessStatus getAnonymousAccessStatus(Context context, Item item) throws SQLException
      Description copied from interface: AccessStatusService
      Calculate the anonymous access status for an Item while considering the forever embargo date threshold.
      Specified by:
      getAnonymousAccessStatus in interface AccessStatusService
      Parameters:
      context - the DSpace context
      item - the item to check for embargo information
      Returns:
      the access status
      Throws:
      SQLException - An exception that provides information on a database access error or other errors.
    • getAccessStatus

      public AccessStatus getAccessStatus(Context context, Bitstream bitstream) throws SQLException
      Description copied from interface: AccessStatusService
      Calculate the access status for a bitstream while considering the forever embargo date threshold.
      Specified by:
      getAccessStatus in interface AccessStatusService
      Parameters:
      context - the DSpace context
      bitstream - the bitstream
      Returns:
      the access status
      Throws:
      SQLException - An exception that provides information on a database access error or other errors.