public class DefaultEmbargoSetter extends Object implements EmbargoSetter
| Modifier and Type | Field and Description |
|---|---|
protected AuthorizeService |
authorizeService |
protected ResourcePolicyService |
resourcePolicyService |
| Constructor and Description |
|---|
DefaultEmbargoSetter() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkEmbargo(Context context,
Item item)
Check that embargo is properly set on Item: no read access to bitstreams.
|
protected void |
generatePolicies(Context context,
Date embargoDate,
String reason,
DSpaceObject dso,
Collection owningCollection) |
DCDate |
parseTerms(Context context,
Item item,
String terms)
Parse the terms into a definite date.
|
void |
setEmbargo(Context context,
Item item)
Enforce embargo by turning off all read access to bitstreams in
this Item.
|
protected AuthorizeService authorizeService
protected ResourcePolicyService resourcePolicyService
public DCDate parseTerms(Context context, Item item, String terms) throws SQLException, AuthorizeException
parseTerms in interface EmbargoSettercontext - the DSpace contextitem - the item to embargoterms - the embargo termsSQLExceptionAuthorizeExceptionpublic void setEmbargo(Context context, Item item) throws SQLException, AuthorizeException
setEmbargo in interface EmbargoSettercontext - the DSpace contextitem - the item to embargoSQLExceptionAuthorizeExceptionprotected void generatePolicies(Context context, Date embargoDate, String reason, DSpaceObject dso, Collection owningCollection) throws SQLException, AuthorizeException
SQLExceptionAuthorizeExceptionpublic void checkEmbargo(Context context, Item item) throws SQLException, AuthorizeException, IOException
checkEmbargo in interface EmbargoSettercontext - the DSpace contextitem - the item to embargoSQLExceptionAuthorizeExceptionIOExceptionCopyright © 2022 LYRASIS. All rights reserved.