mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-12-22 15:31:08 +00:00
[CLIENT] Suppression des sysout de debug
This commit is contained in:
parent
b6f0db01a9
commit
f835120528
@ -43,8 +43,6 @@ class StartupProcedureHandler {
|
||||
}
|
||||
|
||||
private void testConnection(){
|
||||
//TODO remove sysout
|
||||
System.out.println("Test de connexion");
|
||||
networkService.addListener(getPingListener(networkService));
|
||||
networkService.setActiveServer(host, port);
|
||||
networkService.sendPQTPing(host, port);
|
||||
@ -52,8 +50,6 @@ class StartupProcedureHandler {
|
||||
|
||||
private void useRequestedServer(){
|
||||
//Server found
|
||||
//TODO remove sysout
|
||||
System.out.println("Serveur trouvé");
|
||||
firerer.fireServerFoundEvent(host, port);
|
||||
accountService.addListener(getUpdateAccountListListener());
|
||||
accountService.refreshAccounts();
|
||||
@ -61,33 +57,22 @@ class StartupProcedureHandler {
|
||||
|
||||
private void connectAccount(){
|
||||
|
||||
//TODO remove sysout
|
||||
System.out.println("Connexion de compte");
|
||||
|
||||
//TODO remove try-catch(Throwable)
|
||||
try {
|
||||
Account match = accountService.getAllAccounts().stream()
|
||||
.filter(account -> account.getUsername().equals(username))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
//TODO remove sysout
|
||||
System.out.println("Account match value : "+match);
|
||||
|
||||
if(match==null){
|
||||
//TODO remove sysout
|
||||
System.out.println(" --> Compte inconnu");
|
||||
//Compte spécifié inconnu
|
||||
firerer.fireUserAccountUnknownEvent(username);
|
||||
firerer.fireStartupProcedureFinishedEvent(false);
|
||||
}else{
|
||||
//TODO remove sysout
|
||||
System.out.println(" --> Compte connu");
|
||||
accountService.setCurrentAccount(match);
|
||||
accountService.addListener(getConnectAccountListener());
|
||||
accountService.logInCurrentAccount(StartupProcedureHandler.this.password);
|
||||
}
|
||||
}catch(Throwable e){
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
firerer.fireStartupProcedureFinishedEvent(false);
|
||||
}
|
||||
@ -154,16 +139,12 @@ class StartupProcedureHandler {
|
||||
public void onAccountStatusChangedEvent(boolean status) {
|
||||
if(status){
|
||||
//Compte connecté
|
||||
//TODO remove sysout
|
||||
System.out.println("Connecté en tant que '"+username+"'");
|
||||
|
||||
StartupProcedureHandler.this.removeConnectAccountListener();
|
||||
firerer.fireUserAccountConnectedEvent(username);
|
||||
firerer.fireStartupProcedureFinishedEvent(true);
|
||||
}else{
|
||||
//Compte non-connecté
|
||||
//TODO remove sysout
|
||||
System.out.println("Non-connecté en tant que '"+username+"'");
|
||||
|
||||
firerer.fireUserAccountDisconnectedEvent(username);
|
||||
firerer.fireStartupProcedureFinishedEvent(false);
|
||||
@ -172,6 +153,7 @@ class StartupProcedureHandler {
|
||||
|
||||
@Override
|
||||
public void onAccountStatusNotChangedEvent(Throwable cause) {
|
||||
|
||||
StartupProcedureHandler.this.removeConnectAccountListener();
|
||||
firerer.fireStartupProcedureFinishedEvent(false);
|
||||
}
|
||||
|
@ -57,14 +57,6 @@ class StockScreenModel {
|
||||
}
|
||||
|
||||
Collection<Product> getProductCollection() {
|
||||
{//TODO delete print block
|
||||
System.out.println("------------------------------------------");
|
||||
System.out.println("Stock service's list : ");
|
||||
for(Product p : stockService.getProducts()){
|
||||
System.out.println(p);
|
||||
}
|
||||
System.out.println("------------------------------------------");
|
||||
}
|
||||
return stockService.getProducts();
|
||||
}
|
||||
|
||||
|
@ -17,13 +17,6 @@ public class HttpTextSender implements ITextSender{
|
||||
try {
|
||||
String trueURL = String.format("http://%s?%s", host, encode(text));
|
||||
|
||||
//TODO remove sysout
|
||||
{
|
||||
System.out.println(" --- --- ---");
|
||||
System.out.println("Sending : ");
|
||||
System.out.println(trueURL);
|
||||
}
|
||||
|
||||
HttpURLConnection con = (HttpURLConnection) new URL(trueURL).openConnection();
|
||||
con.setRequestMethod("GET");
|
||||
con.setRequestProperty("Content-Type", "application/json");
|
||||
@ -43,12 +36,6 @@ public class HttpTextSender implements ITextSender{
|
||||
content.append(inputLine);
|
||||
}
|
||||
|
||||
//TODO remove sysout
|
||||
{
|
||||
System.out.println("Received : ");
|
||||
System.out.println(content);
|
||||
}
|
||||
|
||||
listener.onMessageReceivedEvent(content.toString());
|
||||
}
|
||||
|
||||
|
@ -67,14 +67,6 @@ public class StockDao {
|
||||
}
|
||||
|
||||
private synchronized void replaceProductList(Collection<Product> products){
|
||||
{//TODO delete print block
|
||||
System.out.println("------------------------------------------");
|
||||
System.out.println("Stock dao's list : ");
|
||||
for(Product p : products){
|
||||
System.out.println(p);
|
||||
}
|
||||
System.out.println("------------------------------------------");
|
||||
}
|
||||
this.products.clear();
|
||||
this.products.addAll(products);
|
||||
this.lastRefreshTimestamp = new Date();
|
||||
|
Loading…
Reference in New Issue
Block a user