public class HarvestedCollectionServiceImpl extends Object implements HarvestedCollectionService
| Modifier and Type | Field and Description |
|---|---|
protected HarvestedCollectionDAO |
harvestedCollectionDAO |
| Modifier | Constructor and Description |
|---|---|
protected |
HarvestedCollectionServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
HarvestedCollection |
create(Context context,
Collection collection)
Create a new harvest instance row for a specified collection.
|
void |
delete(Context context,
HarvestedCollection harvestedCollection) |
boolean |
exists(Context context) |
HarvestedCollection |
find(Context context,
Collection collection)
Find the harvest settings corresponding to this collection
|
List<HarvestedCollection> |
findAll(Context context)
Find all collections that are set up for harvesting
|
List<HarvestedCollection> |
findByStatus(Context context,
int status)
Find all collections with the specified status flag.
|
HarvestedCollection |
findNewestHarvest(Context context)
Find the collection that was harvested most recently.
|
HarvestedCollection |
findOldestHarvest(Context context)
Find the collection that was harvested the longest time ago.
|
List<HarvestedCollection> |
findReady(Context context)
Find all collections that are ready for harvesting
|
boolean |
isHarvestable(Context context,
Collection collection)
Returns whether the specified collection is harvestable, i.e.
|
boolean |
isHarvestable(HarvestedCollection harvestedCollection)
Returns whether this harvest instance is actually harvestable, i.e.
|
boolean |
isReady(Context context,
Collection collection)
Returns whether the specified collection is ready for immediate harvest.
|
boolean |
isReady(HarvestedCollection harvestedCollection)
Returns whether the specified collection is ready for immediate harvest.
|
void |
update(Context context,
HarvestedCollection harvestedCollection) |
@Autowired(required=true) protected HarvestedCollectionDAO harvestedCollectionDAO
public HarvestedCollection find(Context context, Collection collection) throws SQLException
HarvestedCollectionServicefind in interface HarvestedCollectionServicecontext - The relevant DSpace Context.collection - target collectionSQLException - if database errorpublic HarvestedCollection create(Context context, Collection collection) throws SQLException
HarvestedCollectionServicecreate in interface HarvestedCollectionServicecontext - The relevant DSpace Context.collection - target collectionSQLException - if database errorpublic boolean isHarvestable(Context context, Collection collection) throws SQLException
HarvestedCollectionServiceisHarvestable in interface HarvestedCollectionServicecontext - The relevant DSpace Context.collection - target collectionSQLException - if database errorpublic boolean isHarvestable(HarvestedCollection harvestedCollection) throws SQLException
HarvestedCollectionServiceisHarvestable in interface HarvestedCollectionServiceharvestedCollection - collection to be harvestedSQLException - if database errorpublic boolean isReady(Context context, Collection collection) throws SQLException
HarvestedCollectionServiceisReady in interface HarvestedCollectionServicecontext - The relevant DSpace Context.collection - collection to be harvestedSQLException - if database errorpublic boolean isReady(HarvestedCollection harvestedCollection) throws SQLException
HarvestedCollectionServiceisReady in interface HarvestedCollectionServiceharvestedCollection - collection to be harvestedSQLException - if database errorpublic List<HarvestedCollection> findAll(Context context) throws SQLException
HarvestedCollectionServicefindAll in interface HarvestedCollectionServicecontext - The relevant DSpace Context.SQLException - if database errorpublic List<HarvestedCollection> findReady(Context context) throws SQLException
HarvestedCollectionServicefindReady in interface HarvestedCollectionServicecontext - The relevant DSpace Context.SQLException - if database errorpublic List<HarvestedCollection> findByStatus(Context context, int status) throws SQLException
HarvestedCollectionServicefindByStatus in interface HarvestedCollectionServicecontext - The relevant DSpace Context.status - see HarvestInstance.STATUS_...SQLException - if database errorpublic HarvestedCollection findOldestHarvest(Context context) throws SQLException
HarvestedCollectionServicefindOldestHarvest in interface HarvestedCollectionServicecontext - The relevant DSpace Context.SQLException - if database errorpublic HarvestedCollection findNewestHarvest(Context context) throws SQLException
HarvestedCollectionServicefindNewestHarvest in interface HarvestedCollectionServicecontext - The relevant DSpace Context.SQLException - if database errorpublic void delete(Context context, HarvestedCollection harvestedCollection) throws SQLException
delete in interface HarvestedCollectionServiceSQLExceptionpublic void update(Context context, HarvestedCollection harvestedCollection) throws SQLException
update in interface HarvestedCollectionServiceSQLExceptionpublic boolean exists(Context context) throws SQLException
exists in interface HarvestedCollectionServiceSQLExceptionCopyright © 2019 DuraSpace. All rights reserved.