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

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 (IUserAction userAction)
 
static String getIdentifier ()
 

Detailed Description

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

Definition at line 38 of file UserCommand.java.

Member Function Documentation

◆ createURL()

static String org.turro.elephant.menu.UserCommand.createURL ( IUserAction  userAction)
static

Definition at line 40 of file UserCommand.java.

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

◆ execute()

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

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 65 of file UserCommand.java.

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

◆ getIdentifier()

static String org.turro.elephant.menu.UserCommand.getIdentifier ( )
static

Definition at line 50 of file UserCommand.java.

50  {
51  return UserCommand.class.getAnnotation(DirectContent.class).identifier();
52  }
Here is the caller graph for this function:

◆ itsMe()

boolean org.turro.elephant.menu.UserCommand.itsMe ( String  id)

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 55 of file UserCommand.java.

55  {
56  return getIdentifier().equals(id);
57  }
Here is the call graph for this function:

◆ myTurn()

boolean org.turro.elephant.menu.UserCommand.myTurn ( HttpServletRequest  request)

Implements org.turro.elephant.direct.IDirectContent.

Definition at line 60 of file UserCommand.java.

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

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