Class DuplicateHostService
Duplicate host configurations allow administrators to define hostname patterns that should be treated as equivalent during crawling. This helps avoid indexing duplicate content from the same logical site that may be accessible via different hostnames (e.g., www.example.com and example.com).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.codelibs.fess.opensearch.config.exbhv.DuplicateHostBhvDBFlute behavior for duplicate host operations.protected org.codelibs.fess.mylasta.direction.FessConfigFess configuration containing application settings. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(org.codelibs.fess.opensearch.config.exentity.DuplicateHost duplicateHost) Deletes the specified duplicate host configuration from the system.org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.DuplicateHost> Retrieves a duplicate host configuration by its unique identifier.List<org.codelibs.fess.opensearch.config.exentity.DuplicateHost> Retrieves all duplicate host configurations without pagination.List<org.codelibs.fess.opensearch.config.exentity.DuplicateHost> getDuplicateHostList(DuplicateHostPager duplicateHostPager) Retrieves a paginated list of duplicate host configurations based on search criteria.protected voidsetupListCondition(org.codelibs.fess.opensearch.config.cbean.DuplicateHostCB cb, DuplicateHostPager duplicateHostPager) Sets up the search conditions for listing duplicate host configurations.voidstore(org.codelibs.fess.opensearch.config.exentity.DuplicateHost duplicateHost) Stores (inserts or updates) a duplicate host configuration.Methods inherited from class org.codelibs.fess.app.service.FessAppService
wrapQuery
-
Field Details
-
duplicateHostBhv
protected org.codelibs.fess.opensearch.config.exbhv.DuplicateHostBhv duplicateHostBhvDBFlute behavior for duplicate host operations. Provides database access methods for DuplicateHost entities. -
fessConfig
protected org.codelibs.fess.mylasta.direction.FessConfig fessConfigFess configuration containing application settings. Used to retrieve paging and other configuration parameters.
-
-
Constructor Details
-
DuplicateHostService
public DuplicateHostService()Creates a new instance of DuplicateHostService. This constructor initializes the service for managing duplicate host configuration operations including CRUD operations and search functionality.
-
-
Method Details
-
getDuplicateHostList
public List<org.codelibs.fess.opensearch.config.exentity.DuplicateHost> getDuplicateHostList(DuplicateHostPager duplicateHostPager) Retrieves a paginated list of duplicate host configurations based on search criteria.This method performs a paginated search through all duplicate host configurations, applying any search filters specified in the pager. The results are sorted by sort order, creation time, regular name, and duplicate hostname.
- Parameters:
duplicateHostPager- the pager containing search criteria and pagination settings- Returns:
- a list of DuplicateHost entities matching the search criteria
- Throws:
IllegalArgumentException- if duplicateHostPager is null
-
getDuplicateHost
public org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.DuplicateHost> getDuplicateHost(String id) Retrieves a duplicate host configuration by its unique identifier.- Parameters:
id- the unique identifier of the duplicate host configuration- Returns:
- an OptionalEntity containing the DuplicateHost if found, empty otherwise
- Throws:
IllegalArgumentException- if id is null or empty
-
store
public void store(org.codelibs.fess.opensearch.config.exentity.DuplicateHost duplicateHost) Stores (inserts or updates) a duplicate host configuration.This method immediately refreshes the index to ensure the change is visible. If the configuration already exists (based on ID), it will be updated; otherwise, a new configuration will be created.
- Parameters:
duplicateHost- the duplicate host configuration to store- Throws:
IllegalArgumentException- if duplicateHost is null
-
delete
public void delete(org.codelibs.fess.opensearch.config.exentity.DuplicateHost duplicateHost) Deletes the specified duplicate host configuration from the system.This operation permanently removes the duplicate host configuration and immediately refreshes the index to ensure the change is visible.
- Parameters:
duplicateHost- the duplicate host configuration to delete- Throws:
IllegalArgumentException- if duplicateHost is nullorg.dbflute.exception.EntityAlreadyDeletedException- if the entity has already been deleted
-
getDuplicateHostList
Retrieves all duplicate host configurations without pagination.This method returns all duplicate host configurations in the system, ordered by sort order, regular name, and duplicate hostname. The results are limited by the configured maximum fetch size to prevent memory issues.
- Returns:
- a list of all DuplicateHost entities
-
setupListCondition
protected void setupListCondition(org.codelibs.fess.opensearch.config.cbean.DuplicateHostCB cb, DuplicateHostPager duplicateHostPager) Sets up the search conditions for listing duplicate host configurations.This method configures the condition bean with search criteria from the pager, including regular name wildcards and duplicate hostname wildcards. Results are ordered by sort order and creation time in ascending order.
- Parameters:
cb- the condition bean to configureduplicateHostPager- the pager containing search criteria
-