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 termsSQLException - An exception that provides information on a database access error or other errors.AuthorizeException - Exception indicating the current user of the context does not have permission
to perform a particular action.public void setEmbargo(Context context, Item item) throws SQLException, AuthorizeException
setEmbargo in interface EmbargoSettercontext - the DSpace contextitem - the item to embargoSQLException - An exception that provides information on a database access error or other errors.AuthorizeException - Exception indicating the current user of the context does not have permission
to perform a particular action.protected 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 embargoSQLException - An exception that provides information on a database access error or other errors.AuthorizeException - Exception indicating the current user of the context does not have permission
to perform a particular action.IOException - A general class of exceptions produced by failed or interrupted I/O operations.Copyright © 2019 DuraSpace. All rights reserved.