Adds the License key to the client request.
@param request The client request
552340
public void filter(ClientRequestContext request) throws IOException
    {
        if(!request.getHeaders().containsKey("X-License-Key"))
            request.getHeaders().add("X-License-Key", this.licensekey);
    }
966187
private void addPostParams(final Request request) {
        if (capacity != null) {
            request.addPostParam("Capacity", capacity.toString());
        }

        if (available != null) {
            request.addPostParam("Available", available.toString());
        }
    }
1372507
private void addPostParams(final Request request) {
        if (publicKey != null) {
            request.addPostParam("PublicKey", publicKey.toString());
        }

        if (friendlyName != null) {
            request.addPostParam("FriendlyName", friendlyName);
        }

        if (accountSid != null) {
            request.addPostParam("AccountSid", accountSid);
        }
    }
1233842
public void addTransaction(SipServletRequestImpl request) {
        if(!request.getMethod().equalsIgnoreCase("ACK") && !request.getMethod().equalsIgnoreCase("PRACK")) {
                String branch = ((Via)request.getMessage().getHeader(Via.NAME)).getBranch();
                if(this.ongoingTransactions.add(new TransactionRequest(branch, request))) {
                        request.getTransactionApplicationData().setProxyBranch(this);
                        if(logger.isDebugEnabled()) {
                                logger.debug("Added transaction "+branch+" to proxy branch.");
                        }
                }                                               
        }                               
    }
372666
public void registerRequest(InRequestClient request)
  {
    _requestMap.put(request.getStreamId(), request);
    
    if (_requestMap.size() > 100) {
      System.out.println("RMM: " + request);
    }
  }
935327
private void addPostParams(final Request request) {
        if (command != null) {
            request.addPostParam("Command", command);
        }

        if (device != null) {
            request.addPostParam("Device", device);
        }

        if (sim != null) {
            request.addPostParam("Sim", sim);
        }

        if (callbackMethod != null) {
            request.addPostParam("CallbackMethod", callbackMethod);
        }

        if (callbackUrl != null) {
            request.addPostParam("CallbackUrl", callbackUrl.toString());
        }

        if (commandMode != null) {
            request.addPostParam("CommandMode", commandMode);
        }

        if (includeSid != null) {
            request.addPostParam("IncludeSid", includeSid);
        }
    }
849318
private void addQueryParams(final Request request) {
        if (beta != null) {
            request.addQueryParam("Beta", beta.toString());
        }

        if (friendlyName != null) {
            request.addQueryParam("FriendlyName", friendlyName);
        }

        if (phoneNumber != null) {
            request.addQueryParam("PhoneNumber", phoneNumber.toString());
        }

        if (origin != null) {
            request.addQueryParam("Origin", origin);
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
211165
private void addPostParams(final Request request) {
        if (key != null) {
            request.addPostParam("Key", key);
        }

        if (value != null) {
            request.addPostParam("Value", value);
        }
    }
121619
private void addPostParams(final Request request) {
        if (to != null) {
            request.addPostParam("To", to);
        }

        if (mediaUrl != null) {
            request.addPostParam("MediaUrl", mediaUrl.toString());
        }

        if (quality != null) {
            request.addPostParam("Quality", quality.toString());
        }

        if (statusCallback != null) {
            request.addPostParam("StatusCallback", statusCallback.toString());
        }

        if (from != null) {
            request.addPostParam("From", from);
        }

        if (sipAuthUsername != null) {
            request.addPostParam("SipAuthUsername", sipAuthUsername);
        }

        if (sipAuthPassword != null) {
            request.addPostParam("SipAuthPassword", sipAuthPassword);
        }

        if (storeMedia != null) {
            request.addPostParam("StoreMedia", storeMedia.toString());
        }

        if (ttl != null) {
            request.addPostParam("Ttl", ttl.toString());
        }
    }
322556
@POST
    @Path("/{gavc}" + ServerAPI.GET_LICENSES)
    public Response addLicense(@Auth final DbCredential credential,
                               @PathParam("gavc") final String gavc,
                               @QueryParam(ServerAPI.LICENSE_ID_PARAM) final String licenseId){
        if(!credential.getRoles().contains(AvailableRoles.DATA_UPDATER) &&
                !credential.getRoles().contains(AvailableRoles.LICENSE_SETTER)){
            throw new WebApplicationException(Response.status(Response.Status.UNAUTHORIZED).build());
        }

        if(LOG.isInfoEnabled()) {
            LOG.info(String.format("Got a add license request [%s]", gavc));
        }

        if(licenseId == null){
            return Response.serverError().status(HttpStatus.NOT_ACCEPTABLE_406).build();
        }

        getArtifactHandler().addLicenseToArtifact(gavc, licenseId);
        cacheUtils.clear(CacheName.PROMOTION_REPORTS);

        return Response.ok("done").build();
    }
1263085
private void addPostParams(final Request request) {
        if (data != null) {
            request.addPostParam("Data", Converter.mapToJson(data));
        }
    }
875453
private void addPostParams(final Request request) {
        if (configuration != null) {
            request.addPostParam("Configuration", Converter.mapToJson(configuration));
        }

        if (uniqueName != null) {
            request.addPostParam("UniqueName", uniqueName);
        }
    }
176655
private void addQueryParams(final Request request) {
        if (bindingType != null) {
            for (UserBinding.BindingType prop : bindingType) {
                request.addQueryParam("BindingType", prop.toString());
            }
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
565932
private void addQueryParams(final Request request) {
        if (identity != null) {
            for (String prop : identity) {
                request.addQueryParam("Identity", prop);
            }
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
457653
private void addQueryParams(final Request request) {
        if (device != null) {
            request.addQueryParam("Device", device);
        }

        if (sim != null) {
            request.addQueryParam("Sim", sim);
        }

        if (status != null) {
            request.addQueryParam("Status", status);
        }

        if (direction != null) {
            request.addQueryParam("Direction", direction);
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
668949
public void enableDKIM(EnableDKIMRequest request) {
        checkNotNull(request, "object request should not be null.");
        assertStringNotNullOrEmpty(request.getDomainName(), "object domainName should not be null or empty");

        InternalRequest internalRequest =
                this.createRequest("verifiedDomain", request, HttpMethodName.PUT, request.getDomainName());
        internalRequest.addParameter("enable", "enableDkim");

        this.invokeHttpClient(internalRequest, SesResponse.class);
    }
1133947
private void addPostParams(final Request request) {
        if (code != null) {
            request.addPostParam("Code", code);
        }

        if (to != null) {
            request.addPostParam("To", to);
        }
    }