/** * Convenience method for retrieving a single parameter. * * @param name name of the parameter to retrieve * @return the first parameter from the parameter list with the specified name */ public final <T extends Parameter> T getParameter(final String name) { return getParameters().getParameter(name); }
/** * Ensure a parameter doesn't occur in the specified list. * @param paramName the name of a parameter * @param parameters a list of parameters * @throws ValidationException thrown when the specified property * is found in the list of properties */ public void assertNone(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameter(paramName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {paramName}); } }
/** * Ensure a parameter doesn't occur in the specified list. * @param paramName the name of a parameter * @param parameters a list of parameters * @throws ValidationException thrown when the specified property * is found in the list of properties */ public void assertNone(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameter(paramName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {paramName}); } }
/** * @param prop * @param name * @return Parameter */ public static Parameter getParameter(final Property prop, final String name) { ParameterList parl = prop.getParameters(); if (parl == null) { return null; } return parl.getParameter(name); }
/** Return the AltRep parameter if it exists * * @param prop * @return AltRep */ public static AltRep getAltRep(final Property prop) { return (AltRep)prop.getParameters().getParameter("ALTREP"); }
/** * Ensure a parameter doesn't occur in the specified list. * @param paramName the name of a parameter * @param parameters a list of parameters * @throws ValidationException thrown when the specified property * is found in the list of properties */ public void assertNone(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameter(paramName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {paramName}); } }
/** * Convenience method for retrieving a single parameter. * * @param name name of the parameter to retrieve * @return the first parameter from the parameter list with the specified name */ public final <T extends Parameter> T getParameter(final String name) { return getParameters().getParameter(name); }
/** * Convenience method for retrieving a single parameter. * * @param name name of the parameter to retrieve * @return the first parameter from the parameter list with the specified name */ public final Parameter getParameter(final String name) { return getParameters().getParameter(name); }
/** * Ensure a parameter doesn't occur in the specified list. * @param paramName the name of a parameter * @param parameters a list of parameters * @throws ValidationException thrown when the specified property * is found in the list of properties */ public void assertNone(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameter(paramName) != null) { throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {paramName}); } }
/** * Convenience method for retrieving a single parameter. * * @param name name of the parameter to retrieve * @return the first parameter from the parameter list with the specified name */ public final Parameter getParameter(final String name) { return getParameters().getParameter(name); }
protected static String fromXParameter(ParameterList parameterList, String parameterName) { if (parameterName == null) { return null; } Parameter parameter = parameterList.getParameter(parameterName); if (parameter != null) { return parameter.getValue(); } return null; }
/** * @param p * @return String */ public static String getVenue(final Property p) { ParameterList pars = p.getParameters(); Parameter par = pars.getParameter(Parameter.VVENUE); if (par == null) { return null; } return par.getValue(); }
private static String getUidPar(final Property p) { ParameterList pars = p.getParameters(); Parameter par = pars.getParameter(BwXproperty.xparUid); if (par == null) { return null; } return par.getValue(); }
public Boolean isAnyTime() { DtStart dtStart = getEvent().getStartDate(); if (dtStart == null) { return Boolean.FALSE; } Parameter parameter = dtStart.getParameters() .getParameter(PARAM_X_OSAF_ANYTIME); if (parameter == null) { return Boolean.FALSE; } return Boolean.valueOf(VALUE_TRUE.equals(parameter.getValue())); }
/** * @param param a parameter instance * @param parameters a list of parameters * @throws ValidationException where the assertion fails */ public void assertNullOrEqual(final Parameter param, final ParameterList parameters) throws ValidationException { final Parameter p = parameters.getParameter(param.getName()); if (p != null && !param.equals(p)) { throw new ValidationException(ASSERT_NULL_OR_EQUAL_MESSAGE, new Object[] {p}); } }
/** * @param param a parameter instance * @param parameters a list of parameters * @throws ValidationException where the assertion fails */ public void assertNullOrEqual(final Parameter param, final ParameterList parameters) throws ValidationException { final Parameter p = parameters.getParameter(param.getName()); if (p != null && !param.equals(p)) { throw new ValidationException(ASSERT_NULL_OR_EQUAL_MESSAGE, new Object[] {p}); } }
/** * @param param a parameter instance * @param parameters a list of parameters * @throws ValidationException where the assertion fails */ public void assertNullOrEqual(final Parameter param, final ParameterList parameters) throws ValidationException { final Parameter p = parameters.getParameter(param.getName()); if (p != null && !param.equals(p)) { throw new ValidationException(ASSERT_NULL_OR_EQUAL_MESSAGE, new Object[] {p}); } }
/** * @param param a parameter instance * @param parameters a list of parameters * @throws ValidationException where the assertion fails */ public void assertNullOrEqual(final Parameter param, final ParameterList parameters) throws ValidationException { final Parameter p = parameters.getParameter(param.getName()); if (p != null && !param.equals(p)) { throw new ValidationException(ASSERT_NULL_OR_EQUAL_MESSAGE, new Object[] {p}); } }
/** * @param param a parameter instance * @param parameters a list of parameters * @throws ValidationException where the assertion fails */ public void assertNullOrEqual(final Parameter param, final ParameterList parameters) throws ValidationException { final Parameter p = parameters.getParameter(param.getName()); if (p != null && !param.equals(p)) { throw new ValidationException(ASSERT_NULL_OR_EQUAL_MESSAGE, new Object[] {p}); } }
protected static void replaceParameter(ParameterList parameterList, Parameter parameter) { if (parameter == null) { return; } Parameter existingParam = parameterList.getParameter(parameter.getName()); if (existingParam != null) { parameterList.remove(existingParam); } parameterList.add(parameter); }