org.dspace.embargo
Class DayTableEmbargoSetter
java.lang.Object
org.dspace.embargo.DefaultEmbargoSetter
org.dspace.embargo.DayTableEmbargoSetter
- All Implemented Interfaces:
- EmbargoSetter
public class DayTableEmbargoSetter
- extends DefaultEmbargoSetter
Plugin implementation of the embargo setting function. The parseTerms()
method performs a look-up to a table that relates a terms expression
to a fixed number of days. Table constructed from a dspace.cfg property
with syntax:
embargo.terms.days = 90 days:90,1 year:365,2 years:730
That is, an arbitrary, comma separated, list of : where
can be any string and must be a positive integer.
All the fields should be defined in a 'value-pairs' element,
and the field configured as the embargo terms should employ a drop-down using
that element in input_forms.xml, if user submission is desired.
- Author:
- Richard Rodgers
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DayTableEmbargoSetter
public DayTableEmbargoSetter()
parseTerms
public DCDate parseTerms(Context context,
Item item,
String terms)
throws SQLException,
AuthorizeException,
IOException
- Parse the terms into a definite date. Only terms expressions processed
are those defined in 'embargo.terms.days' configuration property.
- Specified by:
parseTerms in interface EmbargoSetter- Overrides:
parseTerms in class DefaultEmbargoSetter
- Parameters:
context - the DSpace contextitem - the item to embargoterms - the embargo terms
- Returns:
- parsed date in DCDate format
- Throws:
SQLException
AuthorizeException
IOException
Copyright © 2010 DuraSpace. All Rights Reserved.