Class SchedulerUtil
RequestStatus as return type methods will result in being returned as either true or false as its status.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ads.api.util.BaseUtil
com.ads.api.util.BaseUtil.TokenType -
Field Summary
Fields inherited from class com.ads.api.util.BaseUtil
AUTH_TOKEN, AUTH_TOKEN_TYPE -
Method Summary
Modifier and TypeMethodDescriptionClears 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.clearJobs(String objectType, long objectId, APIConstants.JOBType 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.clearJobsAs(String objectType, long objectId, String outputFormat) Deletes the Jobs for the specified objectType and objectId.Specifying the objectType and objectId are mandatory to delete Jobs
If the Jobs are deleted all its associated data will also be deleted.clearJobsByJobTypeAs(String objectType, long objectId, String jobType, String outputFormat) Deletes the Jobs for the specified objectType, objectId and jobType Specifying the objectType,objectId and jobType are mandatory to delete Jobs
If the Jobs are deleted all its associated data will also be deleted.createJob(SchedulerJob schedulerJob) Creates the Job for the given schedulerJob Object.createJobAs(String jobDetails, String outputFormat) Creates the Job for the given jobDetails Object i.e in the form of JSON.createJobs(List<SchedulerJob> schedulerJobs) Creates the list of Jobs for the given ListObjects. createJobsAs(String jobsDetails, String outputFormat) Creates the list of Jobs for the given ListObjects i.e in the form of JSONArray. 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.deleteJobAs(String objectType, String jobName, String outputFormat) 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.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.Returns the schedulerJob object for the specified objectType and jobName.Specifying the objectType and jobName are mandatory.Returns the Listobjects for the specified objectType and objectId. getJobs(String objectType, long objectId, APIConstants.JOBType jobType) Returns the Listobjects for the specified objectType , objectId, and jobType. Returns the Listobjects for the specified objectType and objectId. Returns the Listobjects for the specified objectType, objectId, and jobType. updateJob(SchedulerJob schedulerJob) Updates the Job with the specified schedulerJob Object.All the information pertaining to the Job can be updated.updateJobAs(String jobDetails, String outputFormat) 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.updateJobs(List<SchedulerJob> schedulerJobs) Updates the list of Jobs for the given ListObjects. updateJobsAs(String jobsDetails, String outputFormat) Updates the list of Jobs for the given ListObjects i.e in the form of JSONArray. Methods inherited from class com.ads.api.util.BaseUtil
getAccessToken, getAccessTokenType, getTokenType, getUserDetails, permissionDeniedMessage, permissionDeniedStatus, setAccessToken, setAccessTokenType
-
Method Details
-
createJob
Creates the Job for the given schedulerJob Object. Specifying the JobName is mandatory, while creating the SchedulerJob.
If schedulerJob is created successfully, RequestStatus.isRequestSuccess() will return true otherwise false.- Parameters:
schedulerJob- SchedulerJob- Returns:
- RequestStatus object
- Throws:
Exception- Since:
- 10.1
-
createJobs
public RequestStatus createJobs(List<SchedulerJob> schedulerJobs) throws com.ads.api.exceptions.DAOException Creates the list of Jobs for the given ListObjects. Specifying the JobName is mandatory and there should no duplicate jobNames in the given list while creating the SchedulerJobs.
If the jobs are created successfully, RequestStatus.isRequestSuccess() will return true otherwise false.- Parameters:
schedulerJobs- list- Returns:
- RequestStatus object
- Throws:
com.ads.api.exceptions.DAOException- Since:
- 10.1
-
updateJob
public RequestStatus updateJob(SchedulerJob schedulerJob) throws com.ads.api.exceptions.DAOException Updates the Job with the specified schedulerJob Object.All the information pertaining to the Job can be updated. Specifying the JobName and ObjectType, are mandatory to update the Job.
If Job details are updated successfully, RequestStatus.isRequestSuccess() will return true otherwise false.- Parameters:
schedulerJob- SchedulerJob Object- Returns:
- RequestStatus object
- Throws:
com.ads.api.exceptions.DAOException- Since:
- 10.1
-
updateJobs
public RequestStatus updateJobs(List<SchedulerJob> schedulerJobs) throws com.ads.api.exceptions.DAOException Updates the list of Jobs for the given ListObjects. All the information pertaining to the Job can be updated. Specifying the JobName and ObjectType, are mandatory to update the Jobs.
If Job details are updated successfully, RequestStatus.isRequestSuccess() will return true otherwise false.- Parameters:
schedulerJobs- list- Returns:
- RequestStatus object
- Throws:
com.ads.api.exceptions.DAOException- Since:
- 10.1
-
getJob
public SchedulerJob getJob(String objectType, String jobName) throws com.ads.api.exceptions.DAOException 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.- Parameters:
objectType- StringjobName- String- Returns:
- SchedulerJob Object
- Throws:
com.ads.api.exceptions.DAOException- Since:
- 10.1
-
getJobs
public List<SchedulerJob> getJobs(String objectType, long objectId) throws com.ads.api.exceptions.DAOException Returns the Listobjects 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.- Parameters:
objectType- StringobjectId- long- Returns:
- List
Objects - Throws:
com.ads.api.exceptions.DAOException- Since:
- 10.1
-
getJobs
public List<SchedulerJob> getJobs(String objectType, long objectId, APIConstants.JOBType jobType) throws com.ads.api.exceptions.DAOException Returns the Listobjects 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.- Parameters:
objectType- StringobjectId- longjobType- JOBType- Returns:
- List
Objects - Throws:
com.ads.api.exceptions.DAOException- Since:
- 10.1
-
deleteJob
public RequestStatus deleteJob(String objectType, String jobName) throws com.ads.api.exceptions.DAOException 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.
If Job is deleted successfully, RequestStatus.isRequestSuccess() will return true otherwise false.- Parameters:
objectType- StringjobName- String- Returns:
- RequestStatus object
- Throws:
com.ads.api.exceptions.DAOException- Since:
- 10.1
-
clearJobs
public RequestStatus clearJobs(String objectType, long objectId) throws com.ads.api.exceptions.DAOException 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.
If Jobs are deleted successfully, RequestStatus.isRequestSuccess() will return true otherwise false.- Parameters:
objectType- StringobjectId- long- Returns:
- RequestStatus object
- Throws:
com.ads.api.exceptions.DAOException- Since:
- 10.1
-
clearJobs
public RequestStatus clearJobs(String objectType, long objectId, APIConstants.JOBType jobType) throws com.ads.api.exceptions.DAOException 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.
If Jobs are deleted successfully, RequestStatus.isRequestSuccess() will return true otherwise false.- Parameters:
objectType- StringobjectId- longjobType- JOBType- Returns:
- RequestStatus object
- Throws:
com.ads.api.exceptions.DAOException- Since:
- 10.1
-
createJobAs
Creates the Job for the given jobDetails Object i.e in the form of JSON. Specifying the jobName, objectId, objectType 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:
jobDetails- StringoutputFormat- 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 'jobDetailsObjJson' JSON : *
{
"objectId": "",
"objectType": "",
"jobName": "",
"jobType": "",
"scheduledDateTime": "",
"lastScheduledRunDateTime": "",
"nextScheduledRunDateTime": "",
"jobOptions": { "catalogSelection": {"": [] }, "splitter": "_" }, "interval": "ONCE",
"notify": "",
"userId": "",
"emailId": "",
"ccList": "",
"auditHistory": {}
} - Since:
- 10.1
-
createJobsAs
Creates the list of Jobs for the given ListObjects i.e in the form of JSONArray. Specifying the jobName,objectId, objectType 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:
jobsDetails- StringoutputFormat- 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.
Sample 'jobsDetailsObjsJsonArray' JSON : *
[{
"objectId": "",
"objectType": "",
"jobName": "",
"jobType": "",
"scheduledDateTime": "",
"lastScheduledRunDateTime": "",
"nextScheduledRunDateTime": "",
"jobOptions": { "catalogSelection": {"": [] }, "splitter": "_" }, "interval": "ONCE",
"notify": "",
"userId": "",
"emailId": "",
"ccList": "",
"auditHistory": {}
},
{
"objectId": "",
"objectType": "",
"jobName": "",
"jobType": "",
"scheduledDateTime": "",
"lastScheduledRunDateTime": "",
"nextScheduledRunDateTime": "",
"jobOptions": { "catalogSelection": {"": [] }, "splitter": "_" }, "interval": "ONCE",
"notify": "",
"userId": "",
"emailId": "",
"ccList": "",
"auditHistory": {}
}] - Since:
- 10.1
-
updateJobAs
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:
jobDetails- StringoutputFormat- 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 'jobDetailsObjJson' JSON : *
{
"objectId": "",
"objectType": "",
"jobName": "",
"jobType": "",
"scheduledDateTime": "",
"lastScheduledRunDateTime": "",
"nextScheduledRunDateTime": "",
"jobOptions": { "catalogSelection": {"": [] }, "splitter": "_" }, "interval": "ONCE",
"notify": "",
"userId": "",
"emailId": "",
"ccList": "",
"auditHistory": {}
} - Since:
- 10.1
-
updateJobsAs
Updates the list of Jobs for the given ListObjects i.e in the form of JSONArray. All the information pertaining to the Job 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.
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:
jobsDetails- StringoutputFormat- 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 'jobsDetailsObjsJsonArray' JSON : *
[{
"objectId": "",
"objectType": "",
"jobName": "",
"jobType": "",
"scheduledDateTime": "",
"lastScheduledRunDateTime": "",
"nextScheduledRunDateTime": "",
"jobOptions": { "catalogSelection": {"": [] }, "splitter": "_" }, "interval": "ONCE",
"notify": "",
"userId": "",
"emailId": "",
"ccList": "",
"auditHistory": {}
},
{
"objectId": "",
"objectType": "",
"jobName": "",
"jobType": "",
"scheduledDateTime": "",
"lastScheduledRunDateTime": "",
"nextScheduledRunDateTime": "",
"jobOptions": { "catalogSelection": {"": [] }, "splitter": "_" }, "interval": "ONCE",
"notify": "",
"userId": "",
"emailId": "",
"ccList": "",
"auditHistory": {}
}] - Since:
- 10.1
-
getJobAs
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:
objectType- StringjobName- StringoutputFormat- String- Returns:
- String
- Since:
- 10.1
-
getJobsAs
Returns the Listobjects 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:
objectType- StringobjectId- longoutputFormat- String- Returns:
- String
- Since:
- 10.1
-
getJobsAs
Returns the Listobjects 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:
objectType- StringobjectId- longjobType- StringoutputFormat- String- Returns:
- String
- Since:
- 10.1
-
deleteJobAs
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:
objectType- StringjobName- StringoutputFormat- String- Returns:
- String
- Since:
- 10.1
-
clearJobsAs
Deletes the Jobs for the specified objectType and objectId.Specifying the objectType and objectId are mandatory to delete 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:
objectType- StringobjectId- StringoutputFormat- String- Returns:
- String
- Since:
- 10.1
-
clearJobsByJobTypeAs
public String clearJobsByJobTypeAs(String objectType, long objectId, String jobType, String outputFormat) Deletes the Jobs for the specified objectType, objectId and jobType Specifying the objectType,objectId and jobType are mandatory to delete 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:
objectType- StringobjectId- StringjobType- StringoutputFormat- String- Returns:
- String
- Since:
- 10.1
-