comparison gwt-client/src/test/java/test/SimpleRecommendation.java @ 9227:84397da33d17

Allow to control specific behaviour in TwinDatacagePanel Implemented client logic of 'intelligent datacage filtering' for SINFO
author gernotbelger
date Wed, 04 Jul 2018 18:28:08 +0200
parents 83aee0942eae
children
comparison
equal deleted inserted replaced
9226:83aee0942eae 9227:84397da33d17
67 final Recommendation recom1 = new Recommendation(this.getFactory(), this.getIds(), this.getTarget()); 67 final Recommendation recom1 = new Recommendation(this.getFactory(), this.getIds(), this.getTarget());
68 recom1.setDisplayName(this.displayName); 68 recom1.setDisplayName(this.displayName);
69 final Recommendation recom2 = new Recommendation(rec2.getFactory(), rec2.getIds(), rec2.getTarget()); 69 final Recommendation recom2 = new Recommendation(rec2.getFactory(), rec2.getIds(), rec2.getTarget());
70 recom2.setDisplayName(rec2.getDisplayName()); 70 recom2.setDisplayName(rec2.getDisplayName());
71 final Artifact[] artifacts = loadMany(new Recommendation[] { recom1, recom2 }, null, collection, serverUrl, locale); 71 final Artifact[] artifacts = loadMany(new Recommendation[] { recom1, recom2 }, null, collection, serverUrl, locale);
72 final String rec1String = RecommandationUtils.createDataString(artifacts[0].getUuid(), recom1, new NilDatacageTwinPanelInfo("xxxx", "yyy")); 72 final String rec1String = RecommandationUtils.createDataString(artifacts[0].getUuid(), recom1, new NilDatacageTwinPanelInfo(null, "xxxx"));
73 final String rec2String = RecommandationUtils.createDataString(artifacts[1].getUuid(), recom2, new NilDatacageTwinPanelInfo("xxxx", "yyy")); 73 final String rec2String = RecommandationUtils.createDataString(artifacts[1].getUuid(), recom2, new NilDatacageTwinPanelInfo(null, "xxxx"));
74 final String combinedIdNeu = rec1String + "#" + rec2String; 74 final String combinedIdNeu = rec1String + "#" + rec2String;
75 return combinedIdNeu; 75 return combinedIdNeu;
76
77 } 76 }
78 77
79 private final Artifact[] loadMany(final Recommendation[] recoms, final String factory, final Collection collection, final String serverUrl, 78 private final Artifact[] loadMany(final Recommendation[] recoms, final String factory, final Collection collection, final String serverUrl,
80 final String locale) throws ServerException, ConnectionException { 79 final String locale) throws ServerException, ConnectionException {
81 final ArrayList<Artifact> artifacts = new ArrayList<Artifact>(); 80 final ArrayList<Artifact> artifacts = new ArrayList<Artifact>();
104 throw new ServerException(LoadArtifactServiceImpl.ERROR_LOAD_ARTIFACT); 103 throw new ServerException(LoadArtifactServiceImpl.ERROR_LOAD_ARTIFACT);
105 } 104 }
106 } 105 }
107 } 106 }
108 } 107 }
108
109 return artifacts.toArray(new Artifact[artifacts.size()]); 109 return artifacts.toArray(new Artifact[artifacts.size()]);
110
111 } 110 }
112
113 } 111 }

http://dive4elements.wald.intevation.org