BrightSide Workbench Full Report + Source Code
org.turro.elephant.web.actions.WebActionType Enum Reference

Public Member Functions

String getProtocol ()
 

Static Public Member Functions

static WebActionType typeOf (String action)
 
static String actionOf (String action)
 
static String imageOf (String action)
 

Public Attributes

 NAVIGATE =("nav")
 
 URL =("url")
 
 MAIL =("mailto")
 
 TEL =("tel")
 
 ACTION =("action")
 
 TAG =("tag")
 
 WHATS =("whats")
 
 TGRAM =("tgram")
 
 WRONG =("#")
 

Detailed Description

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

Definition at line 27 of file WebActionType.java.

Member Function Documentation

◆ actionOf()

static String org.turro.elephant.web.actions.WebActionType.actionOf ( String  action)
static

Definition at line 60 of file WebActionType.java.

60  {
61  WebActionType type = typeOf(action);
62  return type == WRONG ? null : removeImage(action).substring(type.getProtocol().length() + 1);
63  }
static WebActionType typeOf(String action)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProtocol()

String org.turro.elephant.web.actions.WebActionType.getProtocol ( )

Definition at line 45 of file WebActionType.java.

45  {
46  return protocol;
47  }
Here is the caller graph for this function:

◆ imageOf()

static String org.turro.elephant.web.actions.WebActionType.imageOf ( String  action)
static

Definition at line 65 of file WebActionType.java.

65  {
66  if(action.matches(".+\\{[a-z \\-\\_\\.]+\\}")) {
67  return action.substring(action.lastIndexOf("{") + 1, action.length() - 1);
68  }
69  return null;
70  }
Here is the caller graph for this function:

◆ typeOf()

static WebActionType org.turro.elephant.web.actions.WebActionType.typeOf ( String  action)
static

Definition at line 49 of file WebActionType.java.

49  {
50  if(!Strings.isBlank(action)) {
51  for(WebActionType type : WebActionType.values()) {
52  if(action.startsWith(type.getProtocol() + ":")) {
53  return type;
54  }
55  }
56  }
57  return WRONG;
58  }
Here is the caller graph for this function:

Member Data Documentation

◆ ACTION

org.turro.elephant.web.actions.WebActionType.ACTION =("action")

Definition at line 33 of file WebActionType.java.

◆ MAIL

org.turro.elephant.web.actions.WebActionType.MAIL =("mailto")

Definition at line 31 of file WebActionType.java.

◆ NAVIGATE

org.turro.elephant.web.actions.WebActionType.NAVIGATE =("nav")

Definition at line 29 of file WebActionType.java.

◆ TAG

org.turro.elephant.web.actions.WebActionType.TAG =("tag")

Definition at line 34 of file WebActionType.java.

◆ TEL

org.turro.elephant.web.actions.WebActionType.TEL =("tel")

Definition at line 32 of file WebActionType.java.

◆ TGRAM

org.turro.elephant.web.actions.WebActionType.TGRAM =("tgram")

Definition at line 36 of file WebActionType.java.

◆ URL

org.turro.elephant.web.actions.WebActionType.URL =("url")

Definition at line 30 of file WebActionType.java.

◆ WHATS

org.turro.elephant.web.actions.WebActionType.WHATS =("whats")

Definition at line 35 of file WebActionType.java.

◆ WRONG

org.turro.elephant.web.actions.WebActionType.WRONG =("#")

Definition at line 37 of file WebActionType.java.


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