Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java @ 847:25a4bf390757
Loading recommendations: If no reference artifact is given use current
artifact as master artifact.
flys-client/trunk@2581 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 25 Aug 2011 13:36:06 +0000 |
parents | 4db672cdacb2 |
children | c9549074ecd1 |
comparison
equal
deleted
inserted
replaced
846:e47ef0ca8f33 | 847:25a4bf390757 |
---|---|
608 Config config = Config.getInstance(); | 608 Config config = Config.getInstance(); |
609 final String url = config.getServerUrl(); | 609 final String url = config.getServerUrl(); |
610 final String locale = config.getLocale(); | 610 final String locale = config.getLocale(); |
611 final Collection collection = getCollection(); | 611 final Collection collection = getCollection(); |
612 | 612 |
613 | |
614 Artifact masterArtifact = getArtifact(); | |
615 | |
616 | |
613 if (recommendations == null) { | 617 if (recommendations == null) { |
614 GWT.log("WARNING: Currently no recommendations."); | 618 GWT.log("WARNING: Currently no recommendations."); |
615 return; | 619 return; |
616 } | 620 } |
617 | 621 |
618 for (final Recommendation recommendation: recommendations) { | 622 for (final Recommendation recommendation: recommendations) { |
619 if (collection.loadedRecommendation(recommendation)) { | 623 if (collection.loadedRecommendation(recommendation)) { |
620 continue; | 624 continue; |
625 } | |
626 | |
627 // XXX: UGLY! If no reference artifact given use uuid of | |
628 // current artifact as reference. | |
629 if (recommendation.getMasterArtifact() == null) { | |
630 recommendation.setMasterArtifact(masterArtifact.getUuid()); | |
621 } | 631 } |
622 | 632 |
623 final String factory = recommendation.getFactory(); | 633 final String factory = recommendation.getFactory(); |
624 | 634 |
625 GWT.log("Load recommended artifact with factory: " + factory); | 635 GWT.log("Load recommended artifact with factory: " + factory); |