Package org.dspace.access.status
Class AccessStatusServiceImpl
java.lang.Object
org.dspace.access.status.AccessStatusServiceImpl
- All Implemented Interfaces:
AccessStatusService
Implementation for the access status calculation service.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConfigurationServiceprotected Dateprotected AccessStatusHelperprotected PluginService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAccessStatus(Context context, Item item) Calculate the access status for an Item while considering the forever embargo date threshold.getEmbargoFromItem(Context context, Item item) Retrieve embargo information for the itemvoidinit()Initialize the bean (after dependency injection has already taken place).
-
Field Details
-
helper
-
forever_date
-
configurationService
-
pluginService
-
-
Constructor Details
-
AccessStatusServiceImpl
public AccessStatusServiceImpl()
-
-
Method Details
-
init
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
Description copied from interface:AccessStatusServiceCalculate the access status for an Item while considering the forever embargo date threshold.- Specified by:
getAccessStatusin interfaceAccessStatusService- Parameters:
context- the DSpace contextitem- the item- Returns:
- an access status value
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
getEmbargoFromItem
Description copied from interface:AccessStatusServiceRetrieve embargo information for the item- Specified by:
getEmbargoFromItemin interfaceAccessStatusService- Parameters:
context- the DSpace contextitem- 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.
-