Interface DatasetSetFilter
-
public interface DatasetSetFilterThis interface defines a filter to accept or reject datasets in the context of a field of typeSchemaTypeName.OSD_DATASET_NAME. This filter is called:- when a dataset selector widget is added in a form, user service, or UIBean.
- when validating a field of type
SchemaTypeName.OSD_DATASET_NAME.
Definition in the data model
The filter must be declared under the element
xs:annotation/xs:appinfo/osd:datasetSet:
where<filter osd:class="com.foo.MyDatasetFilter"/>
com.foo.MyDatasetFilteris the fully qualified name of the class implementing this interface. It is also possible to set additional JavaBean properties:
where<filter osd:class="com.foo.MyDatasetFilter" /> <param1>...</param1> <param2>...</param2> </filter>param1andparam2are JavaBean properties of the specified class.For more information, see the JavaBean specification.
Life cycle
- When the data model is loaded:
- the specified class is instantiated through its default constructor and the setters of the JavaBean properties
are called (in the example above,
setParam1(...)andsetParam2(...)); - the method
setup(DatasetSetFilterSetupContext)is called for the new instance.
- the specified class is instantiated through its default constructor and the setters of the JavaBean properties
are called (in the example above,
- During the operational phase: the method
accept(AdaptationName, DatasetSetFilterContext)is called each time an associated field has to be displayed in the user interface, or validated.
- Since:
- 5.8.0
- See Also:
- Data type documentation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaccept(AdaptationName aDatasetName, DatasetSetFilterContext aContext)Returns whether the specified dataset is included in the filter result in the context of the specified record or dataset.voidsetup(DatasetSetFilterSetupContext aContext)Checks and prepares this instance if called while the data model is being loaded.StringtoUserDocumentation(Locale userLocale, ValueContext aContext)Returns the end-user documentation for this filter.
-
-
-
Method Detail
-
accept
boolean accept(AdaptationName aDatasetName, DatasetSetFilterContext aContext)
Returns whether the specified dataset is included in the filter result in the context of the specified record or dataset.
-
setup
void setup(DatasetSetFilterSetupContext aContext)
Checks and prepares this instance if called while the data model is being loaded.
-
toUserDocumentation
String toUserDocumentation(Locale userLocale, ValueContext aContext) throws InvalidSchemaException
Returns the end-user documentation for this filter.Internationalization strategy
This method returns
nullif the specified locale is not handled by the current implementation. The container tries several locales when handling a partial internationalization of this method's implementation and/or a mismatch between the locales declared by the associated module and the locales supported by EBX®. In such cases, locales are tried in the following order:- User's preferred locale for the data model
(see
Session.getLocaleForSchemaNode(SchemaNode)); - Session's current locale;
- Default locale declared in the file
module.xml;
Multi-threading
For a single instance of this interface, this method may be called concurrently by several threads.
- Throws:
InvalidSchemaException- if a dynamic condition in the data model prevents the execution of this method.
- User's preferred locale for the data model
(see
-
-