@Test public void getUnblockedSeatsTest() { RTBRequestWrapper requestWrapper = new RTBRequestWrapper(bidRequest); requestWrapper.setContext(exchanger, advertisers, requestTime, offerTime); Map<String, String> seats = requestWrapper.getUnblockedSeats("BigAdExchange"); assertNotNull("seats should not be null",seats); assertTrue("seat value not found",seats.get("SeatID001").equals("index.htm")); }
public Map<String, String> getUnblockedSeats(String sspName) { Map<String, String> seats = new HashMap<String, String>(); boolean checkWseat = ((this.request.getWseat() != null) && (!this.request .getWseat().isEmpty())); for (Map.Entry<String, RTBAdvertiser> a : this.advertisers.entrySet()) { CharSequence seatID = a.getValue().getSeat(sspName); if (this.request.getBadv() != null) { for (CharSequence badv : this.request.getBadv()) { if (badv.equals(a.getKey())) { break; } } } for (String acat : a.getValue().getCategories()) { if (this.request.getBcat() != null) { for (CharSequence bcat : this.request.getBcat()) { if (!acat.equals(bcat.toString())) { break; } } } } seats.put(seatID.toString(), a.getValue().getLandingPage()); } return seats; }
RTBRequestWrapper extends BidRequest { public Map<String, String> getUnblockedSeats(String sspName) { Map<String, String> seats = new HashMap<String, String>(); boolean checkWseat = ((this.request.getWseat() != null) && (!this.request .getWseat().isEmpty())); for (Map.Entry<String, RTBAdvertiser> a : this.advertisers.entrySet()) { CharSequence seatID = a.getValue().getSeat(sspName); if (this.request.getBadv() != null) { for (CharSequence badv : this.request.getBadv()) { if (badv.equals(a.getKey())) { break; } } } for (String acat : a.getValue().getCategories()) { if (this.request.getBcat() != null) { for (CharSequence bcat : this.request.getBcat()) { if (!acat.equals(bcat.toString())) { break; } } } } seats.put(seatID.toString(), a.getValue().getLandingPage()); } return seats; } }
RTBRequestWrapper extends BidRequest { public Map<String, String> getUnblockedSeats(String sspName) { Map<String, String> seats = new HashMap<String, String>(); boolean checkWseat = ((this.request.getWseat() != null) && (!this.request .getWseat().isEmpty())); for (Map.Entry<String, RTBAdvertiser> a : this.advertisers.entrySet()) { CharSequence seatID = a.getValue().getSeat(sspName); if (this.request.getBadv() != null) { for (CharSequence badv : this.request.getBadv()) { if (badv.equals(a.getKey())) { break; } } } for (String acat : a.getValue().getCategories()) { if (this.request.getBcat() != null) { for (CharSequence bcat : this.request.getBcat()) { if (!acat.equals(bcat.toString())) { break; } } } } seats.put(seatID.toString(), a.getValue().getLandingPage()); } return seats; } RTBRequestWrapper();  RTBRequestWrapper(BidRequest request); }
RTBRequestWrapper extends BidRequest { public Map<String, String> getUnblockedSeats(String sspName) { Map<String, String> seats = new HashMap<String, String>(); boolean checkWseat = ((this.request.getWseat() != null) && (!this.request .getWseat().isEmpty())); for (Map.Entry<String, RTBAdvertiser> a : this.advertisers.entrySet()) { CharSequence seatID = a.getValue().getSeat(sspName); if (this.request.getBadv() != null) { for (CharSequence badv : this.request.getBadv()) { if (badv.equals(a.getKey())) { break; } } } for (String acat : a.getValue().getCategories()) { if (this.request.getBcat() != null) { for (CharSequence bcat : this.request.getBcat()) { if (!acat.equals(bcat.toString())) { break; } } } } seats.put(seatID.toString(), a.getValue().getLandingPage()); } return seats; } RTBRequestWrapper();  RTBRequestWrapper(BidRequest request); void setContext(RTBExchange exchange, Map<String, RTBAdvertiser> advertisers,
							long defaultRequestTO, long defaultOfferTO); BidRequest getRequest(); Map<String, String> getUnblockedSeats(String sspName); String getSSPName(); RTBAdvertiser getAdvertiser(String landingPage); void setRequestTO(long requestTO); long getRequestTO(); long getOfferTO(); void setOfferTimerActive(boolean trueOrFalse); boolean isOfferTimerActive(); }
RTBRequestWrapper extends BidRequest { public Map<String, String> getUnblockedSeats(String sspName) { Map<String, String> seats = new HashMap<String, String>(); boolean checkWseat = ((this.request.getWseat() != null) && (!this.request .getWseat().isEmpty())); for (Map.Entry<String, RTBAdvertiser> a : this.advertisers.entrySet()) { CharSequence seatID = a.getValue().getSeat(sspName); if (this.request.getBadv() != null) { for (CharSequence badv : this.request.getBadv()) { if (badv.equals(a.getKey())) { break; } } } for (String acat : a.getValue().getCategories()) { if (this.request.getBcat() != null) { for (CharSequence bcat : this.request.getBcat()) { if (!acat.equals(bcat.toString())) { break; } } } } seats.put(seatID.toString(), a.getValue().getLandingPage()); } return seats; } RTBRequestWrapper();  RTBRequestWrapper(BidRequest request); void setContext(RTBExchange exchange, Map<String, RTBAdvertiser> advertisers,
							long defaultRequestTO, long defaultOfferTO); BidRequest getRequest(); Map<String, String> getUnblockedSeats(String sspName); String getSSPName(); RTBAdvertiser getAdvertiser(String landingPage); void setRequestTO(long requestTO); long getRequestTO(); long getOfferTO(); void setOfferTimerActive(boolean trueOrFalse); boolean isOfferTimerActive();  }