Beispiel #1
0
 public String getFilterUrl() {
   List<String> parameters = new ArrayList<String>();
   if (filteredOrigin != null) {
     parameters.add("origin=" + filteredOrigin.getTitle());
   }
   if (filteredPlatform != null) {
     parameters.add("platform=" + filteredPlatform.getShortName());
   }
   if (isFilteredByGames()) {
     parameters.add("type=games");
   }
   if (isFilteredByHardwares()) {
     parameters.add("type=hardwares");
   }
   if (isFilteredByAccessories()) {
     parameters.add("type=accessories");
   }
   if (filteredPublisher != null) {
     parameters.add("publisher=" + filteredPublisher);
   }
   if (filteredUser != null) {
     parameters.add("user="******"?" + Joiner.on("&").join(parameters);
 }
Beispiel #2
0
 public String getQueryLabel() {
   String queryLabel = "all ";
   if (filteredByGames) {
     queryLabel += orange("games");
   } else if (filteredByHardwares) {
     queryLabel += orange("hardwares");
   } else {
     queryLabel += orange("accessories");
   }
   if (filteredOrigin != null) {
     queryLabel += " from " + orange(filteredOrigin.getTitle());
   }
   if (filteredPlatform != null) {
     queryLabel += " on " + orange(filteredPlatform.getName());
   }
   if (filteredUser != null) {
     queryLabel += " with user " + orange(filteredUser.getLogin());
   }
   if (filteredArticle != null) {
     queryLabel += " of article " + orange(filteredArticle.getTitle());
   }
   return queryLabel;
 }
Beispiel #3
0
 public boolean isFilteredBy(Platform platform) {
   if (filteredPlatform == null) {
     return false;
   }
   return platform.getId().equals(filteredPlatform.getId());
 }