Interface TNodeService
public interface TNodeService
FirstSpirit client interface for hierarchically organized data.
- Since:
- 4.0.63
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProvider
(@NotNull String name, @NotNull String providerClass) Adds a provider instance to the service.getProvider
(@NotNull String name) Returns a provider proxy.@Nullable String
getProviderClass
(String providerName) Returns the provider class name for the specified provider@NotNull Collection<String>
Returns all provider names.getProviderProperties
(String name) Returns properties of the specified provider.boolean
isProviderKnown
(String providerName) Returns true, if the specified provider is known, and false otherwisevoid
removeProvider
(@NotNull String name) Removes a provider instance from the service.void
setProviderProperties
(@NotNull String name, @NotNull Map<String, String> properties) Sets properties of the specified provider.
-
Method Details
-
addProvider
void addProvider(@NotNull @NotNull String name, @NotNull @NotNull String providerClass) throws IllegalArgumentException Adds a provider instance to the service. Because of instantiation provider on demand, problems with the givenproviderClass
occure not until callinggetProvider(String)
.- Parameters:
name
- provider name.providerClass
- provider class.- Throws:
IllegalArgumentException
- if a provider with the givenname
already exists.- Since:
- 4.0.63
-
getProviderNames
Returns all provider names.- Returns:
- all provider names.
- Since:
- 4.0.63
-
getProviderClass
Returns the provider class name for the specified provider- Parameters:
providerName
- the name of the provider, to get the class name for- Returns:
- the provider class name for the specified provider
- Since:
- 4.0.63
-
isProviderKnown
Returns true, if the specified provider is known, and false otherwise- Parameters:
providerName
- the name of the provider- Returns:
- true, if the specified provider is known, and false otherwise
- Since:
- 4.0.63
-
getProvider
TNodeProvider getProvider(@NotNull @NotNull String name) throws IllegalArgumentException, IllegalStateException Returns a provider proxy.- Parameters:
name
- provider name.- Returns:
- provider proxy.
- Throws:
IllegalArgumentException
- if the provider name is unknown.IllegalStateException
- if the provider class couldn't be instantiated.- Since:
- 4.0.63
-
getProviderProperties
@NotNull @NotNull Map<String,String> getProviderProperties(String name) throws IllegalArgumentException Returns properties of the specified provider.- Parameters:
name
- provider name.- Returns:
- properties of the specified provider.
- Throws:
IllegalArgumentException
- if the provider name is unknown.- Since:
- 4.0.63
-
setProviderProperties
void setProviderProperties(@NotNull @NotNull String name, @NotNull @NotNull Map<String, String> properties) throws IllegalArgumentExceptionSets properties of the specified provider.- Parameters:
name
- provider nameproperties
- properties.- Throws:
IllegalArgumentException
- if the provider name is unknown.- Since:
- 4.0.63
-
removeProvider
Removes a provider instance from the service.- Parameters:
name
- provider name.- Throws:
IllegalArgumentException
- if the provider name is unknown.- Since:
- 4.0.63
-