Class DefaultDataHubOutboundService
- All Implemented Interfaces:
DataHubOutboundService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeleteByFeed(String rawItemType) Deletes all items originating from the DEFAULT_FEED on the Data Hub server and raw type specified and thedeleteByFeed(String feedName, String rawItemType) Deletes all items originating from the data feed and raw type specifiedDeletes all canonical items composed from the specified raw item.deleteByFeed(String rawItemType, Map<String, Object> keyFields) Deletes all canonical items in the default data pool composed from the specified raw item.Deletes item with an integration key comprised of the specified primary keys, of the type specified, in the pool specified on the Data Hub serverdeleteItem(String canonicalItemType, Map<String, String> keyFields) Deletes item with an integration key comprised of the specified primary keys, of the type specified, in the GLOBAL pool on the Data Hub serversendToDataHub(String rawType, Object obj) Sends the specifiedObjectto the DataHub as a Raw Item in CSV format.sendToDataHub(String feedName, String rawType, Object obj) Sends the specifiedObjectto the DataHub as a Raw Item in CSV format.Sends the specified List of Maps to the DataHub as Raw Items in CSV format.Sends the specifiedMapto the DataHub as a Raw Item in CSV format.Sends the specified List of Maps to the DataHub as Raw Items in CSV format.sendToDataHub(String rawType, Map<String, Object> objectMap) Sends the specified Map to the DataHub as a Raw Item in CSV format.voidsetCsvUtils(OutboundServiceCsvUtils csvUtils) Injects the utilities classvoidsetDataHubOutboundClient(DataHubOutboundClient dataHubOutboundClient) Injects Data Hub client to be used for communication with the Data Hub.
-
Constructor Details
-
DefaultDataHubOutboundService
public DefaultDataHubOutboundService()
-
-
Method Details
-
sendToDataHub
public ResultData sendToDataHub(String feedName, String rawType, Object obj) throws DataHubOutboundException Description copied from interface:DataHubOutboundServiceSends the specifiedObjectto the DataHub as a Raw Item in CSV format.>
Collectionare not supported as object properties and will be ignored. Properties with null values will be ignored.The object's property names are appended to the CSV header. The string value of the object's properties will be appended to the CSV body.
- Specified by:
sendToDataHubin interfaceDataHubOutboundService- Parameters:
feedName- the name of the Data FeedrawType- the Raw Type to create in the DataHubobj- the object to send to Data Hub- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failedDataHubOutboundException- if the Data Hub server was unable to successfully complete the export operation
-
sendToDataHub
Description copied from interface:DataHubOutboundServiceSends the specifiedObjectto the DataHub as a Raw Item in CSV format.Collectionare not supported as object properties and will be ignored. Properties with null values will be ignored.The object's property names are appended to the CSV header. The string value of the object's properties will be appended to the CSV body.
The value of the feedName is defaulted to DEFAULT_FEED.
- Specified by:
sendToDataHubin interfaceDataHubOutboundService- Parameters:
rawType- the Raw Type to create in the DataHubobj- the object to send to Data Hub- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failedDataHubOutboundException- if the Data Hub server was unable to successfully complete the export operation
-
sendToDataHub
public ResultData sendToDataHub(String feedName, String rawType, Map<String, Object> objectMap) throws DataHubOutboundExceptionDescription copied from interface:DataHubOutboundServiceSends the specifiedMapto the DataHub as a Raw Item in CSV format.Collectionare not supported asMap.Entryvalues and will be ignored.The
Mapkeys are used as values in the CSV header. The string value ofMap.Entryvalues will be used in the CSV body.- Specified by:
sendToDataHubin interfaceDataHubOutboundService- Parameters:
feedName- the name of the Data FeedrawType- the Raw Type to create in the DataHubobjectMap- the Map of key/value pairs to send to Data Hub. The key represents the field name- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failedDataHubOutboundException- if the Data Hub server was unable to successfully complete the export operation
-
sendToDataHub
public ResultData sendToDataHub(String rawType, Map<String, Object> objectMap) throws DataHubOutboundExceptionDescription copied from interface:DataHubOutboundServiceSends the specified Map to the DataHub as a Raw Item in CSV format.Collectionare not supported asMap.Entryvalues and will be ignored.The value of the feedName is defaulted to DEFAULT_FEED.
- Specified by:
sendToDataHubin interfaceDataHubOutboundService- Parameters:
rawType- the Raw Type to create in the DataHubobjectMap- the Map of key/value pairs to send to Data Hub. The key represents the field name- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failedDataHubOutboundException- if the Data Hub server was unable to successfully complete the export operation
-
sendToDataHub
public ResultData sendToDataHub(String feedName, String rawType, List<Map<String, Object>> objList) throws DataHubOutboundExceptionDescription copied from interface:DataHubOutboundServiceSends the specified List of Maps to the DataHub as Raw Items in CSV format.Collectionare not supported asMap.Entryvalues and will be ignored.CSV header is populated using the keys from the first Map in the List. Each Map in the List should contain the same keys.
- Specified by:
sendToDataHubin interfaceDataHubOutboundService- Parameters:
feedName- the name of the Data FeedrawType- the Raw Type to create in the DataHubobjList- a List of Maps. Each Map represents one row of CSV data to send to Data Hub.- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failedDataHubOutboundException- if the Data Hub server was unable to successfully complete the export operation
-
sendToDataHub
public ResultData sendToDataHub(String rawType, List<Map<String, Object>> objList) throws DataHubOutboundExceptionDescription copied from interface:DataHubOutboundServiceSends the specified List of Maps to the DataHub as Raw Items in CSV format.Collectionare not supported asMap.Entryvalues and will be ignored.CSV header is populated using the keys from the first Map in the List. Each Map in the List should contain the same keys.
The value of the feedName is defaulted to DEFAULT_FEED.
- Specified by:
sendToDataHubin interfaceDataHubOutboundService- Parameters:
rawType- the Raw Type to create in the DataHubobjList- a List of Maps. Each Map represents one row of CSV data to send to Data Hub.- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failedDataHubOutboundException- if the Data Hub server was unable to successfully complete the export operation
-
deleteItem
public ResultData deleteItem(String poolName, String canonicalItemType, Map<String, String> keyFields) throws DataHubOutboundExceptionDescription copied from interface:DataHubOutboundServiceDeletes item with an integration key comprised of the specified primary keys, of the type specified, in the pool specified on the Data Hub server- Specified by:
deleteItemin interfaceDataHubOutboundService- Parameters:
poolName- name of the data pool the item to be deleted resides incanonicalItemType- type code for the item to deletekeyFields- map of primary key attribute names and values to uniquely identify the item to be deleted- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failedDataHubOutboundException- if the Data Hub server was unable to successfully complete the export operation
-
deleteItem
public ResultData deleteItem(String canonicalItemType, Map<String, String> keyFields) throws DataHubOutboundExceptionDescription copied from interface:DataHubOutboundServiceDeletes item with an integration key comprised of the specified primary keys, of the type specified, in the GLOBAL pool on the Data Hub server- Specified by:
deleteItemin interfaceDataHubOutboundService- Parameters:
canonicalItemType- type code for the item to deletekeyFields- map of primary key attribute names and values to uniquely identify the item to be deleted- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failedDataHubOutboundException- if the Data Hub server was unable to successfully complete the export operation
-
deleteByFeed
Description copied from interface:DataHubOutboundServiceDeletes all items originating from the data feed and raw type specified- Specified by:
deleteByFeedin interfaceDataHubOutboundService- Parameters:
feedName- Name of the data feed the items originated fromrawItemType- Name of the raw type the items originated from- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failedDataHubOutboundException- if the Data Hub server was unable to successfully complete the export operation
-
deleteByFeed
Description copied from interface:DataHubOutboundServiceDeletes all items originating from the DEFAULT_FEED on the Data Hub server and raw type specified and the- Specified by:
deleteByFeedin interfaceDataHubOutboundService- Parameters:
rawItemType- Name of the raw type the items originated from- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failedDataHubOutboundException- if the Data Hub server was unable to successfully complete the export operation
-
deleteByFeed
public ResultData deleteByFeed(String feedName, String rawItemType, Map<String, Object> keyFields) throws DataHubOutboundExceptionDescription copied from interface:DataHubOutboundServiceDeletes all canonical items composed from the specified raw item.- Specified by:
deleteByFeedin interfaceDataHubOutboundService- Parameters:
feedName- Name of the data feed item originated fromrawItemType- Name of the raw type the item originated fromkeyFields- map attribute values for the object to delete. The key in the map is the attribute name, the value is the attribute value. The map must contain at least all primary key attribute values.- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failedDataHubOutboundException- if the Data Hub server was unable to successfully complete the export operation
-
deleteByFeed
public ResultData deleteByFeed(String rawItemType, Map<String, Object> keyFields) throws DataHubOutboundExceptionDescription copied from interface:DataHubOutboundServiceDeletes all canonical items in the default data pool composed from the specified raw item.- Specified by:
deleteByFeedin interfaceDataHubOutboundService- Parameters:
rawItemType- Name of the raw type the item originated fromkeyFields- map attribute values for the object to delete. The key in the map is the attribute name, the value is the attribute value. The map must contain at least all primary key attribute values.- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failedDataHubOutboundException- if the Data Hub server was unable to successfully complete the export operation
-
setDataHubOutboundClient
Injects Data Hub client to be used for communication with the Data Hub.- Parameters:
dataHubOutboundClient- an implementation of the client to use.
-
setCsvUtils
Injects the utilities class- Parameters:
csvUtils- the utilities implementation to use.
-