T
- The type of handled objects.public interface DataProvider<T>
start()
first to allow for setup of local fields that will be
used in subsequent calls of other methods, e.g. getNext()
or isRunning()
.getNext()
and isRunning()
in order to obtain incremental batches of result objects and to check if any
further results that haven't yet been returned in those incremental batches are available, respectively.Modifier and Type | Method and Description |
---|---|
void |
close()
Closure method; called if the report provider is no longer needed.
|
T |
deserialize(String string)
Returns the object for the given
id or null if it
couldn't be found or is no longer available. |
List<T> |
getNext(int count)
Returns an incremental result set of objects, potentially using
start() 's parameter input as a
filter configuration to limit the result set to match certain criteria. |
int |
getTotal()
Returns the total number of results that are available for display in the report's results list (based on the
current filter parameters) or
-1 if the object-providing process is still running. |
boolean |
isRunning()
Return the running state of this object.
|
String |
serialize(T object)
Returns a string identifier for the given
object or null if this element
has no identifier. |
void |
start(SpecialistsBroker broker,
ParameterMap parameter)
Initialization; called before any other methods.
|
void start(SpecialistsBroker broker, ParameterMap parameter)
broker
- Request local specialists brokerparameter
- Report parameter values (see WebeditReportPlugin
).List<T> getNext(int count)
start()
's parameter
input as a
filter configuration to limit the result set to match certain criteria. The list should not contain more than the
specified count
of entries and not include duplicates of the same object in result lists during repeated
calls of this method during the lifetime of this object.count
- The requested count of elements.List
of further objects that WebClient should include in the report's display.boolean isRunning()
getNext()
has not yet returned all results that are available
(based on whichever criteria), the provider should be considered running in order to communicate to WebClient that
more results are available on-demand. If no further results can be returned by getNext()
, the provider
should be considered stopped (isRunning()
returns false
) and remain that way for the remainder of
the object's lifetime.true
if this provider is still running and can provide more results; otherwise false
.int getTotal()
-1
if the object-providing process is still running.-1
while the object-providing process is running.void close()
@Nullable String serialize(@NotNull T object)
object
or null
if this element
has no identifier.
Note: This method will only be used in the webclient.object
- to identify.null
.@Nullable T deserialize(@NotNull String string)
id
or null
if it
couldn't be found or is no longer available.
Note: This method will only be used in the webclient.string
- object identifier, previously returned by serialize(Object)
.null
.Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408