/** * Adds a parameter to this request. * * @param parameter to be added. */ public void addParameter(Parameter parameter) { parameters.put(parameter.getKey(), parameter.getValue()); }
/** * Constructor. * * @param method the method or operation to be executed. * See {@link OperationType}. * @param id the id of the request. * @param waveId the wave id to apply this operation to. * @param waveletId the wavelet id to apply this operation to. * @param blipId the blip id to apply this operation to. * @param params additional parameters for this operation. See * {@link ParamsProperty}. */ public OperationRequest(String method, String id, String waveId, String waveletId, String blipId, Parameter... params) { this.method = method; this.id = id; this.parameters = new HashMap<ParamsProperty, Object>(params.length + 3); setWaveId(waveId); setWaveletId(waveletId); setBlipId(blipId); for (Parameter parameter : params) { this.parameters.put(parameter.getKey(), parameter.getValue()); } }