BrightSide Workbench Full Report + Source Code
org.turro.elephant.direct.AbstractDirectContentSearch Class Referenceabstract
Inheritance diagram for org.turro.elephant.direct.AbstractDirectContentSearch:
Collaboration diagram for org.turro.elephant.direct.AbstractDirectContentSearch:

Public Member Functions

String createSearchURL ()
 
String createURL ()
 
boolean itsMe (String id)
 
boolean myTurn (HttpServletRequest request)
 
void execute (ServletContext context, HttpServletRequest request, HttpServletResponse response)
 

Protected Member Functions

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

Detailed Description

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

Definition at line 34 of file AbstractDirectContentSearch.java.

Member Function Documentation

◆ createSearchURL()

String org.turro.elephant.direct.AbstractDirectContentSearch.createSearchURL ( )

Definition at line 36 of file AbstractDirectContentSearch.java.

36  {
37  return createURL() + "?search=";
38  }
Here is the call graph for this function:

◆ createURL()

String org.turro.elephant.direct.AbstractDirectContentSearch.createURL ( )

Definition at line 40 of file AbstractDirectContentSearch.java.

40  {
41  return ElephantContext.getRootWebPath() +
42  DirectContents.DIRECT_CONTENT_PATH + getIdentifier();
43  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doExecute()

abstract void org.turro.elephant.direct.AbstractDirectContentSearch.doExecute ( IConstructor  constructor,
KeyValueMap  map 
)
abstractprotected

Reimplemented in org.turro.financials.cart.delivery.StreetMapSearch.

Here is the caller graph for this function:

◆ execute()

void org.turro.elephant.direct.AbstractDirectContentSearch.execute ( ServletContext  context,
HttpServletRequest  request,
HttpServletResponse  response 
)

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 58 of file AbstractDirectContentSearch.java.

58  {
59  IConstructor execConstructor = ElephantContext.getConstructor(request, response);
60  KeyValueMap map = Actions.isRightNowAction(execConstructor) ?
61  Actions.getRightNowAction(execConstructor) :
62  Actions.getAction(execConstructor);
63  if(map == null && "POST".equals(request.getMethod())) {
64  map = new KeyValueMap(Collections.EMPTY_MAP);
65  for(String key : request.getParameterMap().keySet()) {
66  map.put(key, request.getParameter(key));
67  }
68  }
69  if(map != null) {
70  doExecute(execConstructor, map);
71  }
72  }
abstract void doExecute(IConstructor constructor, KeyValueMap map)
Here is the call graph for this function:

◆ getIdentifier()

abstract String org.turro.elephant.direct.AbstractDirectContentSearch.getIdentifier ( )
abstractprotected

Reimplemented in org.turro.financials.cart.delivery.StreetMapSearch.

Here is the caller graph for this function:

◆ itsMe()

boolean org.turro.elephant.direct.AbstractDirectContentSearch.itsMe ( String  id)

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 48 of file AbstractDirectContentSearch.java.

48  {
49  return getIdentifier().equals(id);
50  }
Here is the call graph for this function:

◆ myTurn()

boolean org.turro.elephant.direct.AbstractDirectContentSearch.myTurn ( HttpServletRequest  request)

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 53 of file AbstractDirectContentSearch.java.

53  {
54  return DirectContents.isYourTurn(request, getIdentifier());
55  }
Here is the call graph for this function:

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