Class ReportingJob

java.lang.Object
org.netxms.client.reporting.ReportingJob

public class ReportingJob extends Object
Reporting job
  • Constructor Details

    • ReportingJob

      public ReportingJob(ReportDefinition report)
      Create reporting job
      Parameters:
      report - report definition object
    • ReportingJob

      public ReportingJob(NXCPMessage msg, long baseId)
      Create reporting job object from NXCP message
      Parameters:
      msg - NXCP message
      baseId - base field id
  • Method Details

    • fillMessage

      public void fillMessage(NXCPMessage msg) throws NXCException
      Fill NXCP message with job data. Will serialize execution parameters and update underlying scheduled task.
      Parameters:
      msg - NXCP message
      Throws:
      NXCException - if execution parameters serialization fails
    • getRenderFormat

      public ReportRenderFormat getRenderFormat()
      Returns:
      the renderFormat
    • setRenderFormat

      public void setRenderFormat(ReportRenderFormat renderFormat)
      Parameters:
      renderFormat - the renderFormat to set
    • getEmailRecipients

      public List<String> getEmailRecipients()
      Returns:
      the emailRecipients
    • setEmailRecipients

      public void setEmailRecipients(List<String> emailRecipients)
      Parameters:
      emailRecipients - the emailRecipients to set
    • getReportId

      public UUID getReportId()
      Get unique report ID
      Returns:
      unique report ID
    • isNotifyOnCompletion

      public boolean isNotifyOnCompletion()
      Check if notification on completion is on
      Returns:
      true if notification on completion is on
    • setNotifyOnCompletion

      public void setNotifyOnCompletion(boolean notifyOnCompletion)
      Set notification on completion flag
      Parameters:
      notifyOnCompletion - new notification on completion flag
    • getExecutionParameters

      public Map<String,String> getExecutionParameters()
      Get all reporting job execution parameters. Any changes to returned map will be reflected in job object.
      Returns:
      all reporting job execution parameters
    • getExecutionParameter

      public String getExecutionParameter(String name)
      Get value of single reporting job execution parameter.
      Parameters:
      name - parameter name
      Returns:
      parameter value or null
    • setExecutionParameter

      public void setExecutionParameter(String name, String value)
      Set reporting job execution parameter.
      Parameters:
      name - parameter name
      value - parameter value
    • prepareTask

      public ScheduledTask prepareTask() throws Exception
      Prepare underlying scheduled task for create or update API call.
      Returns:
      underlying scheduled task
      Throws:
      Exception - if task parameter serialization fails
    • getTask

      public ScheduledTask getTask()
      Get underlying scheduled task
      Returns:
      underlying scheduled task