Esri Geoportal Server
1.0

com.esri.gpt.catalog.harvest.jobs
Class HjCreateRequest

java.lang.Object
  extended by com.esri.gpt.framework.sql.BaseDao
      extended by com.esri.gpt.framework.request.DaoRequest<RequestDefinition<HjCriteria,HjResult>>
          extended by com.esri.gpt.catalog.harvest.jobs.HjRequest
              extended by com.esri.gpt.catalog.harvest.jobs.HjCreateRequest
All Implemented Interfaces:
IRequest<RequestDefinition<HjCriteria,HjResult>>

public class HjCreateRequest
extends HjRequest

Create job request. This request will insert new harvesting job. A job will not be created if any other job already exist for the specific repository or repository doesn't exist.


Constructor Summary
HjCreateRequest(RequestContext requestContext, HrRecord parent, CommonCriteria criteria, boolean running)
          Creates instance of the request.
 
Method Summary
 boolean execute()
          Inserts a new jobs into the database.
 HjRecord.JobStatus getJobStatus()
          Gets job status.
 void setJobStatus(HjRecord.JobStatus jobStatus)
          Sets job status.
 
Methods inherited from class com.esri.gpt.catalog.harvest.jobs.HjRequest
getActionCriteria, getActionResult, getHarvestingHistoryTableName, getHarvestingJobsCompletedTableName, getHarvestingJobsPendingTableName, getHarvestingTableName, getQueryCriteria, getQueryResult
 
Methods inherited from class com.esri.gpt.framework.request.DaoRequest
getRequestDefinition, setRequestDefinition
 
Methods inherited from class com.esri.gpt.framework.sql.BaseDao
appendExpression, appendValueFilter, closeResultSet, closeStatement, getApplicationConfiguration, getRequestContext, logExpression, returnConnection, setRequestContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HjCreateRequest

public HjCreateRequest(RequestContext requestContext,
                       HrRecord parent,
                       CommonCriteria criteria,
                       boolean running)
Creates instance of the request.

Parameters:
requestContext - request context
parent - parent harvest site
running - true to make job marked as running
Method Detail

getJobStatus

public HjRecord.JobStatus getJobStatus()
Gets job status.

Returns:
job status.

setJobStatus

public final void setJobStatus(HjRecord.JobStatus jobStatus)
Sets job status.

Parameters:
jobStatus - job status

execute

public boolean execute()
Inserts a new jobs into the database. If there is any job for the particular repository, no record will be inserted.

Returns:
true if any record has been inserted

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.