Class BadWordService

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

public class BadWordService extends Object
Service class for bad word management operations. Provides CRUD operations and CSV import/export functionality for bad words.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.codelibs.fess.opensearch.config.exbhv.BadWordBhv
    Database behavior for bad word operations.
    protected org.codelibs.fess.mylasta.direction.FessConfig
    Fess configuration.
    Search engine client for index operations.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for BadWordService.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(org.codelibs.fess.opensearch.config.exentity.BadWord badWord)
    Deletes a bad word.
    void
    exportCsv(Writer writer)
    Exports bad words to a CSV file.
    org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.BadWord>
    Gets a bad word by its ID.
    List<org.codelibs.fess.opensearch.config.exentity.BadWord>
    Gets a paginated list of bad words.
    void
    importCsv(Reader reader)
    Imports bad words from a CSV file.
    protected void
    setupListCondition(org.codelibs.fess.opensearch.config.cbean.BadWordCB cb, BadWordPager badWordPager)
    Sets up search conditions for bad word list queries.
    void
    store(org.codelibs.fess.opensearch.config.exentity.BadWord badWord)
    Stores (inserts or updates) a bad word.

    Methods inherited from class java.lang.Object

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

    • badWordBhv

      protected org.codelibs.fess.opensearch.config.exbhv.BadWordBhv badWordBhv
      Database behavior for bad word operations.
    • searchEngineClient

      protected SearchEngineClient searchEngineClient
      Search engine client for index operations.
    • fessConfig

      protected org.codelibs.fess.mylasta.direction.FessConfig fessConfig
      Fess configuration.
  • Constructor Details

    • BadWordService

      public BadWordService()
      Default constructor for BadWordService.
  • Method Details

    • getBadWordList

      public List<org.codelibs.fess.opensearch.config.exentity.BadWord> getBadWordList(BadWordPager badWordPager)
      Gets a paginated list of bad words.
      Parameters:
      badWordPager - The pager with search criteria and pagination settings.
      Returns:
      List of bad words matching the criteria.
    • getBadWord

      public org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.BadWord> getBadWord(String id)
      Gets a bad word by its ID.
      Parameters:
      id - The bad word ID.
      Returns:
      Optional entity containing the bad word if found.
    • store

      public void store(org.codelibs.fess.opensearch.config.exentity.BadWord badWord)
      Stores (inserts or updates) a bad word.
      Parameters:
      badWord - The bad word to store.
    • delete

      public void delete(org.codelibs.fess.opensearch.config.exentity.BadWord badWord)
      Deletes a bad word.
      Parameters:
      badWord - The bad word to delete.
    • setupListCondition

      protected void setupListCondition(org.codelibs.fess.opensearch.config.cbean.BadWordCB cb, BadWordPager badWordPager)
      Sets up search conditions for bad word list queries.
      Parameters:
      cb - The condition bean for the query.
      badWordPager - The pager containing search criteria.
    • importCsv

      public void importCsv(Reader reader)
      Imports bad words from a CSV file.
      Parameters:
      reader - The reader for the CSV data.
    • exportCsv

      public void exportCsv(Writer writer)
      Exports bad words to a CSV file.
      Parameters:
      writer - The writer for the CSV output.