Parses the requested parameter from the given state.<p>

@param state the state
@param paramName the parameter name

@return the parameter value
48
public static String getParamFromState(String state, String paramName) {

        String prefix = PARAM_SEPARATOR + paramName + PARAM_ASSIGN;
        if (state.contains(prefix)) {
            String result = state.substring(state.indexOf(prefix) + prefix.length());
            if (result.contains(PARAM_SEPARATOR)) {
                result = result.substring(0, result.indexOf(PARAM_SEPARATOR));
            }
            return CmsEncoder.decode(result, CmsEncoder.ENCODING_UTF_8);
        }
        return null;
    }
943544
private Map<String, String> getParameters(String param) {

        if (CmsStringUtil.isNotEmpty(param)) {
            return CmsStringUtil.splitAsMap(param, "|", "=");
        }
        return Collections.emptyMap();
    }
302675
public ParameterValue getParameter(String name) {
        if (!getParameters().containsKey(name)) {
            return buildParameterValue();
        }

        return getParameters().get(name);
    }
42136
public String getParameterValue(String name) throws RepositoryConfigurationException
   {
      String value = getParameterValue(name, null);
      if (value == null)
         throw new RepositoryConfigurationException("Parameter " + name + " not found ");
      return value;
   }
56874
public static String addParamToState(String state, String paramName, String value) {

        return state + PARAM_SEPARATOR + paramName + PARAM_ASSIGN + CmsEncoder.encode(value, CmsEncoder.ENCODING_UTF_8);
    }
227235
public static String getOptionalStringParam(JSONObject params, String paramName) {
		if (params.containsKey(paramName)) {
			return params.getString(paramName);
		}
		return null;
	}
803160
public static Map<String, Object> getParamMap(final Condition condition) {
    final Map<String, Object> params = new HashMap<String, Object>();
    if (!Strings.contains(condition.getContent(), "?")) {
      final List<String> paramNames = condition.getParamNames();
      /*
       * Abort check param and names for it will updated by params invocation
       * if (paramNames.size() > condition.getParams().size()) { throw new RuntimeException(
       * "condition params not set [" + condition.getContent() + "] with value:" +
       * condition.getParams()); }
       */
      for (int i = 0; i < paramNames.size(); i++) {
        if (i >= condition.getParams().size()) break;
        params.put(paramNames.get(i), condition.getParams().get(i));
      }
    }
    return params;
  }
166327
public static String getParameter(final Request request, final String parameterName)
	{
		String parameterValue = request.getRequestParameters().getParameterValue(parameterName)
			.toString();
		if ((parameterValue == null) || parameterValue.isEmpty())
		{
			parameterValue = request.getPostParameters().getParameterValue(parameterName)
				.toString();
		}
		if ((parameterValue == null) || parameterValue.isEmpty())
		{
			parameterValue = request.getQueryParameters().getParameterValue(parameterName)
				.toString();
		}
		if ((parameterValue == null) || parameterValue.isEmpty())
		{
			parameterValue = request.getRequestParameters().getParameterValue(parameterName)
				.toString();
		}
		return parameterValue;
	}
832228
private CmsUUID getIdFromState(String state) {

        CmsUUID result = null;
        String temp = A_CmsWorkplaceApp.getParamFromState(state, "projectId");
        if (CmsUUID.isValidUUID(temp)) {
            result = new CmsUUID(temp);
        }
        return result;
    }
757304
public String getParameter(String name) {
		if(name == null) {
			throw new NullPointerException("the parameter given in parameter is null !");
		}
		String value = this.parameters.get(name);
		if(value != null) {
			return RFC2396UrlDecoder.decode(value);
		} else {
			if("lr".equals(name)) return "";// special case to pass Addressing spec test from 289 TCK
		}
		return null;
	}
1315365
public String getParameter( String name )
    {
        if (_parameters == null || !_parameters.hasParameters())
            return null;

        List parameters = _parameters.getParameterValues(name);
        if(parameters != null && parameters.size() > 0)
            return (String)parameters.get(0);
        else return null;
    }
13854
public static String[] extractParameterMultiple(String name, Map parameters) {
		String paramValues = extractParameter(name, parameters);
		return StringUtils.stripAll(StringUtils.split(paramValues, ", "));
	}
1259053
private String getOptionalParameter(String keyword,
                                        Map<String, String> parms) {
        if (!parms.containsKey(keyword)) {
            return null;
        }

        String value = parms.get(keyword);
        if (value == null) {
            throw new ValidatorProcessUsageException("If parameter '" + keyword
                    + "' is provided, it must have a value.");
        } else {
            return value;
        }
    }
1208447
public Integer getStateId(S state){
		Integer id = states.get(state);
		if (id == null){
			throw new IllegalArgumentException("State '" + state + "' has not been defined.");
		}
		return id;
	}
941357
@SuppressWarnings("rawtypes")
    protected String parseStringParameter(Map params, String paramName) {
        Object paramModel = params.get(paramName);
        if (paramModel == null) {
            return null;
        }
        if (!(paramModel instanceof SimpleScalar)) {
            throw new IllegalArgumentException(paramName + " must be string");
        }
        return ((SimpleScalar)paramModel).getAsString();
    }
442704
public String paramo(String name) {
        String ret = routeResult.pathParams().get(name);
        if (ret != null) {
            return ret;
        }

        if (bodyParams != null && bodyParams.containsKey(name)) {
            return bodyParams.get(name).get(0);
        }

        ret = routeResult.queryParam(name);
        if (ret != null) {
            return ret;
        }

        return null;
    }
1239560
public static CmsCroppingParamBean parseScaleParam(String param) {

        CmsCroppingParamBean result = new CmsCroppingParamBean();
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(param)) {
            return result;
        }
        String[] parameters = param.split(SCALE_PARAM_DELIMITER);
        for (int i = 0; i < parameters.length; i++) {
            String scaleParam = parameters[i].trim();
            if (scaleParam.startsWith(SCALE_PARAM_TARGETHEIGHT + SCALE_PARAM_COLON)) {
                result.setTargetHeight(parseValue(SCALE_PARAM_TARGETHEIGHT, scaleParam));
                continue;
            }
            if (scaleParam.startsWith(SCALE_PARAM_TARGETWIDTH + SCALE_PARAM_COLON)) {
                result.setTargetWidth(parseValue(SCALE_PARAM_TARGETWIDTH, scaleParam));
                continue;
            }
            if (scaleParam.startsWith(SCALE_PARAM_CROP_X + SCALE_PARAM_COLON)) {
                result.setCropX(parseValue(SCALE_PARAM_CROP_X, scaleParam));
                continue;
            }
            if (scaleParam.startsWith(SCALE_PARAM_CROP_Y + SCALE_PARAM_COLON)) {
                result.setCropY(parseValue(SCALE_PARAM_CROP_Y, scaleParam));
                continue;
            }
            if (scaleParam.startsWith(SCALE_PARAM_CROP_HEIGHT + SCALE_PARAM_COLON)) {
                result.setCropHeight(parseValue(SCALE_PARAM_CROP_HEIGHT, scaleParam));
                continue;
            }
            if (scaleParam.startsWith(SCALE_PARAM_CROP_WIDTH + SCALE_PARAM_COLON)) {
                result.setCropWidth(parseValue(SCALE_PARAM_CROP_WIDTH, scaleParam));
                continue;
            }
        }
        return result;
    }