mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
added method for updating expansions database
This commit is contained in:
parent
d541779d66
commit
e4ea8adf94
2 changed files with 17 additions and 3 deletions
|
|
@ -30,6 +30,7 @@ package mage.interfaces;
|
||||||
|
|
||||||
import mage.MageException;
|
import mage.MageException;
|
||||||
import mage.cards.decks.DeckCardLists;
|
import mage.cards.decks.DeckCardLists;
|
||||||
|
import mage.cards.repository.ExpansionInfo;
|
||||||
import mage.game.GameException;
|
import mage.game.GameException;
|
||||||
import mage.game.match.MatchOptions;
|
import mage.game.match.MatchOptions;
|
||||||
import mage.game.tournament.TournamentOptions;
|
import mage.game.tournament.TournamentOptions;
|
||||||
|
|
@ -50,6 +51,9 @@ public interface MageServer {
|
||||||
boolean registerAdmin(String password, String sessionId, MageVersion version) throws MageException;
|
boolean registerAdmin(String password, String sessionId, MageVersion version) throws MageException;
|
||||||
void deregisterClient(String sessionId) throws MageException;
|
void deregisterClient(String sessionId) throws MageException;
|
||||||
|
|
||||||
|
// update methods
|
||||||
|
List<ExpansionInfo> getMissingExpansionData(List<String> codes);
|
||||||
|
|
||||||
// user methods
|
// user methods
|
||||||
boolean setUserData(String userName, String sessionId, UserDataView userDataView) throws MageException;
|
boolean setUserData(String userName, String sessionId, UserDataView userDataView) throws MageException;
|
||||||
void sendFeedbackMessage(String sessionId, String username, String title, String type, String message, String email) throws MageException;
|
void sendFeedbackMessage(String sessionId, String username, String title, String type, String message, String email) throws MageException;
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ package mage.server;
|
||||||
|
|
||||||
import mage.MageException;
|
import mage.MageException;
|
||||||
import mage.cards.decks.DeckCardLists;
|
import mage.cards.decks.DeckCardLists;
|
||||||
|
import mage.cards.repository.ExpansionInfo;
|
||||||
|
import mage.cards.repository.ExpansionRepository;
|
||||||
import mage.game.GameException;
|
import mage.game.GameException;
|
||||||
import mage.game.match.MatchOptions;
|
import mage.game.match.MatchOptions;
|
||||||
import mage.game.tournament.TournamentOptions;
|
import mage.game.tournament.TournamentOptions;
|
||||||
|
|
@ -59,9 +61,6 @@ import java.util.Locale;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
|
|
||||||
//import mage.interfaces.Server;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com, noxx
|
* @author BetaSteward_at_googlemail.com, noxx
|
||||||
|
|
@ -914,4 +913,15 @@ public class MageServerImpl implements MageServer {
|
||||||
}
|
}
|
||||||
return action.negativeResult();
|
return action.negativeResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ExpansionInfo> getMissingExpansionData(List<String> codes) {
|
||||||
|
List<ExpansionInfo> result = new ArrayList<ExpansionInfo>();
|
||||||
|
for (ExpansionInfo expansionInfo : ExpansionRepository.instance.getAll()) {
|
||||||
|
if (!codes.contains(expansionInfo.getCode())) {
|
||||||
|
result .add(expansionInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue