Class SchedulerService
- java.lang.Object
-
- org.pentaho.platform.web.http.api.resources.services.SchedulerService
-
public class SchedulerService extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.pentaho.platform.api.scheduler2.IBlockoutManager
blockoutManager
protected FileService
fileService
protected org.pentaho.platform.api.engine.IAuthorizationPolicy
policy
protected org.pentaho.platform.api.repository2.unified.IUnifiedRepository
repository
protected org.pentaho.platform.api.scheduler2.IScheduler
scheduler
protected SessionResource
sessionResource
-
Constructor Summary
Constructors Constructor Description SchedulerService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.pentaho.platform.api.scheduler2.Job
addBlockout(JobScheduleRequest jobScheduleRequest)
protected Boolean
canAdminister()
protected Boolean
canAdminister(org.pentaho.platform.api.engine.IPentahoSession session)
protected org.pentaho.platform.api.scheduler2.IJobTrigger
convertScheduleRequestToJobTrigger(JobScheduleRequest jobScheduleRequest)
org.pentaho.platform.api.scheduler2.Job
createJob(JobScheduleRequest scheduleRequest)
String
doGetCanSchedule()
List<org.pentaho.platform.api.repository2.unified.webservices.RepositoryFileDto>
doGetGeneratedContentForSchedule(String lineageId)
Class<org.pentaho.platform.api.action.IAction>
getAction(String actionClass)
String
getAppendDateFormat(JobScheduleRequest scheduleRequest)
boolean
getAutoCreateUniqueFilename(JobScheduleRequest scheduleRequest)
List<org.pentaho.platform.api.scheduler2.Job>
getBlockOutJobs()
protected org.pentaho.platform.api.scheduler2.IBlockoutManager
getBlockoutManager()
BlockStatusProxy
getBlockStatus(JobScheduleRequest jobScheduleRequest)
protected BlockStatusProxy
getBlockStatusProxy(Boolean totallyBlocked, Boolean partiallyBlocked)
org.pentaho.platform.api.scheduler2.Job
getContentCleanerJob()
protected String
getExtension(String filename)
protected FileService
getFileService()
org.pentaho.platform.api.scheduler2.Job
getJob(String jobId)
org.pentaho.platform.api.scheduler2.IJobFilter
getJobFilter(boolean canAdminister, String principalName)
JobScheduleRequest
getJobInfo()
org.pentaho.platform.api.scheduler2.Job
getJobInfo(String jobId)
List<org.pentaho.platform.api.scheduler2.Job>
getJobs()
protected JobScheduleParam
getJobScheduleParam(String name, long value)
protected JobScheduleParam
getJobScheduleParam(String name, String value)
org.pentaho.platform.api.scheduler2.Job.JobState
getJobState(JobRequest jobRequest)
org.pentaho.platform.api.engine.IAuthorizationPolicy
getPolicy()
org.pentaho.platform.api.repository2.unified.IUnifiedRepository
getRepository()
org.pentaho.platform.api.scheduler2.IScheduler
getScheduler()
protected SchedulerOutputPathResolver
getSchedulerOutputPathResolver(JobScheduleRequest scheduleRequest)
protected org.pentaho.platform.api.engine.ISecurityHelper
getSecurityHelper()
protected org.pentaho.platform.api.engine.IPentahoSession
getSession()
protected SessionResource
getSessionResource()
Gets an instance of SessionResourceString
getState()
protected HashMap<String,Serializable>
handlePDIScheduling(org.pentaho.platform.api.repository2.unified.RepositoryFile file, HashMap<String,Serializable> parameterMap, Map<String,String> pdiParameters)
boolean
hasBlockouts()
protected boolean
isPdiFile(org.pentaho.platform.api.repository2.unified.RepositoryFile file)
boolean
isScheduleAllowed()
boolean
isScheduleAllowed(String id)
String
pause()
org.pentaho.platform.api.scheduler2.Job.JobState
pauseJob(String jobId)
boolean
removeJob(String jobId)
protected String
resolveActionId(String inputFile)
org.pentaho.platform.api.scheduler2.Job.JobState
resumeJob(String jobId)
boolean
shouldFireNow()
String
shutdown()
String
start()
org.pentaho.platform.api.scheduler2.Job
triggerNow(String jobId)
org.pentaho.platform.api.scheduler2.Job
updateBlockout(String jobId, JobScheduleRequest jobScheduleRequest)
org.pentaho.platform.api.scheduler2.Job
updateJob(JobScheduleRequest scheduleRequest)
protected void
updateStartDateForTimeZone(JobScheduleRequest jobScheduleRequest)
boolean
willFire(org.pentaho.platform.api.scheduler2.IJobTrigger trigger)
-
-
-
Field Detail
-
scheduler
protected org.pentaho.platform.api.scheduler2.IScheduler scheduler
-
policy
protected org.pentaho.platform.api.engine.IAuthorizationPolicy policy
-
repository
protected org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository
-
sessionResource
protected SessionResource sessionResource
-
fileService
protected FileService fileService
-
blockoutManager
protected org.pentaho.platform.api.scheduler2.IBlockoutManager blockoutManager
-
-
Method Detail
-
createJob
public org.pentaho.platform.api.scheduler2.Job createJob(JobScheduleRequest scheduleRequest) throws IOException, org.pentaho.platform.api.scheduler2.SchedulerException, IllegalAccessException
- Throws:
IOException
org.pentaho.platform.api.scheduler2.SchedulerException
IllegalAccessException
-
updateJob
public org.pentaho.platform.api.scheduler2.Job updateJob(JobScheduleRequest scheduleRequest) throws IllegalAccessException, IOException, org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
IllegalAccessException
IOException
org.pentaho.platform.api.scheduler2.SchedulerException
-
triggerNow
public org.pentaho.platform.api.scheduler2.Job triggerNow(String jobId) throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
getContentCleanerJob
public org.pentaho.platform.api.scheduler2.Job getContentCleanerJob() throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
doGetGeneratedContentForSchedule
public List<org.pentaho.platform.api.repository2.unified.webservices.RepositoryFileDto> doGetGeneratedContentForSchedule(String lineageId) throws FileNotFoundException
- Parameters:
lineageId
-- Returns:
- Throws:
FileNotFoundException
-
getJob
public org.pentaho.platform.api.scheduler2.Job getJob(String jobId) throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
isScheduleAllowed
public boolean isScheduleAllowed()
-
isScheduleAllowed
public boolean isScheduleAllowed(String id)
-
getJobFilter
public org.pentaho.platform.api.scheduler2.IJobFilter getJobFilter(boolean canAdminister, String principalName)
-
doGetCanSchedule
public String doGetCanSchedule()
-
getState
public String getState() throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
start
public String start() throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
pause
public String pause() throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
shutdown
public String shutdown() throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
pauseJob
public org.pentaho.platform.api.scheduler2.Job.JobState pauseJob(String jobId) throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
resumeJob
public org.pentaho.platform.api.scheduler2.Job.JobState resumeJob(String jobId) throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
removeJob
public boolean removeJob(String jobId) throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
getJobInfo
public org.pentaho.platform.api.scheduler2.Job getJobInfo(String jobId) throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
getBlockOutJobs
public List<org.pentaho.platform.api.scheduler2.Job> getBlockOutJobs()
-
hasBlockouts
public boolean hasBlockouts()
-
willFire
public boolean willFire(org.pentaho.platform.api.scheduler2.IJobTrigger trigger)
-
shouldFireNow
public boolean shouldFireNow()
-
addBlockout
public org.pentaho.platform.api.scheduler2.Job addBlockout(JobScheduleRequest jobScheduleRequest) throws IOException, IllegalAccessException, org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
IOException
IllegalAccessException
org.pentaho.platform.api.scheduler2.SchedulerException
-
getJobScheduleParam
protected JobScheduleParam getJobScheduleParam(String name, String value)
-
getJobScheduleParam
protected JobScheduleParam getJobScheduleParam(String name, long value)
-
updateStartDateForTimeZone
protected void updateStartDateForTimeZone(JobScheduleRequest jobScheduleRequest)
-
updateBlockout
public org.pentaho.platform.api.scheduler2.Job updateBlockout(String jobId, JobScheduleRequest jobScheduleRequest) throws IllegalAccessException, org.pentaho.platform.api.scheduler2.SchedulerException, IOException
- Throws:
IllegalAccessException
org.pentaho.platform.api.scheduler2.SchedulerException
IOException
-
getBlockStatus
public BlockStatusProxy getBlockStatus(JobScheduleRequest jobScheduleRequest) throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
getBlockStatusProxy
protected BlockStatusProxy getBlockStatusProxy(Boolean totallyBlocked, Boolean partiallyBlocked)
-
convertScheduleRequestToJobTrigger
protected org.pentaho.platform.api.scheduler2.IJobTrigger convertScheduleRequestToJobTrigger(JobScheduleRequest jobScheduleRequest) throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
getJobInfo
public JobScheduleRequest getJobInfo()
-
getJobState
public org.pentaho.platform.api.scheduler2.Job.JobState getJobState(JobRequest jobRequest) throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
getSession
protected org.pentaho.platform.api.engine.IPentahoSession getSession()
-
getAction
public Class<org.pentaho.platform.api.action.IAction> getAction(String actionClass) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
getRepository
public org.pentaho.platform.api.repository2.unified.IUnifiedRepository getRepository()
-
getScheduler
public org.pentaho.platform.api.scheduler2.IScheduler getScheduler()
-
getPolicy
public org.pentaho.platform.api.engine.IAuthorizationPolicy getPolicy()
-
getSchedulerOutputPathResolver
protected SchedulerOutputPathResolver getSchedulerOutputPathResolver(JobScheduleRequest scheduleRequest)
-
isPdiFile
protected boolean isPdiFile(org.pentaho.platform.api.repository2.unified.RepositoryFile file)
-
handlePDIScheduling
protected HashMap<String,Serializable> handlePDIScheduling(org.pentaho.platform.api.repository2.unified.RepositoryFile file, HashMap<String,Serializable> parameterMap, Map<String,String> pdiParameters)
-
getAutoCreateUniqueFilename
public boolean getAutoCreateUniqueFilename(JobScheduleRequest scheduleRequest)
-
getAppendDateFormat
public String getAppendDateFormat(JobScheduleRequest scheduleRequest)
-
getJobs
public List<org.pentaho.platform.api.scheduler2.Job> getJobs() throws org.pentaho.platform.api.scheduler2.SchedulerException
- Throws:
org.pentaho.platform.api.scheduler2.SchedulerException
-
canAdminister
protected Boolean canAdminister()
-
canAdminister
protected Boolean canAdminister(org.pentaho.platform.api.engine.IPentahoSession session)
-
getSessionResource
protected SessionResource getSessionResource()
Gets an instance of SessionResource- Returns:
SessionResource
-
getFileService
protected FileService getFileService()
-
getBlockoutManager
protected org.pentaho.platform.api.scheduler2.IBlockoutManager getBlockoutManager()
-
getSecurityHelper
protected org.pentaho.platform.api.engine.ISecurityHelper getSecurityHelper()
-
-