From ae8486da5c542d6af9a2e0f9f7cc39729a055eee Mon Sep 17 00:00:00 2001 From: Kostya Date: Thu, 13 Aug 2026 16:24:24 +0000 Subject: Add service module with stubbed LocalGuessMarketContext GuessMarketContext gained a richer surface (loadEvents/listEvents/ buyShares/closeEvent/account/save-restoreState) backed by new EventDetailDTO, MarketStateDTO, OptionStateDTO and PurchaseReceiptDTO. The old engine-module provider implemented the previous shape and is removed; market.guess.service.LocalGuessMarketContext replaces it as a stub, each method throwing UnsupportedOperationException pending a real implementation. --- service/.classpath | 31 +++++++++++ service/.project | 29 ++++++++++ .../guess/service/LocalGuessMarketContext.java | 62 ++++++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 service/.classpath create mode 100644 service/.project create mode 100644 service/src/main/java/market/guess/service/LocalGuessMarketContext.java (limited to 'service') diff --git a/service/.classpath b/service/.classpath new file mode 100644 index 0000000..b46be83 --- /dev/null +++ b/service/.classpath @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/service/.project b/service/.project new file mode 100644 index 0000000..25a42b3 --- /dev/null +++ b/service/.project @@ -0,0 +1,29 @@ + + + guess-market-service + + + guess-market-api + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.jdt.core.javanature + + + + 1784965956299 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + + diff --git a/service/src/main/java/market/guess/service/LocalGuessMarketContext.java b/service/src/main/java/market/guess/service/LocalGuessMarketContext.java new file mode 100644 index 0000000..cabb6ac --- /dev/null +++ b/service/src/main/java/market/guess/service/LocalGuessMarketContext.java @@ -0,0 +1,62 @@ +package market.guess.service; + +import java.nio.file.Path; +import java.util.List; +import market.guess.api.AccountDTO; +import market.guess.api.EventDetailDTO; +import market.guess.api.EventSummaryDTO; +import market.guess.api.GuessMarketContext; +import market.guess.api.LoadResultDTO; +import market.guess.api.PurchaseReceiptDTO; +import market.guess.exception.GuessMarketException; + +public final class LocalGuessMarketContext implements GuessMarketContext { + + @Override + public LoadResultDTO loadEvents(Path path) { + throw new UnsupportedOperationException("Unimplemented method 'loadEvents'"); + } + + @Override + public List listEvents() { + throw new UnsupportedOperationException("Unimplemented method 'listEvents'"); + } + + @Override + public boolean isLoaded() { + throw new UnsupportedOperationException("Unimplemented method 'isLoaded'"); + } + + @Override + public EventDetailDTO getEvent(String eventKey) { + throw new UnsupportedOperationException("Unimplemented method 'getEvent'"); + } + + @Override + public PurchaseReceiptDTO buyShares( + String userName, String eventKey, String optionKey, long quantity) + throws GuessMarketException { + throw new UnsupportedOperationException("Unimplemented method 'buyShares'"); + } + + @Override + public EventDetailDTO closeEvent(String userName, String eventKey, String winningOptionKey) + throws GuessMarketException { + throw new UnsupportedOperationException("Unimplemented method 'closeEvent'"); + } + + @Override + public AccountDTO account(String userName) { + throw new UnsupportedOperationException("Unimplemented method 'account'"); + } + + @Override + public void saveState(Path path) throws GuessMarketException { + throw new UnsupportedOperationException("Unimplemented method 'saveState'"); + } + + @Override + public LoadResultDTO restoreState(Path path) { + throw new UnsupportedOperationException("Unimplemented method 'restoreState'"); + } +} -- cgit v1.2.3