Package io.revealbi.core.data
Class RVRESTDataSource
java.lang.Object
io.revealbi.core.data.RVDashboardDataSource
io.revealbi.core.data.RVRESTDataSource
REST API data source, configures the URL to get data from, HTTP method to use and optionally headers and body to send in the request.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBody()Body to send, expected to be used only with POST and PUT methods.Content type of the body, only used whengetBody()is not empty.List of headers to send in the request, each string in this list is expected to be a string in the format name=value.HTTP method to use, it defaults to GET.getUrl()URL to the web resource, is expected to be a URL with HTTP or HTTPS scheme.booleanBoolean flag indicating if anonymous authentication should be used for this data source or credentials must be requested to the containing application.booleanBoolean flag indicating if preemptive authentication should be used for this data source to the containing application.Body to send, expected to be used only with POST and PUT methods.setContentType(String value) Content type of the body, only used whengetBody()is not empty.setHeaders(ArrayList<String> value) List of headers to send in the request, each string in this list is expected to be a string in the format name=value.HTTP method to use, it defaults to GET.URL to the web resource, is expected to be a URL with HTTP or HTTPS scheme.booleansetUseAnonymousAuthentication(boolean value) Boolean flag indicating if anonymous authentication should be used for this data source or credentials must be requested to the containing application.booleansetUsePreemptiveAuthentication(boolean value) Boolean flag indicating if preemptive authentication should be used for this data source to the containing application.Methods inherited from class io.revealbi.core.data.RVDashboardDataSource
getDefaultRefreshRate, getId, getSubtitle, getTitle, setDefaultRefreshRate, setId, setSubtitle, setTitle
-
Field Details
-
PROVIDER_KEY
- See Also:
-
-
Constructor Details
-
RVRESTDataSource
public RVRESTDataSource()
-
-
Method Details
-
setUrl
URL to the web resource, is expected to be a URL with HTTP or HTTPS scheme. Parameters might be specified using the notation {parameterName}, for example: http://server/customers/{CustomerID} defines a "CustomerID" parameter that must be included in theRVRESTDataSourceItem.getParameters()property ofRVRESTDataSourceItem.- Parameters:
value-- Returns:
-
getUrl
URL to the web resource, is expected to be a URL with HTTP or HTTPS scheme. Parameters might be specified using the notation {parameterName}, for example: http://server/customers/{CustomerID} defines a "CustomerID" parameter that must be included in theRVRESTDataSourceItem.getParameters()property ofRVRESTDataSourceItem.- Returns:
-
setUseAnonymousAuthentication
public boolean setUseAnonymousAuthentication(boolean value) Boolean flag indicating if anonymous authentication should be used for this data source or credentials must be requested to the containing application.- Parameters:
value-- Returns:
-
getUseAnonymousAuthentication
public boolean getUseAnonymousAuthentication()Boolean flag indicating if anonymous authentication should be used for this data source or credentials must be requested to the containing application.- Returns:
-
setMethod
HTTP method to use, it defaults to GET.- Parameters:
value-- Returns:
-
getMethod
HTTP method to use, it defaults to GET.- Returns:
-
setContentType
Content type of the body, only used whengetBody()is not empty.- Parameters:
value-- Returns:
-
getContentType
Content type of the body, only used whengetBody()is not empty.- Returns:
-
setBody
Body to send, expected to be used only with POST and PUT methods.- Parameters:
value-- Returns:
-
getBody
Body to send, expected to be used only with POST and PUT methods.- Returns:
-
setHeaders
List of headers to send in the request, each string in this list is expected to be a string in the format name=value.- Parameters:
value-- Returns:
-
getHeaders
List of headers to send in the request, each string in this list is expected to be a string in the format name=value.- Returns:
-
setUsePreemptiveAuthentication
public boolean setUsePreemptiveAuthentication(boolean value) Boolean flag indicating if preemptive authentication should be used for this data source to the containing application.- Parameters:
value-- Returns:
-
getUsePreemptiveAuthentication
public boolean getUsePreemptiveAuthentication()Boolean flag indicating if preemptive authentication should be used for this data source to the containing application.- Returns:
-
getProviderKey
- Specified by:
getProviderKeyin classRVDashboardDataSource
-