/** * Ensure a parameter occurs no more than once. * * @param paramName * the parameter name * @param parameters * a list of parameters to query * @throws ValidationException * when the specified parameter occurs more than once */ public void assertOneOrLess(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() > 1) { throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {paramName}); } }
/** * Ensure a parameter occurs no more than once. * * @param paramName * the parameter name * @param parameters * a list of parameters to query * @throws ValidationException * when the specified parameter occurs more than once */ public void assertOneOrLess(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() > 1) { throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {paramName}); } }
/** * Ensure a parameter occurs no more than once. * * @param paramName * the parameter name * @param parameters * a list of parameters to query * @throws ValidationException * when the specified parameter occurs more than once */ public void assertOneOrLess(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() > 1) { throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {paramName}); } }
/** * Ensure a parameter occurs no more than once. * * @param paramName * the parameter name * @param parameters * a list of parameters to query * @throws ValidationException * when the specified parameter occurs more than once */ public void assertOneOrLess(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() > 1) { throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {paramName}); } }
/** * Ensure a parameter occurs once. * * @param paramName * the parameter name * @param parameters * a list of parameters to query * @throws ValidationException * when the specified parameter does not occur once */ public void assertOne(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() != 1) { throw new ValidationException(ASSERT_ONE_MESSAGE, new Object[] {paramName}); } }
/** * Ensure a parameter occurs once. * * @param paramName * the parameter name * @param parameters * a list of parameters to query * @throws ValidationException * when the specified parameter does not occur once */ public void assertOne(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() != 1) { throw new ValidationException(ASSERT_ONE_MESSAGE, new Object[] {paramName}); } }
/** * Ensure a parameter occurs once. * * @param paramName * the parameter name * @param parameters * a list of parameters to query * @throws ValidationException * when the specified parameter does not occur once */ public void assertOne(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() != 1) { throw new ValidationException(ASSERT_ONE_MESSAGE, new Object[] {paramName}); } }
/** * Ensure a parameter occurs once. * * @param paramName * the parameter name * @param parameters * a list of parameters to query * @throws ValidationException * when the specified parameter does not occur once */ public void assertOne(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() != 1) { throw new ValidationException(ASSERT_ONE_MESSAGE, new Object[] {paramName}); } }
/** * Ensure a parameter occurs no more than once. * * @param paramName * the parameter name * @param parameters * a list of parameters to query * @throws ValidationException * when the specified parameter occurs more than once */ public void assertOneOrLess(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() > 1) { throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {paramName}); } }
/** * Ensure a parameter occurs once. * * @param paramName * the parameter name * @param parameters * a list of parameters to query * @throws ValidationException * when the specified parameter does not occur once */ public void assertOne(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() != 1) { throw new ValidationException(ASSERT_ONE_MESSAGE, new Object[] {paramName}); } }
public static void addFields(final JsonGenerator jgen, final Property prop) throws CalFacadeException { try { jgen.writeStartObject(); ParameterList pl = prop.getParameters(); if ((pl != null) && (pl.size() > 0)) { Iterator it = pl.iterator(); while (it.hasNext()) { Parameter p = (Parameter)it.next(); String nm = p.getName().toLowerCase(); jgen.writeFieldName(nm); if (multiMap.get(nm) == null) { jgen.writeString(p.getValue()); } else { outValue(jgen, p); } } } jgen.writeEndObject(); } catch (Throwable t) { throw new CalFacadeException(t); } }
if (pl.size() > 0) { xml.openTag(XcalTags.parameters);