Package com.ads.services.webservice

# Class SchedulerService

java.lang.Object
com.ads.services.webservice.SchedulerService

public class SchedulerService extends Object
Contains the methods related to perform the operations such as creation, update, deletion and retrieval of Scheduler Jobs.
All the WebServices methods have return type String - meaning if the method is execution is successful, then it will return a string in the form of JSON or XML String based on the outputFormat parameter given by the user.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SchedulerService()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `clearJobs(String userName, String password, String outputFormat, String objectType, long objectId)`
  Clears the Jobs for the specified objectType and objectId.Specifying the objectType and objectId are mandatory to clear the Jobs
  If the Jobs are deleted all its associated data will also be deleted.
  `String`
  `clearJobsByJobType(String userName, String password, String outputFormat, String objectType, long objectId, String jobType)`
  Clears the Jobs for the specified objectType, objectId and jobType Specifying the objectType,objectId and jobType are mandatory to clear the Jobs
  If the Jobs are deleted all its associated data will also be deleted.
  `String`
  `createJob(String userName, String password, String outputFormat, String jobDetails)`
  Creates the Job for the JobDetails i.e in the form of JSON.
  `String`
  `createJobs(String userName, String password, String outputFormat, String jobsDetails)`
  Creates the list of Jobs for the given List Objects i.e in the form of JSONArray.
  `String`
  `deleteJob(String userName, String password, String outputFormat, String objectType, String jobName)`
  Deletes the Job with the specified objectType and jobName.Specifying the objectType and jobName are mandatory to delete a particular Job
  If the Job is deleted all its associated data will also be deleted.
  `String`
  `getJob(String userName, String password, String outputFormat, String objectType, String jobName)`
  Returns the schedulerJob object for the specified objectType and jobName.Specifying the objectType and jobName are mandatory.
  `String`
  `getJobs(String userName, String password, String outputFormat, String objectType, long objectId)`
  Returns the List objects for the specified objectType and objectId.
  `String`
  `getJobsByJobType(String userName, String password, String outputFormat, String objectType, long objectId, String jobType)`
  Returns the List objects for the specified objectType , objectId, and jobType.
  `String`
  `updateJob(String userName, String password, String outputFormat, String jobDetails)`
  Updates the Job with the specified JobDetails Object i.e in the form of JSON.All the information pertaining to the Job can be updated.
  `String`
  `updateJobs(String userName, String password, String outputFormat, String jobsDetails)`
  Updates the list of Jobs for the given List Objects i.e in the form of JSONArray.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SchedulerService

    public SchedulerService()

