Changeset 1148 for OAIHarvester


Ignore:
Timestamp:
02/25/11 09:08:19 (13 years ago)
Author:
oschonef
Message:
Location:
OAIHarvester/trunk/OAIHarvester/src/main/java/eu/clarin/cmdi/oai/harvester
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • OAIHarvester/trunk/OAIHarvester/src/main/java/eu/clarin/cmdi/oai/harvester/Harvester.java

    r1140 r1148  
    1717            throws HarvesterException;
    1818
    19     public HarvestJob findJob(String id)
     19    public HarvestJob findJob(long id)
    2020            throws HarvesterException;
    2121
    22     public HarvestJob cancelJob(String id)
     22    public HarvestJob cancelJob(long id)
    2323            throws HarvesterException;
    2424
  • OAIHarvester/trunk/OAIHarvester/src/main/java/eu/clarin/cmdi/oai/harvester/impl/AbstractHarvester.java

    r1140 r1148  
    6666
    6767    @Override
    68     public final HarvestJob findJob(String id) throws HarvesterException {
    69         if (id == null) {
    70             throw new NullPointerException("id == null");
    71         }
     68    public final HarvestJob findJob(long id) throws HarvesterException {
    7269        return doFindJob(id);
    7370    }
    7471
    7572    @Override
    76     public final HarvestJob cancelJob(String id) throws HarvesterException {
    77         if (id == null) {
    78             throw new NullPointerException("id == null");
    79         }
     73    public final HarvestJob cancelJob(long id) throws HarvesterException {
    8074        HarvestJob job = doFindJob(id);
    8175        if (job != null) {
     
    10498    abstract void doCancelJob(HarvestJobImpl job) throws HarvesterException;
    10599
    106     protected abstract HarvestJob doFindJob(String id)
     100    protected abstract HarvestJob doFindJob(long id)
    107101        throws HarvesterException;
    108102
  • OAIHarvester/trunk/OAIHarvester/src/main/java/eu/clarin/cmdi/oai/harvester/impl/ParallelHarvester.java

    r1140 r1148  
    108108
    109109    @Override
    110     protected HarvestJob doFindJob(String id) throws HarvesterException {
     110    protected HarvestJob doFindJob(long id) throws HarvesterException {
    111111        for (HarvestJobImpl job : queue) {
    112             if (id.equals(job.getId())) {
     112            if (id == job.getId()) {
    113113                queue.remove(job);
    114114                return job;
  • OAIHarvester/trunk/OAIHarvester/src/main/java/eu/clarin/cmdi/oai/harvester/impl/SimpleHarvester.java

    r1143 r1148  
    7070
    7171    @Override
    72     protected HarvestJob doFindJob(String id) throws HarvesterException {
     72    protected HarvestJob doFindJob(long id) throws HarvesterException {
    7373        throw new HarvesterException("findJob() is not supported");
    7474    }
Note: See TracChangeset for help on using the changeset viewer.