@Component(value="CaRGOGatewayClientV2") public class GatewayClientImpl extends APIBaseClient implements GatewayClient
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 |
|---|
GatewayClientImpl(org.springframework.web.client.RestOperations restTemplate,
CargoClientConfig sparkworksCargoClientConfig,
CargoInternalCommunicationConfiguration cargoInternalCommunicationConfiguration) |
GatewayClientImpl(String apibaseUrl,
String accessToken) |
GatewayClientImpl(String apiBaseUrl,
String clientId,
String clientSecret,
String username,
String password,
String oauth2TokenUrl,
String oauth2GrantType,
String oauth2Scope) |
| Modifier and Type | Method and Description |
|---|---|
Long |
count()
Retrieve the number of the Gateways the user has access to.
|
net.sparkworks.cargo.common.dto.GatewayDTO |
create(String systemName,
UUID groupUUID)
Create a new Gateway.
|
void |
delete(UUID uuid)
Delete a Gateway by its UUID.
|
net.sparkworks.cargo.common.dto.GatewayDTO |
getBySystemName(String systemName)
Retrieve a Gateway by its name if the user has access to it.
|
net.sparkworks.cargo.common.dto.GatewayDTO |
getByUUID(UUID uuid)
Retrieve a Gateway by its UUID if the user has access to it.
|
Collection<net.sparkworks.cargo.common.dto.ResourceDTO> |
getResources(UUID gatewayUuid)
Retrieve the Resources of a Gateway with specific UUID.
|
Collection<net.sparkworks.cargo.common.dto.GatewayDTO> |
listAll()
Retrieve a list of all the Gateways the user has access to.
|
prepareHeaders@Autowired
public GatewayClientImpl(@Qualifier(value="cargoRestTemplate")
org.springframework.web.client.RestOperations restTemplate,
CargoClientConfig sparkworksCargoClientConfig,
CargoInternalCommunicationConfiguration cargoInternalCommunicationConfiguration)
public GatewayClientImpl(String apiBaseUrl, String clientId, String clientSecret, String username, String password, String oauth2TokenUrl, String oauth2GrantType, String oauth2Scope)
public Collection<net.sparkworks.cargo.common.dto.GatewayDTO> listAll()
GatewayClientlistAll in interface GatewayClientCollection GatewayDTO containst all the Gateways the user has access to.public net.sparkworks.cargo.common.dto.GatewayDTO getByUUID(UUID uuid)
GatewayClientgetByUUID in interface GatewayClientuuid - the UUID of the Gateway to retrieveGatewayDTO found with the requested UUIDpublic net.sparkworks.cargo.common.dto.GatewayDTO getBySystemName(String systemName)
GatewayClientgetBySystemName in interface GatewayClientsystemName - the system name of the Gateway to retrieveGatewayDTO found with the requested system namepublic net.sparkworks.cargo.common.dto.GatewayDTO create(String systemName, UUID groupUUID)
GatewayClientcreate in interface GatewayClientsystemName - the name of the new GatewaygroupUUID - the Group UUID of the Group the Gateway will belong toGatewayDTOpublic Long count()
GatewayClientcount in interface GatewayClientpublic void delete(UUID uuid)
GatewayClientdelete in interface GatewayClientuuid - the UUID of the Gateway to deletepublic Collection<net.sparkworks.cargo.common.dto.ResourceDTO> getResources(UUID gatewayUuid)
GatewayClientgetResources in interface GatewayClientgatewayUuid - the Gateway UUID to retrieve the Resources fromCollection containing the ResourceDTOs of the GatewayCopyright © 2018. All rights reserved.