Class FC
java.lang.Object
org.cxbox.core.service.drilldown.filter.FC
FC is a builder and container for filter configurations associated with business components (BC).
Short class
FC (Filter configuration) name ensures non-intrusive IntelliJ IDEA inline highlights.
It allows adding filter builders for specific DTO classes and BC identifiers, supporting default and custom filter builder types.
FC fc = new FC();
fc.add(bcIdentifier1, bcIdentifier1DTO.class, fb ->
fb.input(bcIdentifier1DTO_.input, "value")
// and other needed filed
)
.add(bcIdentifier2, BcIdentifier2DTO.class,
new TypeToken<MyFilterBuilder<BcIdentifier2DTO>>() {},
fb -> fb
.customField(bcIdentifier2DTO_.customField, value)
.input(bcIdentifier2DTO_.input, "value")
);
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRecord representing a filter configuration for a specific business component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(org.cxbox.api.data.BcIdentifier bc, Class<D> dtoClass, com.fasterxml.jackson.core.type.TypeReference<F> token, Consumer<F> filterBuilder) Adds a custom filter builder for the specified BC identifier and DTO class using a type token.<D extends org.cxbox.api.data.dto.DataResponseDTO>
FCAdds a default filter builder for the specified BC identifier and DTO class.
-
Constructor Details
-
FC
public FC()
-
-
Method Details
-
add
public <D extends org.cxbox.api.data.dto.DataResponseDTO> FC add(org.cxbox.api.data.BcIdentifier bc, Class<D> dtoClass, Consumer<FB<D, ?>> consumer) Adds a default filter builder for the specified BC identifier and DTO class.FC fc = new FC(); fc.add(bcIdentifier1, MyDto1.class, fb -> { // configure builder })*- Type Parameters:
D- the type of the DTODataResponseDTO- Parameters:
bc- the business component identifierBcIdentifierdtoClass- the DTO class associated with the filterDataResponseDTOconsumer- a consumer for configuring the filter builderFB<D extends org.cxbox.api.data.dto.DataResponseDTO,?> - Returns:
- this FC instance for chaining
-
add
public <D extends org.cxbox.api.data.dto.DataResponseDTO,F extends FB<D, FC addF>> (org.cxbox.api.data.BcIdentifier bc, Class<D> dtoClass, com.fasterxml.jackson.core.type.TypeReference<F> token, Consumer<F> filterBuilder) Adds a custom filter builder for the specified BC identifier and DTO class using a type token.FC fc = new FC(); fc.add(myBc, MyDto.class, new TypeToken<MyFilterBuilder<MyDto>>() {} , fb -> { // configure builder }- Type Parameters:
D- the type of the DTODataResponseDTOF- the type of the filter builderFB- Parameters:
bc- the business component identifierBcIdentifierdtoClass- the DTO class associated with the filterDataResponseDTOtoken- the type token for the custom filter builderTypeReferencefilterBuilder- a consumer for configuring the custom filter builderFB- Returns:
- this FC instance for chaining
-