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 Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.opencastproject.serviceregistry.api.IncidentService
JOB_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a list of localization database keys from a base key and a locale split into its part, e.g.protected abstract org.opencastproject.db.DBSessionorg.opencastproject.job.api.IncidentgetIncident(long id) org.opencastproject.job.api.IncidentTreegetIncidentsOfJob(long jobId, boolean cascade) List<org.opencastproject.job.api.Incident> getIncidentsOfJob(List<Long> jobIds) org.opencastproject.serviceregistry.api.IncidentL10ngetLocalization(long id, Locale locale) protected abstract org.opencastproject.serviceregistry.api.ServiceRegistryprotected abstract org.opencastproject.workflow.api.WorkflowServicelocaleToList(Locale locale) Convert a locale into a list of strings, [language, country, variant]static StringreplaceVars(String template, Map<String, String> params) Replace variables of the form #{xxx} in a string template.org.opencastproject.job.api.IncidentstoreIncident(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)
-
Field Details
-
PERSISTENCE_UNIT_NAME
- See Also:
-
NO_TITLE
- See Also:
-
NO_DESCRIPTION
- See Also:
-
FIELD_TITLE
- See Also:
-
FIELD_DESCRIPTION
- See Also:
-
-
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, throws org.opencastproject.serviceregistry.api.IncidentServiceException, IllegalStateExceptionString>> details) - Specified by:
storeIncidentin interfaceorg.opencastproject.serviceregistry.api.IncidentService- Throws:
org.opencastproject.serviceregistry.api.IncidentServiceExceptionIllegalStateException
-
getIncident
public org.opencastproject.job.api.Incident getIncident(long id) throws org.opencastproject.serviceregistry.api.IncidentServiceException, org.opencastproject.util.NotFoundException - Specified by:
getIncidentin interfaceorg.opencastproject.serviceregistry.api.IncidentService- Throws:
org.opencastproject.serviceregistry.api.IncidentServiceExceptionorg.opencastproject.util.NotFoundException
-
getIncidentsOfJob
public List<org.opencastproject.job.api.Incident> getIncidentsOfJob(List<Long> jobIds) throws org.opencastproject.serviceregistry.api.IncidentServiceException - Specified by:
getIncidentsOfJobin interfaceorg.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:
getIncidentsOfJobin interfaceorg.opencastproject.serviceregistry.api.IncidentService- Throws:
org.opencastproject.util.NotFoundExceptionorg.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:
getLocalizationin interfaceorg.opencastproject.serviceregistry.api.IncidentService- Throws:
org.opencastproject.serviceregistry.api.IncidentServiceExceptionorg.opencastproject.util.NotFoundException
-
genDbKeys
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
Convert a locale into a list of strings, [language, country, variant] -
replaceVars
Replace variables of the form #{xxx} in a string template.
-