Package org.codelibs.fess.app.service
Class FailureUrlService
java.lang.Object
org.codelibs.fess.app.service.FailureUrlService
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
FieldsModifier and TypeFieldDescriptionprotected org.codelibs.fess.opensearch.config.exbhv.FailureUrlBhvBehavior class for FailureUrl entity operationsprotected org.codelibs.fess.mylasta.direction.FessConfigConfiguration settings for Fess -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(org.codelibs.fess.opensearch.config.exentity.FailureUrl failureUrl) Deletes a failure URL entity from the data store.voiddeleteAll(FailureUrlPager failureUrlPager) Deletes all failure URLs that match the criteria specified in the pager.voiddeleteByConfigId(String configId) Deletes all failure URLs associated with a specific configuration ID.org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.FailureUrl> getFailureUrl(String id) Retrieves a specific failure URL by its ID.List<org.codelibs.fess.opensearch.config.exentity.FailureUrl> getFailureUrlList(FailureUrlPager failureUrlPager) Retrieves a paginated list of failure URLs based on the provided pager criteria.protected voidsetupListCondition(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.FailureUrlstore(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.voidstore(org.codelibs.fess.opensearch.config.exentity.FailureUrl failureUrl) Stores or updates a failure URL entity in the data store.
-
Field Details
-
failureUrlBhv
protected org.codelibs.fess.opensearch.config.exbhv.FailureUrlBhv failureUrlBhvBehavior class for FailureUrl entity operations -
fessConfig
protected org.codelibs.fess.mylasta.direction.FessConfig fessConfigConfiguration 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 configurefailureUrlPager- the pager containing filter criteria
-
deleteAll
Deletes all failure URLs that match the criteria specified in the pager.- Parameters:
failureUrlPager- the pager containing deletion criteria
-
deleteByConfigId
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 failureerrorName- the name/type of the error that occurredurl- the URL that failed to be crawlede- the exception that caused the failure- Returns:
- the stored or updated FailureUrl entity, or null if the exception should be ignored
-