public interface EmbargoService
Configuration properties: (with examples)
# DC metadata field to hold the user-supplied embargo terms
embargo.field.terms = dc.embargo.terms
# DC metadata field to hold computed "lift date" of embargo
embargo.field.lift = dc.date.available
# String to indicate indefinite (forever) embargo in terms
embargo.terms.open = Indefinite
# implementation of embargo setter plugin
plugin.single.org.dspace.embargo.EmbargoSetter = edu.my.Setter
# implementation of embargo lifter plugin
plugin.single.org.dspace.embargo.EmbargoLifter = edu.my.Lifter
| Modifier and Type | Field and Description |
|---|---|
static DCDate |
FOREVER
Special date signalling an Item is to be embargoed forever.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkEmbargo(Context context,
Item item) |
Iterator<Item> |
findItemsByLiftMetadata(Context context) |
DCDate |
getEmbargoTermsAsDate(Context context,
Item item)
Get the embargo lift date for an Item, if any.
|
List<MetadataValue> |
getLiftMetadata(Context context,
Item item) |
void |
liftEmbargo(Context context,
Item item)
Lift the embargo on an item which is assumed to be under embargo.
|
void |
setEmbargo(Context context,
Item item)
Put an Item under embargo until the specified lift date.
|
static final DCDate FOREVER
void setEmbargo(Context context, Item item) throws SQLException, AuthorizeException
context - the DSpace contextitem - the item to embargoSQLExceptionAuthorizeExceptionDCDate getEmbargoTermsAsDate(Context context, Item item) throws SQLException, AuthorizeException
Note that the plugin is *always* called, in case it gets its cue for the embargo date from sources other than, or in addition to, the specified field.
context - the DSpace contextitem - the item to embargoSQLExceptionAuthorizeExceptionvoid liftEmbargo(Context context, Item item) throws SQLException, AuthorizeException, IOException
context - the DSpace contextitem - the item on which to lift the embargoSQLExceptionAuthorizeExceptionIOExceptionvoid checkEmbargo(Context context, Item item) throws SQLException, IOException, AuthorizeException
List<MetadataValue> getLiftMetadata(Context context, Item item)
Iterator<Item> findItemsByLiftMetadata(Context context) throws SQLException, IOException, AuthorizeException
Copyright © 2022 LYRASIS. All rights reserved.