code: public static Map<String, String> getParamsFromState(String state) {
  
          Map<String, String> result = new HashMap<String, String>();
          int separatorIndex = state.indexOf(PARAM_SEPARATOR);
          while (separatorIndex >= 0) {
              state = state.substring(separatorIndex + 2);
              int assignIndex = state.indexOf(PARAM_ASSIGN);
              if (assignIndex > 0) {
                  String key = state.substring(0, assignIndex);
                  state = state.substring(assignIndex + 2);
                  separatorIndex = state.indexOf(PARAM_SEPARATOR);
                  String value = null;
                  if (separatorIndex < 0) {
                      value = state;
                  } else if (separatorIndex > 0) {
                      value = state.substring(0, separatorIndex);
                  }
                  if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
                      result.put(key, CmsEncoder.decode(value, CmsEncoder.ENCODING_UTF_8));
                  }
              } else {
                  separatorIndex = -1;
              }
          }
          return result;
      }
docs: Returns the parameters contained in the state string.<p>
  
  @param state the state
  
  @return the parameters