Class FailureUrlService

java.lang.Object
org.codelibs.fess.app.service.FailureUrlService

public class FailureUrlService extends Object
Service class for managing failure URLs that occur during web crawling. Provides functionality to store, retrieve, and manage failed crawling attempts with their associated error information.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.codelibs.fess.opensearch.config.exbhv.FailureUrlBhv
    Behavior class for FailureUrl entity operations
    protected org.codelibs.fess.mylasta.direction.FessConfig
    Configuration settings for Fess
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(org.codelibs.fess.opensearch.config.exentity.FailureUrl failureUrl)
    Deletes a failure URL entity from the data store.
    void
    deleteAll(FailureUrlPager failureUrlPager)
    Deletes all failure URLs that match the criteria specified in the pager.
    void
    Deletes all failure URLs associated with a specific configuration ID.
    org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.FailureUrl>
    Retrieves a specific failure URL by its ID.
    List<org.codelibs.fess.opensearch.config.exentity.FailureUrl>
    Retrieves a paginated list of failure URLs based on the provided pager criteria.
    protected void
    setupListCondition(org.codelibs.fess.opensearch.config.cbean.FailureUrlCB cb, FailureUrlPager failureUrlPager)
    Sets up the condition builder for listing failure URLs with pagination and filtering.
    org.codelibs.fess.opensearch.config.exentity.FailureUrl
    store(org.codelibs.fess.opensearch.config.exentity.CrawlingConfig crawlingConfig, String errorName, String url, Throwable e)
    Stores a new failure URL or updates an existing one with error information.
    void
    store(org.codelibs.fess.opensearch.config.exentity.FailureUrl failureUrl)
    Stores or updates a failure URL entity in the data store.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • failureUrlBhv

      protected org.codelibs.fess.opensearch.config.exbhv.FailureUrlBhv failureUrlBhv
      Behavior class for FailureUrl entity operations
    • fessConfig

      protected org.codelibs.fess.mylasta.direction.FessConfig fessConfig
      Configuration settings for Fess
  • Constructor Details

    • FailureUrlService

      public FailureUrlService()
      Default constructor.
  • Method Details

    • getFailureUrlList

      public List<org.codelibs.fess.opensearch.config.exentity.FailureUrl> getFailureUrlList(FailureUrlPager failureUrlPager)
      Retrieves a paginated list of failure URLs based on the provided pager criteria.
      Parameters:
      failureUrlPager - the pager containing search criteria and pagination settings
      Returns:
      a list of FailureUrl entities matching the criteria
    • getFailureUrl

      public org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.FailureUrl> getFailureUrl(String id)
      Retrieves a specific failure URL by its ID.
      Parameters:
      id - the unique identifier of the failure URL
      Returns:
      an OptionalEntity containing the FailureUrl if found, empty otherwise
    • store

      public void store(org.codelibs.fess.opensearch.config.exentity.FailureUrl failureUrl)
      Stores or updates a failure URL entity in the data store.
      Parameters:
      failureUrl - the FailureUrl entity to store or update
    • delete

      public void delete(org.codelibs.fess.opensearch.config.exentity.FailureUrl failureUrl)
      Deletes a failure URL entity from the data store.
      Parameters:
      failureUrl - the FailureUrl entity to delete
    • setupListCondition

      protected void setupListCondition(org.codelibs.fess.opensearch.config.cbean.FailureUrlCB cb, FailureUrlPager failureUrlPager)
      Sets up the condition builder for listing failure URLs with pagination and filtering.
      Parameters:
      cb - the condition builder to configure
      failureUrlPager - the pager containing filter criteria
    • deleteAll

      public void deleteAll(FailureUrlPager failureUrlPager)
      Deletes all failure URLs that match the criteria specified in the pager.
      Parameters:
      failureUrlPager - the pager containing deletion criteria
    • deleteByConfigId

      public void deleteByConfigId(String configId)
      Deletes all failure URLs associated with a specific configuration ID.
      Parameters:
      configId - the configuration ID to delete failure URLs for
    • store

      public org.codelibs.fess.opensearch.config.exentity.FailureUrl store(org.codelibs.fess.opensearch.config.exentity.CrawlingConfig crawlingConfig, String errorName, String url, Throwable e)
      Stores a new failure URL or updates an existing one with error information. Creates a new failure URL entry or increments the error count for an existing URL.
      Parameters:
      crawlingConfig - the crawling configuration associated with the failure
      errorName - the name/type of the error that occurred
      url - the URL that failed to be crawled
      e - the exception that caused the failure
      Returns:
      the stored or updated FailureUrl entity, or null if the exception should be ignored