Interface SampleDataExtension
public interface SampleDataExtension
The SampleDataExtension describes a method to retrieve a selection of data to show to an end user.
The connector can choose how to return the data and whether to return real data or synthetic data that is typical
for this type of resource.
The result is a map of names to lists of values. If the data is tabular, the names are the column names and the
list of values are the values for that column. The order of the values in the lists is consistent
column to column so that the first item in the lists are for row 1 etc. If the data is name-value pairs,
the names are the names of the properties and the values are single elements in the list.
If the data is a single element, or a nested structure, it is formatted as a string that goes in the
first name in the map with a null list of values.
-
Method Summary
-
Method Details
-
getSampleData
Map<String,List<String>> getSampleData(int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return sample data for the default user configured for this connector.- Parameters:
pageSize
- maximum number of elements to return in the map- Returns:
- a map of names to lists of values.
- Throws:
InvalidParameterException
- the page size is a negative numberUserNotAuthorizedException
- the connector is not permitted to issue the requestPropertyServerException
- the connector can not connect to the data source
-
getSampleData
Map<String,List<String>> getSampleData(String userId, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return sample data for the calling user.- Parameters:
userId
- calling userpageSize
- maximum number of elements to return in the map- Returns:
- a map of names to lists of values.
- Throws:
InvalidParameterException
- the page size is a negative numberUserNotAuthorizedException
- the connector is not permitted to issue the requestPropertyServerException
- the connector can not connect to the data source
-