- ## Method Details

  - ### createJob

    public String createJob(String userName, String password, String outputFormat, String jobDetails)
    Creates the Job for the JobDetails i.e in the form of JSON. Specifying the jobName, objectId, objectType, interval and jobType are mandatory, while creating the Job.
    Specification of the outputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String- Valid values: JSON or XML
      `jobDetails` - String
    Returns:
      String - If Job is created successfully, it will return RequestStatus Object consisting of Request success flag, status message and userObject etc... in the form of JSON or XML String.

      Sample 'JobDetails' JSON :
      {
      "objectId": "",
      "objectType": "",
      "jobName": "",
      "jobType": "METADATA_ELN",
      "scheduledDateTime": "",
      "lastScheduledRunDateTime": "",
      "nextScheduledRunDateTime": "",
      "jobOptions": { "catalogSelection": {"": [] }, "splitter": "_" }, "interval": "ONCE",
      "notify": "",
      "userId": "",
      "emailId": "",
      "ccList": "",
      "auditHistory": {}
      }

    Since:
      10.1

  - ### createJobs

    public String createJobs(String userName, String password, String outputFormat, String jobsDetails)
    Creates the list of Jobs for the given List Objects i.e in the form of JSONArray. Specifying the jobName, objectId, objectType, interval and jobType are mandatory. There should no duplicate jobNames in the given list against the same objectId while creatingSchedulerJobs.
    Specification of the outputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String - Valid values: JSON or XML
      `jobsDetails` - String
    Returns:
      String If Jobs are created successfully, it will return RequestStatus Object consisting of Request success flag, status message and userObject etc... in the form of JSON or XML String.
    Since:
      10.1

      Sample 'JobsDetailsJsonArray' JSON : *
      [{
      "objectId": "",
      "objectType": "",
      "jobName": "",
      "jobType": "METADATA_ELN",
      "scheduledDateTime": "",
      "lastScheduledRunDateTime": "",
      "nextScheduledRunDateTime": "",
      "jobOptions": { "catalogSelection": {"": [] }, "splitter": "_" }, "interval": "ONCE",
      "notify": "",
      "userId": "",
      "emailId": "",
      "ccList": "",
      "auditHistory": {}
      },
      {
      "objectId": "",
      "objectType": "",
      "jobName": "",
      "jobType": "METADATA_ELN",
      "scheduledDateTime": "",
      "lastScheduledRunDateTime": "",
      "nextScheduledRunDateTime": "",
      "jobOptions": { "catalogSelection": {"": [] }, "splitter": "_" }, "interval": "ONCE",
      "notify": "",
      "userId": "",
      "emailId": "",
      "ccList": "",
      "auditHistory": {}
      }]

  - ### updateJob

    public String updateJob(String userName, String password, String outputFormat, String jobDetails)
    Updates the Job with the specified JobDetails Object i.e in the form of JSON.All the information pertaining to the Job can be updated. Specifying the jobName, objectId, objectType and jobType are mandatory to update the Job.
    Specification of the outputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String - Valid values: JSON or XML
      `jobDetails` - String
    Returns:
      String If Job is updated successfully, it will return RequestStatus Object consisting of request success flag, status message and userObject etc... in the form of JSON or XML String.

      Sample 'sJobDetailsObjJson' JSON : *
      {
      "objectId": "",
      "objectType": "",
      "jobName": "",
      "jobType": "METADATA_ELN",
      "scheduledDateTime": "",
      "lastScheduledRunDateTime": "",
      "nextScheduledRunDateTime": "",
      "jobOptions": { "catalogSelection": {"": [] }, "splitter": "_" }, "interval": "ONCE",
      "notify": "",
      "userId": "",
      "emailId": "",
      "ccList": "",
      "auditHistory": {}
      }

    Since:
      10.1

  - ### updateJobs

    public String updateJobs(String userName, String password, String outputFormat, String jobsDetails)
    Updates the list of Jobs for the given List Objects i.e in the form of JSONArray. All the information pertaining to the Jobs can be updated. Specifying the jobName, objectId, objectType and jobType are mandatory to update the Jobs. There should no duplicate jobNames in the given list against the same objectId while updating Jobs.
    Specification of the outputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String - Valid values: JSON or XML
      `jobsDetails` - String
    Returns:
      String - If Jobs are updated successfully, it will return RequestStatus Object consisting of request success flag, status message and userObject etc... in the form of JSON or XML String.

      Sample 'schedulerJobObjsJsonArray' JSON : *
      [{
      "objectId": "",
      "objectType": "",
      "jobName": "",
      "jobType": "METADATA_ELN",
      "scheduledDateTime": "",
      "lastScheduledRunDateTime": "",
      "nextScheduledRunDateTime": "",
      "jobOptions": { "catalogSelection": {"": [] }, "splitter": "_" }, "interval": "ONCE",
      "notify": "",
      "userId": "",
      "emailId": "",
      "ccList": "",
      "auditHistory": {}
      },
      {
      "objectId": "",
      "objectType": "",
      "jobName": "",
      "jobType": "METADATA_ELN",
      "scheduledDateTime": "",
      "lastScheduledRunDateTime": "",
      "nextScheduledRunDateTime": "",
      "jobOptions": { "catalogSelection": {"": [] }, "splitter": "_" }, "interval": "ONCE",
      "notify": "",
      "userId": "",
      "emailId": "",
      "ccList": "",
      "auditHistory": {}
      }]

    Since:
      10.1

  - ### getJob

    public String getJob(String userName, String password, String outputFormat, String objectType, String jobName)
    Returns the schedulerJob object for the specified objectType and jobName.Specifying the objectType and jobName are mandatory.
    It returns all the details like JobName, JobGroup, Description, JobClassName and JobData etc..
    Specification of the outputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String - Valid values: JSON or XML
      `objectType` - String
      `jobName` - String
    Returns:
      String
    Since:
      10.1

  - ### getJobs

    public String getJobs(String userName, String password, String outputFormat, String objectType, long objectId)
    Returns the List objects for the specified objectType and objectId. Specifying the objectType and objectId are mandatory.
    It returns List of SchedulerJob objects containing the details like JobName, JobGroup, Description, JobClassName and JobData.
    Specification of the outputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String - Valid values: JSON or XML
      `objectType` - String
      `objectId` - String
    Returns:
      String
    Since:
      10.1

  - ### getJobsByJobType

    public String getJobsByJobType(String userName, String password, String outputFormat, String objectType, long objectId, String jobType)
    Returns the List objects for the specified objectType , objectId, and jobType. Specifying the objectType, objectId and jobType are mandatory.
    It returns List of SchedulerJob objects containing the details like JobName, JobGroup, Description, JobClassName and JobData.
    Specification of the outputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String - Valid values: JSON or XML
      `objectType` - String
      `objectId` - long
      `jobType` - String - Valid type: String METADATA_ELN
    Returns:
      String
    Since:
      10.1

  - ### deleteJob

    public String deleteJob(String userName, String password, String outputFormat, String objectType, String jobName)
    Deletes the Job with the specified objectType and jobName.Specifying the objectType and jobName are mandatory to delete a particular Job
    If the Job is deleted all its associated data will also be deleted.
    Specification of the outputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String - Valid values: JSON or XML
      `objectType` - String
      `jobName` - String
    Returns:
      String - If the job is deleted successfully, it will return RequestStatus Object consisting of Request success flag, status message in the form of JSON or XML String.
    Since:
      10.1

  - ### clearJobs

    public String clearJobs(String userName, String password, String outputFormat, String objectType, long objectId)
    Clears the Jobs for the specified objectType and objectId.Specifying the objectType and objectId are mandatory to clear the Jobs
    If the Jobs are deleted all its associated data will also be deleted.
    Specification of the outputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String - Valid values: JSON or XML
      `objectType` - String
      `objectId` - long
    Returns:
      String - If the jobs are deleted successfully, it will return RequestStatus Object consisting of Request success flag, status message in the form of JSON or XML String.
    Since:
      10.1

  - ### clearJobsByJobType

    public String clearJobsByJobType(String userName, String password, String outputFormat, String objectType, long objectId, String jobType)
    Clears the Jobs for the specified objectType, objectId and jobType Specifying the objectType,objectId and jobType are mandatory to clear the Jobs
    If the Jobs are deleted all its associated data will also be deleted.
    Specification of the outputFormat can be either JSON or XML. If outputFormat is not specified, by default the method will return the JSON String.
    Parameters:
      `userName` - String
      `password` - String
      `outputFormat` - String - Valid values: JSON or XML
      `objectType` - String
      `objectId` - long
      `jobType` - String - Valid type: String METADATA_ELN
    Returns:
      String - If the jobs are deleted successfully, it will return RequestStatus Object consisting of Request success flag, status message in the form of JSON or XML String.
    Since:
      10.1