public interface EmbargoSetter
| Modifier and Type | Method and Description |
|---|---|
void |
checkEmbargo(Context context,
Item item)
Check that embargo is properly set on Item.
|
DCDate |
parseTerms(Context context,
Item item,
java.lang.String terms)
Get lift date of embargo from the "terms" supplied in the
metadata (or other available state) of this Item.
|
void |
setEmbargo(Context context,
Item item)
Enforce embargo by (for example) turning off all read access to
bitstreams in this Item.
|
DCDate parseTerms(Context context, Item item, java.lang.String terms) throws java.sql.SQLException, AuthorizeException, java.io.IOException
Note that the value (if any) of the metadata field configured to contain embargo terms is passed explicitly, but this method is free to explore other metadata fields, and even Bitstream contents, to determine the embargo status and lift date.
Expect this method to be called at the moment before the Item is installed into the archive (i.e. after workflow). This may be significant if the embargo lift date is computed relative to the present.
context - the DSpace contextitem - the item to embargoterms - value of the metadata field configured as embargo terms, if any.java.sql.SQLExceptionAuthorizeExceptionjava.io.IOExceptionvoid setEmbargo(Context context, Item item) throws java.sql.SQLException, AuthorizeException, java.io.IOException
context - the DSpace contextitem - the item to embargojava.sql.SQLExceptionAuthorizeExceptionjava.io.IOExceptionvoid checkEmbargo(Context context, Item item) throws java.sql.SQLException, AuthorizeException, java.io.IOException
context - the DSpace contextitem - the item to embargojava.sql.SQLExceptionAuthorizeExceptionjava.io.IOExceptionCopyright © 2018 DuraSpace. All Rights Reserved.