19 package org.turro.elephant.web.actions;
21 import org.turro.string.Strings;
39 private final String protocol;
42 this.protocol = protocol;
50 if(!Strings.isBlank(action)) {
52 if(action.startsWith(type.getProtocol() +
":")) {
62 return type == WRONG ? null : removeImage(action).substring(type.
getProtocol().length() + 1);
65 public static String
imageOf(String action) {
66 if(action.matches(
".+\\{[a-z \\-\\_\\.]+\\}")) {
67 return action.substring(action.lastIndexOf(
"{") + 1, action.length() - 1);
72 private static String removeImage(String action) {
73 if(action.matches(
".+\\{[a-z \\-\\_\\.]+\\}")) {
74 return action.substring(0, action.lastIndexOf(
"{"));
static WebActionType typeOf(String action)
static String imageOf(String action)
static String actionOf(String action)