Class FileConfigService

java.lang.Object
org.codelibs.fess.app.service.FessAppService
org.codelibs.fess.app.service.FileConfigService

public class FileConfigService extends FessAppService
Service class for managing file configuration operations. This service provides CRUD operations for file crawler configurations, including retrieval, storage, deletion, and search functionality. It handles pagination and integrates with the file authentication system.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.codelibs.fess.mylasta.direction.FessConfig
    Fess configuration object providing access to application settings.
    protected org.codelibs.fess.opensearch.config.exbhv.FileAuthenticationBhv
    Behavior class for file authentication database operations.
    protected org.codelibs.fess.opensearch.config.exbhv.FileConfigBhv
    Behavior class for file configuration database operations.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for file configuration service.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(org.codelibs.fess.opensearch.config.exentity.FileConfig fileConfig)
    Deletes a file configuration and its associated authentication records.
    org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.FileConfig>
    Retrieves a file configuration by its unique identifier.
    org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.FileConfig>
    Retrieves a file configuration by its name.
    List<org.codelibs.fess.opensearch.config.exentity.FileConfig>
    Retrieves a paginated list of file configurations based on the provided pager criteria.
    protected void
    setupListCondition(org.codelibs.fess.opensearch.config.cbean.FileConfigCB cb, FileConfigPager fileConfigPager)
    Sets up search conditions for the file configuration list query.
    void
    store(org.codelibs.fess.opensearch.config.exentity.FileConfig fileConfig)
    Stores a file configuration in the database.

    Methods inherited from class org.codelibs.fess.app.service.FessAppService

    wrapQuery

    Methods inherited from class java.lang.Object

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

    • fileConfigBhv

      protected org.codelibs.fess.opensearch.config.exbhv.FileConfigBhv fileConfigBhv
      Behavior class for file configuration database operations. Provides access to the file configuration entity operations.
    • fileAuthenticationBhv

      protected org.codelibs.fess.opensearch.config.exbhv.FileAuthenticationBhv fileAuthenticationBhv
      Behavior class for file authentication database operations. Manages authentication configurations associated with file configurations.
    • fessConfig

      protected org.codelibs.fess.mylasta.direction.FessConfig fessConfig
      Fess configuration object providing access to application settings. Used for retrieving pagination and other configuration parameters.
  • Constructor Details

    • FileConfigService

      public FileConfigService()
      Default constructor for file configuration service. Creates a new instance with default values.
  • Method Details

    • getFileConfigList

      public List<org.codelibs.fess.opensearch.config.exentity.FileConfig> getFileConfigList(FileConfigPager fileConfigPager)
      Retrieves a paginated list of file configurations based on the provided pager criteria. This method applies search conditions from the pager and updates the pager with pagination information including page numbers and result counts.
      Parameters:
      fileConfigPager - the pager containing search criteria and pagination settings
      Returns:
      a list of file configurations matching the criteria
    • delete

      public void delete(org.codelibs.fess.opensearch.config.exentity.FileConfig fileConfig)
      Deletes a file configuration and its associated authentication records. This method removes the file configuration from the database and also deletes all related file authentication entries.
      Parameters:
      fileConfig - the file configuration to be deleted
    • getFileConfig

      public org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.FileConfig> getFileConfig(String id)
      Retrieves a file configuration by its unique identifier.
      Parameters:
      id - the unique identifier of the file configuration
      Returns:
      an OptionalEntity containing the file configuration if found, empty otherwise
    • getFileConfigByName

      public org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.FileConfig> getFileConfigByName(String name)
      Retrieves a file configuration by its name. If multiple configurations exist with the same name, returns the first one ordered by sort order.
      Parameters:
      name - the name of the file configuration to retrieve
      Returns:
      an OptionalEntity containing the file configuration if found, empty otherwise
    • store

      public void store(org.codelibs.fess.opensearch.config.exentity.FileConfig fileConfig)
      Stores a file configuration in the database. This method encrypts the configuration parameters before saving and performs an insert or update operation based on whether the configuration exists.
      Parameters:
      fileConfig - the file configuration to be stored
    • setupListCondition

      protected void setupListCondition(org.codelibs.fess.opensearch.config.cbean.FileConfigCB cb, FileConfigPager fileConfigPager)
      Sets up search conditions for the file configuration list query. This method applies various filter conditions based on the pager parameters including name, paths, and description filters with wildcard and phrase matching.
      Parameters:
      cb - the condition bean for building the database query
      fileConfigPager - the pager containing search filter criteria