Interface TNodeProvider<I,R>
- Type Parameters:
I- id class.R- request class.
public interface TNodeProvider<I,R>
Client provider interface for hierarchically organized data. This class will be created of client-side
TNodeService.- Since:
- 4.0.63
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateRequest(@NotNull IDProvider element, @Nullable Map<String, String> properties) Creates a request object.createRequest(@NotNull UserService userService, @Nullable Map<String, String> properties) Creates a request object.Returns id class of this provider.getNodes(R request, @NotNull Collection<I> ids) Returns objects for the given ids.Returns path to root ornullfor root nodes.Returns root object.Searches the giventext.
-
Field Details
-
SEARCH_ID
static final int SEARCH_IDSearchflag: search ids.- Since:
- 4.0.63
- See Also:
-
SEARCH_DATA
static final int SEARCH_DATASearchflag: search data (like labels, properties, etc.).- Since:
- 4.0.63
- See Also:
-
SEARCH_EXACT
static final int SEARCH_EXACTSearchflag: enables exact search; default is a not-exact search.- Since:
- 4.0.63
- See Also:
-
-
Method Details
-
createRequest
R createRequest(@NotNull @NotNull UserService userService, @Nullable @Nullable Map<String, String> properties) Creates a request object. Request objects are used to transport neccessary information about the client environment to the server. It's recommended to reuse this request object as long as possible.- Parameters:
userService- current user-service.properties- properties for the provider.- Returns:
- request object.
- Since:
- 4.0.63
-
createRequest
R createRequest(@NotNull @NotNull IDProvider element, @Nullable @Nullable Map<String, String> properties) Creates a request object. Request objects are used to transport neccessary information about the client environment to the server. It's recommended to reuse this request object as long as possible.- Parameters:
element- current store-element.properties- properties for the provider.- Returns:
- request object.
- Since:
- 4.0.63
-
getIdClass
Returns id class of this provider. This value must not be changed during lifetime of a provider.
For implementors: Id classes must implement a constructorId(String)which can be used to de-serialize a string represantation created withId.toString().- Returns:
- id class for this adapter.
- Since:
- 4.0.63
-
getRoot
Returns root object.- Parameters:
request- request.- Returns:
- root object.
- Since:
- 4.0.63
-
getNodes
Returns objects for the given ids. For every indexiwith 0 <=i<ids.lengthisresult[i] == null<=>ids[i]is unknown.- Parameters:
request- request.ids- object ids.- Returns:
- objects for the given ids (
result[i] == null<=>ids[i]is unknown). - Since:
- 4.0.63
-
getPath
Returns path to root ornullfor root nodes. The path starts with the node's parent, ..., root node.- Parameters:
request- request.id- object id.- Returns:
- path to root or
nullfor root nodes. - Since:
- 4.0.63
-
search
@NotNull @NotNull Iterable<TNode<I>> search(@NotNull R request, @NotNull @NotNull String text, int flags)
-