module PIM::Services::JobService

Public Instance Methods

__job_service() click to toggle source
# File services.rb, line 2074
def __job_service
  __service(:jobService)
end
__publication_service() click to toggle source
# File services.rb, line 2079
def __publication_service
  __service(:publicationService)
end
create_publication_job(job) click to toggle source

Creates a new publication job.

job: A Hash object containing all necessary information

  • name: The name of the job (does not need to be unique)

  • selection_query: A query string for the items to publish (empty to publish all items)

  • destination_organization_ids: Either this or destination_channel_ids must be set

  • destination_channel_ids: Either this or destination_organization_ids must be set

  • channel_sub_destinations: Optional sub-destinations when destination_channel_ids is set

  • publication_values: A Hash containing additional values (optional)

  • schedule: A ‘schedule’ Hash object

    • start_date_time: When to start the job (optional, default is now)

    • end_date_time: When to end the job (optional, default is never or end_after_runs)

    • end_after_runs: How many job executions to execute (optional, default is infinite or end_date_time)

    • repeat_type: How to repeat, i.e. per ‘DAY, ’WEEK’, ‘MONTH’ (optional, default is no repeat at all)

    • repeat_every: Number value for repeat_type, i.e. “repeat every X days” (optional, but must be > 0 if repeat_type is set!)

    • repeat_days_of_week: Which day of the week to repeat, for repeat_type ‘WEEK’ (optional, default is current day of week)

    • repeat_days_of_month: Which day of the month to repeat, for repeat_type ‘MONTH’ (optional, default is current day of month)

    • repeat_hour: Hour of the day to execute (optional, default is current time’s hour)

    • repeat_minute: Minute of the day to execute (optional, default is current time’s minute)

Returns the created Java job object.

# File services.rb, line 2046
def create_publication_job job
  return __publication_service.createPublicationJob(PIM::Utils.unsymbolized_hash(job))
end
delete_job(job_id) click to toggle source

Deletes the specified job.

Returns true if job was deleted, false otherwise

# File services.rb, line 2062
def delete_job job_id
  return __job_service.deleteJob(job_id)
end
get_job(job_id) click to toggle source
# File services.rb, line 2014
def get_job job_id
  return __job_service.getJob(job_id)
end
get_jobs_by_name(name) click to toggle source
# File services.rb, line 2018
def get_jobs_by_name name
  return __job_service.getJobsByName(name)
end
run_job(job_id) click to toggle source

Runs the specified job.

Returns true if job could be started, false otherwise

# File services.rb, line 2070
def run_job job_id
  return __job_service.runJob(job_id)
end
store_job(job) click to toggle source

Stores/updates a Java job object.

Returns the updated Java job object.

# File services.rb, line 2054
def store_job job
  return __job_service.storeJob(job)
end