Interface DataspaceSetFilter
public interface DataspaceSetFilter
This interface defines a filter to accept or reject dataspaces in
the context of a field of type
SchemaTypeName.OSD_DATASPACE_KEY
.
This filter is called:
- when a dataspace selector widget is added in a form, user service, or UIBean.
- when validating a field of type
SchemaTypeName.OSD_DATASPACE_KEY
.
Definition in the data model
The filter must be declared under the element
xs:annotation/xs:appinfo/osd:dataspaceSet
:
where<filter osd:class="com.foo.MyDataspaceFilter"/>
com.foo.MyDataspaceFilter
is
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.MyDataspaceFilter" /> <param1>...</param1> <param2>...</param2> </filter>
param1
and param2
are 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(DataspaceSetFilterSetupContext)
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(HomeKey, DataspaceSetFilterContext)
is called each time an associated field has to be displayed in the user interface.
- Since:
- 5.8.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(HomeKey aHomeKey, DataspaceSetFilterContext aContext) Returns whether the specified dataspace is included in the filter result.void
setup
(DataspaceSetFilterSetupContext aContext) Checks and prepares this instance if called while the data model is being loaded.toUserDocumentation
(Locale userLocale, ValueContext aContext) Returns the end-user documentation for this filter.
-
Method Details
-
accept
Returns whether the specified dataspace is included in the filter result. -
setup
Checks and prepares this instance if called while the data model is being loaded. -
toUserDocumentation
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 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
-