Interface DatasetSetFilter


public interface DatasetSetFilter
This interface defines a filter to accept or reject datasets in the context of a field of type SchemaTypeName.OSD_DATASET_NAME. This filter is called:

Definition in the data model

The filter must be declared under the element xs:annotation/xs:appinfo/osd:datasetSet:

 <filter osd:class="com.foo.MyDatasetFilter"/>
 
where com.foo.MyDatasetFilter is the fully qualified name of the class implementing this interface. It is also possible to set additional JavaBean properties:
 <filter osd:class="com.foo.MyDatasetFilter" />
         <param1>...</param1>
         <param2>...</param2>
 </filter>
 
where param1 and param2 are JavaBean properties of the specified class.

For more information, see the JavaBean specification.

Life cycle

  1. When the data model is loaded:
    1. the specified class is instantiated through its default constructor and the setters of the JavaBean properties are called (in the example above, setParam1(...) and setParam2(...));
    2. the method setup(DatasetSetFilterSetupContext) is called for the new instance.
  2. 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:
  • Method Details

    • 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 null if 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:

      1. User's preferred locale for the data model (see Session.getLocaleForSchemaNode(SchemaNode));
      2. Session's current locale;
      3. 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.