BrightSide Workbench Full Report + Source Code
org.turro.financials.cart.delivery.StreetMapSearch Class Reference
Inheritance diagram for org.turro.financials.cart.delivery.StreetMapSearch:
Collaboration diagram for org.turro.financials.cart.delivery.StreetMapSearch:

Protected Member Functions

String getIdentifier ()
 
void doExecute (IConstructor constructor, KeyValueMap map)
 

Additional Inherited Members

- Public Member Functions inherited from org.turro.elephant.direct.AbstractDirectContentSearch
String createSearchURL ()
 
String createURL ()
 
boolean itsMe (String id)
 
boolean myTurn (HttpServletRequest request)
 
void execute (ServletContext context, HttpServletRequest request, HttpServletResponse response)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 39 of file StreetMapSearch.java.

Member Function Documentation

◆ doExecute()

void org.turro.financials.cart.delivery.StreetMapSearch.doExecute ( IConstructor  constructor,
KeyValueMap  map 
)
protected

Reimplemented from org.turro.elephant.direct.AbstractDirectContentSearch.

Definition at line 47 of file StreetMapSearch.java.

47  {
48  String searchValue = map.get("search");
49  if(!Strings.isBlank(searchValue)) {
50  try {
51  constructor.getResponse().setContentType("application/json");
52  constructor.getResponse().setCharacterEncoding(ElephantContext.getEncoding());
53  List<StreetItem> streets = ShopContext.getInstance().getDeliveryContexts().getDeliveryStreets(searchValue);
54  JSONSerializer ser = new JSONSerializer(streets, true);
55  constructor.getResponse().getWriter().write(ser.toJson());
56  } catch (IOException ex) {
57  Logger.getLogger(StreetMapSearch.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(searchValue), ex);
58  }
59  }
60  }
Here is the call graph for this function:

◆ getIdentifier()

String org.turro.financials.cart.delivery.StreetMapSearch.getIdentifier ( )
protected

Reimplemented from org.turro.elephant.direct.AbstractDirectContentSearch.

Definition at line 42 of file StreetMapSearch.java.

42  {
43  return DirectContents.getIdentifier(StreetMapSearch.class);
44  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: