code: public static Action getActionByName(Entity entity, String name) {
          if(entity == null) {
              throw new IllegalArgumentException("entity cannot be null.");
          }
          if(StringUtils.isBlank(name)) {
              throw new IllegalArgumentException("name cannot be null or empty.");
          }
          List<Action> actions = entity.getActions();
          if (actions == null)
              return null;
          Action action = null;
          for (Action a : actions) {
              if (a.getName().equals(name)) {
                  action = a;
                  break;
              }
          }
          return action;
      }
docs: Retrieve an action by its name.
  @param entity cannot be <code>null</code>.
  @param name cannot be <code>null</code> or empty.
  @return the located action or <code>null</code> if not found.