Class AccessStatusServiceImpl

    • Constructor Detail

      • AccessStatusServiceImpl

        public AccessStatusServiceImpl()
    • Method Detail

      • 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 String 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:
        an access status value
        Throws:
        SQLException - An exception that provides information on a database access error or other errors.
      • getEmbargoFromItem

        public String getEmbargoFromItem​(Context context,
                                         Item item)
                                  throws SQLException
        Description copied from interface: AccessStatusService
        Retrieve embargo information for the item
        Specified by:
        getEmbargoFromItem in interface AccessStatusService
        Parameters:
        context - the DSpace context
        item - the item to check for embargo information
        Returns:
        an embargo date
        Throws:
        SQLException - An exception that provides information on a database access error or other errors.