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 Stringprotected ConfigurationServiceprotected LocalDateprotected AccessStatusHelperprotected Stringprotected PluginService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAccessStatus(Context context, Bitstream bitstream) Calculate the access status for a bitstream while considering the forever embargo date threshold.getAccessStatus(Context context, Item item) Calculate the access status for an Item while considering the forever embargo date threshold.getAnonymousAccessStatus(Context context, Item item) Calculate the anonymous access status for an Item while considering the forever embargo date threshold.voidinit()Initialize the bean (after dependency injection has already taken place).
-
Field Details
-
helper
-
forever_date
-
itemCalculationType
-
bitstreamCalculationType
-
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:
- the access status
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
getAnonymousAccessStatus
Description copied from interface:AccessStatusServiceCalculate the anonymous access status for an Item while considering the forever embargo date threshold.- Specified by:
getAnonymousAccessStatusin interfaceAccessStatusService- Parameters:
context- the DSpace contextitem- 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
Description copied from interface:AccessStatusServiceCalculate the access status for a bitstream while considering the forever embargo date threshold.- Specified by:
getAccessStatusin interfaceAccessStatusService- Parameters:
context- the DSpace contextbitstream- the bitstream- Returns:
- the access status
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-