Class AbstractIncidentService

java.lang.Object
org.opencastproject.serviceregistry.impl.AbstractIncidentService
All Implemented Interfaces:
org.opencastproject.serviceregistry.api.IncidentService
Direct Known Subclasses:
OsgiIncidentService

public abstract class AbstractIncidentService extends Object implements org.opencastproject.serviceregistry.api.IncidentService
  • Field Details

  • Constructor Details

    • AbstractIncidentService

      public AbstractIncidentService()
  • Method Details

    • getServiceRegistry

      protected abstract org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()
    • getWorkflowService

      protected abstract org.opencastproject.workflow.api.WorkflowService getWorkflowService()
    • getDBSession

      protected abstract org.opencastproject.db.DBSession getDBSession()
    • storeIncident

      public org.opencastproject.job.api.Incident storeIncident(org.opencastproject.job.api.Job job, Date timestamp, String code, org.opencastproject.job.api.Incident.Severity severity, Map<String,String> descriptionParameters, List<org.opencastproject.util.data.Tuple<String,String>> details) throws org.opencastproject.serviceregistry.api.IncidentServiceException, IllegalStateException
      Specified by:
      storeIncident in interface org.opencastproject.serviceregistry.api.IncidentService
      Throws:
      org.opencastproject.serviceregistry.api.IncidentServiceException
      IllegalStateException
    • getIncident

      public org.opencastproject.job.api.Incident getIncident(long id) throws org.opencastproject.serviceregistry.api.IncidentServiceException, org.opencastproject.util.NotFoundException
      Specified by:
      getIncident in interface org.opencastproject.serviceregistry.api.IncidentService
      Throws:
      org.opencastproject.serviceregistry.api.IncidentServiceException
      org.opencastproject.util.NotFoundException
    • getIncidentsOfJob

      public List<org.opencastproject.job.api.Incident> getIncidentsOfJob(List<Long> jobIds) throws org.opencastproject.serviceregistry.api.IncidentServiceException
      Specified by:
      getIncidentsOfJob in interface org.opencastproject.serviceregistry.api.IncidentService
      Throws:
      org.opencastproject.serviceregistry.api.IncidentServiceException
    • getIncidentsOfJob

      public org.opencastproject.job.api.IncidentTree getIncidentsOfJob(long jobId, boolean cascade) throws org.opencastproject.util.NotFoundException, org.opencastproject.serviceregistry.api.IncidentServiceException
      Specified by:
      getIncidentsOfJob in interface org.opencastproject.serviceregistry.api.IncidentService
      Throws:
      org.opencastproject.util.NotFoundException
      org.opencastproject.serviceregistry.api.IncidentServiceException
    • getLocalization

      public org.opencastproject.serviceregistry.api.IncidentL10n getLocalization(long id, Locale locale) throws org.opencastproject.serviceregistry.api.IncidentServiceException, org.opencastproject.util.NotFoundException
      Specified by:
      getLocalization in interface org.opencastproject.serviceregistry.api.IncidentService
      Throws:
      org.opencastproject.serviceregistry.api.IncidentServiceException
      org.opencastproject.util.NotFoundException
    • genDbKeys

      public static List<String> genDbKeys(List<String> locale, String base)
      Create a list of localization database keys from a base key and a locale split into its part, e.g. ["de", "DE"] or ["en"]. The returned list starts with the most specific key getting more common, e.g. ["org.opencastproject.composer.1.title.de.DE", "org.opencastproject.composer.1.title.de", "org.opencastproject.composer.1.title"]
    • localeToList

      public static List<String> localeToList(Locale locale)
      Convert a locale into a list of strings, [language, country, variant]
    • replaceVars

      public static String replaceVars(String template, Map<String,String> params)
      Replace variables of the form #{xxx} in a string template.