BrightSide Workbench Full Report + Source Code
org.turro.elephant.user.menu.MenuCommand Class Reference
Inheritance diagram for org.turro.elephant.user.menu.MenuCommand:
Collaboration diagram for org.turro.elephant.user.menu.MenuCommand:

Public Member Functions

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

Static Public Member Functions

static String createURL (IUserMenu userMenu)
 
static String getIdentifier ()
 

Detailed Description

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

Definition at line 37 of file MenuCommand.java.

Member Function Documentation

◆ createURL()

static String org.turro.elephant.user.menu.MenuCommand.createURL ( IUserMenu  userMenu)
static

Definition at line 39 of file MenuCommand.java.

39  {
40  if(userMenu.isValid()) {
41  String exrino = Actions.createRightNowAction("idMenu=" + userMenu.getId());
42  return DirectContents.DIRECT_CONTENT_PATH + getIdentifier() +
43  "?" + exrino;
44  }
45  return null;
46  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute()

void org.turro.elephant.user.menu.MenuCommand.execute ( ServletContext  context,
HttpServletRequest  request,
HttpServletResponse  response 
)

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 63 of file MenuCommand.java.

63  {
64  KeyValueMap map = Actions.getRightNowAction(ElephantContext.getConstructor(request, response));
65  if(map != null) {
66  String idMenu = map.get("idMenu");
67  if(!Strings.isBlank(idMenu)) {
68  UserMenus.executeMenu(idMenu);
69  }
70  }
71  }
Here is the call graph for this function:

◆ getIdentifier()

static String org.turro.elephant.user.menu.MenuCommand.getIdentifier ( )
static

Definition at line 48 of file MenuCommand.java.

48  {
49  return MenuCommand.class.getAnnotation(DirectContent.class).identifier();
50  }

◆ itsMe()

boolean org.turro.elephant.user.menu.MenuCommand.itsMe ( String  id)

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 53 of file MenuCommand.java.

53  {
54  return getIdentifier().equals(id);
55  }

◆ myTurn()

boolean org.turro.elephant.user.menu.MenuCommand.myTurn ( HttpServletRequest  request)

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 58 of file MenuCommand.java.

58  {
59  return DirectContents.isYourTurn(request, getIdentifier());
60  }
Here is the call graph for this function:

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