Interface BackgroundTaskLocalService

All Superinterfaces:
com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.PersistedModelLocalService
All Known Implementing Classes:
BackgroundTaskLocalServiceWrapper

@ProviderType @Transactional(isolation=PORTAL, rollbackFor={com.liferay.portal.kernel.exception.PortalException.class,com.liferay.portal.kernel.exception.SystemException.class}) public interface BackgroundTaskLocalService extends com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.PersistedModelLocalService
Provides the local service interface for BackgroundTask. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
See Also:
Generated:
  • Method Details

    • addBackgroundTask

      @Indexable(type=REINDEX) BackgroundTask addBackgroundTask(BackgroundTask backgroundTask)
      Adds the background task to the database. Also notifies the appropriate model listeners.

      Important: Inspect BackgroundTaskLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      backgroundTask - the background task
      Returns:
      the background task that was added
    • addBackgroundTask

      BackgroundTask addBackgroundTask(long userId, long groupId, String name, String taskExecutorClassName, Map<String,Serializable> taskContextMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addBackgroundTask

      BackgroundTask addBackgroundTask(long userId, long groupId, String name, String[] servletContextNames, Class<?> taskExecutorClass, Map<String,Serializable> taskContextMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addBackgroundTaskAttachment

      void addBackgroundTaskAttachment(long userId, long backgroundTaskId, String fileName, File file) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addBackgroundTaskAttachment

      void addBackgroundTaskAttachment(long userId, long backgroundTaskId, String fileName, InputStream inputStream) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • amendBackgroundTask

      BackgroundTask amendBackgroundTask(long backgroundTaskId, Map<String,Serializable> taskContextMap, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    • amendBackgroundTask

      BackgroundTask amendBackgroundTask(long backgroundTaskId, Map<String,Serializable> taskContextMap, int status, String statusMessage, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    • cleanUpBackgroundTask

      @Clusterable(onMaster=true) void cleanUpBackgroundTask(long backgroundTaskId, int status)
    • cleanUpBackgroundTasks

      @Clusterable(onMaster=true) void cleanUpBackgroundTasks()
    • createBackgroundTask

      @Transactional(enabled=false) BackgroundTask createBackgroundTask(long backgroundTaskId)
      Creates a new background task with the primary key. Does not add the background task to the database.
      Parameters:
      backgroundTaskId - the primary key for the new background task
      Returns:
      the new background task
    • createPersistedModel

      com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      createPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteBackgroundTask

      @Indexable(type=DELETE) @SystemEvent(type=1) BackgroundTask deleteBackgroundTask(BackgroundTask backgroundTask) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the background task from the database. Also notifies the appropriate model listeners.

      Important: Inspect BackgroundTaskLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      backgroundTask - the background task
      Returns:
      the background task that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteBackgroundTask

      @Indexable(type=DELETE) BackgroundTask deleteBackgroundTask(long backgroundTaskId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the background task with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect BackgroundTaskLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      backgroundTaskId - the primary key of the background task
      Returns:
      the background task that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a background task with the primary key could not be found
    • deleteCompanyBackgroundTasks

      void deleteCompanyBackgroundTasks(long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteGroupBackgroundTasks

      void deleteGroupBackgroundTasks(long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteGroupBackgroundTasks

      void deleteGroupBackgroundTasks(long groupId, String name, String taskExecutorClassName) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deletePersistedModel

      com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deletePersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • dslQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQuery in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • dslQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQueryCount in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Performs a dynamic query on the database and returns the matching rows.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the matching rows
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
      Performs a dynamic query on the database and returns a range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.portal.background.task.model.impl.BackgroundTaskModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      Returns:
      the range of matching rows
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
      Performs a dynamic query on the database and returns an ordered range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.portal.background.task.model.impl.BackgroundTaskModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching rows
    • dynamicQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the number of rows matching the dynamic query
    • dynamicQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      projection - the projection to apply to the query
      Returns:
      the number of rows matching the dynamic query
    • fetchBackgroundTask

      @Transactional(propagation=SUPPORTS, readOnly=true) BackgroundTask fetchBackgroundTask(long backgroundTaskId)
    • fetchFirstBackgroundTask

      @Transactional(propagation=SUPPORTS, readOnly=true) BackgroundTask fetchFirstBackgroundTask(long groupId, String taskExecutorClassName, boolean completed, com.liferay.portal.kernel.util.OrderByComparator<BackgroundTask> orderByComparator)
    • fetchFirstBackgroundTask

      @Transactional(propagation=SUPPORTS, readOnly=true) BackgroundTask fetchFirstBackgroundTask(String taskExecutorClassName, int status)
    • fetchFirstBackgroundTask

      @Transactional(propagation=SUPPORTS, readOnly=true) BackgroundTask fetchFirstBackgroundTask(String taskExecutorClassName, int status, com.liferay.portal.kernel.util.OrderByComparator<BackgroundTask> orderByComparator)
    • getActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
    • getBackgroundTask

      @Transactional(propagation=SUPPORTS, readOnly=true) BackgroundTask getBackgroundTask(long backgroundTaskId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the background task with the primary key.
      Parameters:
      backgroundTaskId - the primary key of the background task
      Returns:
      the background task
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a background task with the primary key could not be found
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(int start, int end)
      Returns a range of all the background tasks.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.portal.background.task.model.impl.BackgroundTaskModelImpl.

      Parameters:
      start - the lower bound of the range of background tasks
      end - the upper bound of the range of background tasks (not inclusive)
      Returns:
      the range of background tasks
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long groupId, int status)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long groupId, String taskExecutorClassName)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long groupId, String taskExecutorClassName, boolean completed, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<BackgroundTask> orderByComparator)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long groupId, String taskExecutorClassName, int status)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long groupId, String taskExecutorClassName, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<BackgroundTask> orderByComparator)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long groupId, String name, String taskExecutorClassName, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<BackgroundTask> orderByComparator)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long groupId, String[] taskExecutorClassNames, int status)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long[] groupIds, String name, String taskExecutorClassName, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<BackgroundTask> orderByComparator)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long[] groupIds, String name, String[] taskExecutorClassNames, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<BackgroundTask> orderByComparator)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long[] groupIds, String[] taskExecutorClassNames)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long[] groupIds, String[] taskExecutorClassNames, boolean completed)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long[] groupIds, String[] taskExecutorClassNames, boolean completed, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<BackgroundTask> orderByComparator)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(long[] groupIds, String[] taskExecutorClassNames, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<BackgroundTask> orderByComparator)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(String taskExecutorClassName, int status)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(String taskExecutorClassName, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<BackgroundTask> orderByComparator)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(String[] taskExecutorClassNames, int status)
    • getBackgroundTasks

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasks(String[] taskExecutorClassNames, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<BackgroundTask> orderByComparator)
    • getBackgroundTasksByDuration

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasksByDuration(long[] groupIds, String[] taskExecutorClassNames, boolean completed, int start, int end, boolean orderByType)
    • getBackgroundTasksByDuration

      @Transactional(propagation=SUPPORTS, readOnly=true) List<BackgroundTask> getBackgroundTasksByDuration(long[] groupIds, String[] taskExecutorClassNames, int start, int end, boolean orderByType)
    • getBackgroundTasksCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getBackgroundTasksCount()
      Returns the number of background tasks.
      Returns:
      the number of background tasks
    • getBackgroundTasksCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getBackgroundTasksCount(long groupId, String taskExecutorClassName)
    • getBackgroundTasksCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getBackgroundTasksCount(long groupId, String taskExecutorClassName, boolean completed)
    • getBackgroundTasksCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getBackgroundTasksCount(long groupId, String name, String taskExecutorClassName)
    • getBackgroundTasksCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getBackgroundTasksCount(long groupId, String name, String taskExecutorClassName, boolean completed)
    • getBackgroundTasksCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getBackgroundTasksCount(long[] groupIds, String name, String taskExecutorClassName)
    • getBackgroundTasksCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getBackgroundTasksCount(long[] groupIds, String name, String taskExecutorClassName, boolean completed)
    • getBackgroundTasksCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getBackgroundTasksCount(long[] groupIds, String name, String[] taskExecutorClassName)
    • getBackgroundTasksCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getBackgroundTasksCount(long[] groupIds, String[] taskExecutorClassNames)
    • getBackgroundTasksCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getBackgroundTasksCount(long[] groupIds, String[] taskExecutorClassNames, boolean completed)
    • getBackgroundTaskStatusJSON

      @Clusterable(onMaster=true) @Transactional(propagation=SUPPORTS, readOnly=true) String getBackgroundTaskStatusJSON(long backgroundTaskId)
    • getIndexableActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
    • getOSGiServiceIdentifier

      String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Returns:
      the OSGi service identifier
    • getPersistedModel

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • resumeBackgroundTask

      @Clusterable(onMaster=true) void resumeBackgroundTask(long backgroundTaskId)
    • triggerBackgroundTask

      @Clusterable(onMaster=true) void triggerBackgroundTask(long backgroundTaskId)
    • updateBackgroundTask

      @Indexable(type=REINDEX) BackgroundTask updateBackgroundTask(BackgroundTask backgroundTask)
      Updates the background task in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect BackgroundTaskLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      backgroundTask - the background task
      Returns:
      the background task that was updated