Package sg.dex.starfish
Interface MarketAgent
-
- All Known Implementing Classes:
MemoryAgent
,RemoteAgent
public interface MarketAgent
This interface is for all the basis functionality that Market provide. It include the getting the listing ,updating and creating the listing.- Version:
- 0.5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Listing
createListing(java.util.Map<java.lang.String,java.lang.Object> listingData)
API used to create a new listing instance it will have map of all metadata that need to be passed while creating the listing instanceListing
getListing(java.lang.String id)
API to get all the Listing.Purchase
getPurchase(java.lang.String id)
API to get one Listing.
-
-
-
Method Detail
-
getListing
Listing getListing(java.lang.String id)
API to get all the Listing. This will return all the listing that belong specific agent- Parameters:
id
- The ID of the Listing to retrieve- Returns:
- Listing instance, or null if not found
-
getPurchase
Purchase getPurchase(java.lang.String id)
API to get one Listing. This will return the listing that belong specific agent- Parameters:
id
- The ID- Returns:
- Purchase instance, or null if not found
-
createListing
Listing createListing(java.util.Map<java.lang.String,java.lang.Object> listingData)
API used to create a new listing instance it will have map of all metadata that need to be passed while creating the listing instance- Parameters:
listingData
- The data to include in the listing- Returns:
- Listing instance created
-
-