Skip to content

Commit

Permalink
HSEARCH-3070 Add javadoc to BeanConfigurer and related classes
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Apr 3, 2019
1 parent 88538b7 commit 074572c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Expand Up @@ -8,8 +8,29 @@

public interface BeanConfigurationContext {

/**
* Define a way to resolve a bean referenced by its {@code exposedType}.
* <p>
* Affects the behavior of {@link org.hibernate.search.engine.environment.bean.BeanProvider#getBean(Class)}
* in particular.
*
* @param exposedType The type that this definition will match (exact match: inheritance is ignored).
* @param factory The factory allowing to create the bean.
* @param <T> The exposed type of the bean.
*/
<T> void define(Class<T> exposedType, BeanFactory<T> factory);

/**
* Define a way to resolve a bean referenced by its {@code exposedType} and {@code name}.
* <p>
* Affects the behavior of {@link org.hibernate.search.engine.environment.bean.BeanProvider#getBean(Class, String)}
* in particular.
*
* @param exposedType The type that this definition will match (exact match: inheritance is ignored).
* @param name The name that this definition will match (exact match: case is taken into account).
* @param factory The factory allowing to create the bean.
* @param <T> The exposed type of the bean.
*/
<T> void define(Class<T> exposedType, String name, BeanFactory<T> factory);

}
Expand Up @@ -6,6 +6,18 @@
*/
package org.hibernate.search.engine.environment.bean.spi;

/**
* An object responsible for defining beans that can then be resolved during Hibernate Search bootstrap.
* <p>
* Bean configurers can be enabled through two different methods:
* <ul>
* <li>Java services: create a file named {@code org.hibernate.search.engine.environment.bean.spi.BeanConfigurer}
* in the {@code META-INF/services} directory of your JAR,
* and set the content of this file to the fully-qualified name of your {@link BeanConfigurer} implementation.
* <li>Configuration properties: set the {@link org.hibernate.search.engine.cfg.spi.EngineSpiSettings#BEAN_CONFIGURERS}
* configuration property (be sure to use the appropriate prefix for the property key, e.g. {@code hibernate.search.}).
* </ul>
*/
public interface BeanConfigurer {

/**
Expand Down

0 comments on commit 074572c

Please sign in to comment.