@Component(value="CaRGODataClientV2") public class DataClientImpl extends APIBaseClient implements DataClient
apiBaseUrl, AUTH_BEARER_PREFIX, AUTHORIZATION_HEADER, restTemplateAPI_V1, API_V2, COMMAND, COMMAND_BY_UUID, CONVERSION, CONVERSION_BY_QUERY, CONVERSION_BY_UUID, COPY, COUNT, DEPTH, DEPTH_PATH, GATEWAY, GATEWAY_BY_QUERY, GATEWAY_BY_UUID, GATEWAY_COUNT, GATEWAY_RESOURCE, GROUP, GROUP_BY_UUID, GROUP_COUNT, GROUP_GATEWAY, GROUP_MAIN, GROUP_MOVE, GROUP_RESOURCES, GROUP_SUBGROUPS, GROUP_TREE, INTERNAL_PATH, MOVE, MOVE_RESOURCE_BY_UUID, PATH_LEVEL, PHENOMENON, PHENOMENON_BY_QUERY, PHENOMENON_BY_UUID, QUERY, RESOURCE, RESOURCE_BY_ID, RESOURCE_BY_QUERY, RESOURCE_BY_UUID, RESOURCE_COUNT, RESOURCE_DATA_PUBLISH, RESOURCE_ID, RESOURCE_LATEST, RESOURCE_LATEST_BY_UUID, RESOURCE_LATEST_UOM, RESOURCE_QUERY_LATEST, RESOURCE_QUERY_SUMMARY, RESOURCE_QUERY_TIMERANGE, RESOURCE_SUMMARY, RESOURCE_SUMMARY_BY_UUID, RESOURCE_SUMMARY_UOM, SOURCE, SOURCE_UUID, SUBGROUP, TARGET, TARGET_UOM, TARGET_UUID, UNIT, UNIT_BY_QUERY, UNIT_BY_UUID, UUID, UUID_PATH| Constructor and Description |
|---|
DataClientImpl(org.springframework.web.client.RestOperations restTemplate,
CargoClientConfig sparkworksClientConfig,
CargoInternalCommunicationConfiguration internalCommunicationConfiguration) |
DataClientImpl(String apibaseUrl,
String accessToken) |
DataClientImpl(String apiBaseUrl,
String clientId,
String clientSecret,
String username,
String password,
String oauth2TokenUrl,
String oauth2GrantType,
String oauth2Scope) |
| Modifier and Type | Method and Description |
|---|---|
net.sparkworks.cargo.common.dto.data.SummaryDTO |
getLatestSummary(UUID resourceUuid)
Retrieve latest summary values of a Resource
Retrieve a summary of the data for a specific Resource by its resource ID.
|
net.sparkworks.cargo.common.dto.data.LatestDTO |
getLatestValues(UUID resourceUuid)
Retrieve latest values of a Resource
Retrieve the latest aggregated values for a specific Resource by its resource ID
The response contains the latest aggregated values for intervals of 5 minutes, 1 hour, 1 day and 1 month.
|
net.sparkworks.cargo.common.dto.data.PublishDataListDTO |
publishData(net.sparkworks.cargo.common.dto.data.PublishDataListDTO publishDataListDTO)
Publish data to the provided Resource.
|
net.sparkworks.cargo.common.dto.data.QueryLatestResourceDataResultDTO |
queryLatestResourcesData(net.sparkworks.cargo.common.dto.data.QueryLatestResourceDataDTO queryLatestResourceDataDTO)
Retrieve latest values of criteria matching Resources
Query the latest aggregated values for multiple Resources.
|
net.sparkworks.cargo.common.dto.data.QueryTimeRangeResourceDataResultDTO |
queryTimeRangeResourcesData(net.sparkworks.cargo.common.dto.data.QueryTimeRangeResourceDataDTO queryTimeRangeResourceDataDTO)
Retrieve latest values of criteria matching Resources within a requested time window
Query the aggregated historical values for multiple Resources within a requested time window.
|
prepareHeaders@Autowired
public DataClientImpl(@Qualifier(value="cargoRestTemplate")
org.springframework.web.client.RestOperations restTemplate,
CargoClientConfig sparkworksClientConfig,
CargoInternalCommunicationConfiguration internalCommunicationConfiguration)
public DataClientImpl(String apiBaseUrl, String clientId, String clientSecret, String username, String password, String oauth2TokenUrl, String oauth2GrantType, String oauth2Scope)
public net.sparkworks.cargo.common.dto.data.SummaryDTO getLatestSummary(UUID resourceUuid)
DataClientgetLatestSummary in interface DataClientresourceUuid - the Resource UUIDSummaryDTO containing the latest summary valuespublic net.sparkworks.cargo.common.dto.data.LatestDTO getLatestValues(UUID resourceUuid)
DataClientgetLatestValues in interface DataClientresourceUuid - the Resource UUIDLatestDTO containing latest valuespublic net.sparkworks.cargo.common.dto.data.QueryLatestResourceDataResultDTO queryLatestResourcesData(net.sparkworks.cargo.common.dto.data.QueryLatestResourceDataDTO queryLatestResourceDataDTO)
DataClientqueryLatestResourcesData in interface DataClientqueryLatestResourceDataDTO - contains a list of query criteria QueryResourceDataCriteriaDTOQueryLatestResourceDataResultDTO that contains a Map that holds the requested data response for each query criteriapublic net.sparkworks.cargo.common.dto.data.QueryTimeRangeResourceDataResultDTO queryTimeRangeResourcesData(net.sparkworks.cargo.common.dto.data.QueryTimeRangeResourceDataDTO queryTimeRangeResourceDataDTO)
DataClientqueryTimeRangeResourcesData in interface DataClientqueryTimeRangeResourceDataDTO - cointains a list of query criteria for time range requestsQueryTimeRangeResourceDataResultDTO that contains a Map that holds the requested data response for each query criteriapublic net.sparkworks.cargo.common.dto.data.PublishDataListDTO publishData(net.sparkworks.cargo.common.dto.data.PublishDataListDTO publishDataListDTO)
DataClientpublishData in interface DataClientpublishDataListDTO - PublishDataListDTO that holds the info of the resources and the data to publish on these resourcePublishDataListDTO the list of the published dataCopyright © 2018. All rights reserved.