Append any specified parameters to the provided WebTarget.

@param webTarget a web target used by the Jersey Client API, not null
@return the WebTarget with any path and query parameters appended
423560
public WebTarget appendPathAndQueryParameters(final WebTarget webTarget) {
    ArgumentChecker.notNull(webTarget, "webTarget");
    WebTarget resultTarget = webTarget;
    resultTarget = resultTarget.path(DATASETS_RELATIVE_URL + EXTENSION);
    if (_databaseCode != null) {
      resultTarget = resultTarget.queryParam(DATABASE_CODE_PARAM, _databaseCode);
    }
    if (_query != null) {
      resultTarget = resultTarget.queryParam(QUERY_PARAM, _query);
    }
    if (_pageNumber != null) {
      resultTarget = resultTarget.queryParam(PAGE_PARAM, _pageNumber);
    }
    if (_maxDocsPerPage != null) {
      resultTarget = resultTarget.queryParam(PER_PAGE_PARAM, _maxDocsPerPage);
    }
    return resultTarget;
  }
1171684
private WebResource getResource(WebResource service, APIInfo api, String... pathParams) {
        WebResource resource = service.path(api.getPath());
        resource = appendPathParams(resource, pathParams);
        return resource;
    }
594309
public UrlStringBuilder addParameters(String namespace, Map<String, List<String>> parameters) {
        for (final String name : parameters.keySet()) {
            Validate.notNull(name, "parameter map cannot contain any null keys");
        }

        for (final Map.Entry<String, List<String>> newParamEntry : parameters.entrySet()) {
            final String name = newParamEntry.getKey();
            final List<String> values = this.copy(newParamEntry.getValue());

            this.parameters.put(namespace + name, values);
        }
        return this;
    }
661659
public WebTarget appendPathAndQueryParameters(final WebTarget webTarget) {
    ArgumentChecker.notNull(webTarget, "webTarget");
    WebTarget resultTarget = webTarget;
    resultTarget = resultTarget.path(DATASETS_RELATIVE_URL);
    resultTarget = resultTarget.path(_quandlCode + EXTENSION);
    if (_startDate != null) {
      resultTarget = resultTarget.queryParam(START_DATE_PARAM, _startDate.toString());
    }
    if (_endDate != null) {
      resultTarget = resultTarget.queryParam(END_DATE_PARAM, _endDate.toString());
    }
    if (_columnIndex != null) {
      resultTarget = resultTarget.queryParam(COLUMN_INDEX_PARAM, _columnIndex);
    }
    if (_frequency != null) {
      resultTarget = resultTarget.queryParam(FREQUENCY_PARAM, _frequency.getQuandlString());
    }
    if (_maxRows != null) {
      resultTarget = resultTarget.queryParam(MAX_ROWS_PARAM, _maxRows);
    }
    if (_transform != null) {
      resultTarget = resultTarget.queryParam(TRANSFORM_PARAM, _transform.getQuandlString());
    }
    if (_sortOrder != null) {
      resultTarget = resultTarget.queryParam(SORT_ORDER_PARAM, _sortOrder.getQuandlString());
    }
    return resultTarget;
  }
705959
@RequestMapping(value = GET_ALL_TARGETS_URL, method = RequestMethod.GET)
    public ResponseEntity<List<Target>> getAllTargets() throws DeployerException {
        List<Target> targets = targetService.getAllTargets();

        return new ResponseEntity<>(targets,
                                    RestServiceUtils.setLocationHeader(new HttpHeaders(), BASE_URL + GET_ALL_TARGETS_URL),
                                    HttpStatus.OK);
    }
1069374
public void addTargets(final List<IndexTermTarget> targets) {
        int targetNum;

        if (targets == null) {
            return;
        }

        targetNum = targets.size();
        for (int i = 0; i < targetNum; i++) {
            addTarget(targets.get(i));
        }
    }
1347944
@Override
    public T addAsWebResource(URL resource, String target) throws IllegalArgumentException {
        Validate.notNull(resource, "Resource should be specified");
        Validate.notNull(target, "Target should be specified");

        return addAsWebResource(new UrlAsset(resource), target);
    }
2465
public BeadledomWebTarget buildTarget(URI baseUrl) {
    BeadledomClient beadledomClient = build();
    return beadledomClient.target(baseUrl);
  }
378733
@Override
    public T addAsWebResource(File resource, String target) throws IllegalArgumentException {
        Validate.notNull(resource, "Resource should be specified");
        Validate.notNull(target, "Target should be specified");

        return addAsWebResource(new FileAsset(resource), target);
    }
1334528
protected static Set<String> generateUpdateTargets(LofPoint addedPoint, LofDataSet dataSet,
            String deleteId)
    {
        Set<String> updateTargets = new HashSet<>();
        // 以下の条件のいずれかを満たす対象点と追加された対象点に対してK距離、K距離近傍、局所到達可能密度の更新を行う必要がある。
        // 但し、今回追加された対象点は常時対象となるため、判定は行わず、中間データ更新が必要として扱う。
        // 1.削除されたデータをK距離近傍に含む
        // 2.追加された対象点との距離がK距離より小さい。
        updateTargets.add(addedPoint.getDataId());
        Collection<LofPoint> pointList = dataSet.getDataMap().values();
        for (LofPoint targetPoint : pointList)
        {
            boolean isDeteted = false;
            boolean kDistUpdate = false;

            // 今回追加された対象点は判定をスキップ
            if (StringUtils.equals(addedPoint.getDataId(), targetPoint.getDataId()) == true)
            {
                continue;
            }

            // 「1.削除されたデータをK距離近傍に含む」判定
            // K値は高々20～30の値になるのが一般的なため、Listへのcontainsメソッド実行は性能負荷にはならないと判断する。
            if (deleteId != null && targetPoint.getkDistanceNeighbor().contains(deleteId) == true)
            {
                isDeteted = true;
            }

            // 「2.追加された対象点との距離がK距離より小さい。」判定
            if (MathUtils.distance(addedPoint.getDataPoint(), targetPoint.getDataPoint()) < targetPoint.getkDistance())
            {
                kDistUpdate = true;
            }

            if (isDeteted || kDistUpdate)
            {
                updateTargets.add(targetPoint.getDataId());
            }
        }

        return updateTargets;
    }
157360
public void addMappingTarget(String mapping, RequestProcessor target) throws Exception {
        this.requestMapper.addMapping(mapping, target);
    }
968537
public Router<T> addRoute(HttpMethod method, String pathPattern, T target) {
		getMethodlessRouter(method).addRoute(pathPattern, target);
		return this;
	}
707759
public Object createTargetObject(TargetServiceFactory targetServiceFactory) {
		Debug.logVerbose("[JdonFramework] now getTargetObject by visitor ", module);
		Object targetObjRef = null;
		try {
			TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest();
			TargetMetaDef targetMetaDef = targetMetaRequest.getTargetMetaDef();
			if (targetMetaDef.isEJB()) { // cache the ejb object
				ComponentVisitor cm = targetMetaRequest.getComponentVisitor();
				targetMetaRequest.setVisitableName(ComponentKeys.TARGETSERVICE_FACTORY);
				Debug.logVerbose(ComponentKeys.TARGETSERVICE_FACTORY + " in action (cache)", module);
				targetObjRef = cm.visit();
			} else {
				Debug.logVerbose("[JdonFramework] not active targer service instance cache !!!!", module);
				targetObjRef = targetServiceFactory.create();
			}
		} catch (Exception e) {
			Debug.logError("[JdonFramework]createTargetObject error: " + e, module);
		}
		return targetObjRef;
	}
1013218
private void addParameter(final String key, final String value,
        final Map<QueryParameter, String> newParams, final Set<QueryParameter> impl) {

        try {
            final QueryParameter ep = QueryParameter.valueOf(key.toUpperCase());
            if (!impl.contains(ep)) {
                throw new JaxRxException(400, "Parameter '" + key
                    + "' is not supported by the implementation.");
            }

            // append multiple parameters
            final String old = newParams.get(ep);
            // skip multiple key/value combinations if different to OUTPUT
            if (ep != QueryParameter.OUTPUT && ep != QueryParameter.VAR && old != null)
                return;

            // use \1 as delimiter for multiple values
            final char del = ep == QueryParameter.OUTPUT ? ',' : 0x01;
            newParams.put(ep, old == null ? value : old + del + value);
        } catch (final IllegalArgumentException ex) {
            throw new JaxRxException(400, "Parameter '" + key + "' is unknown.");
        }
    }
1102270
protected WebClient instantiateWebClient(URI uri) {
		WebClient webClient = WebClient.create(uri);
		webClient = webClient.accept(MediaType.APPLICATION_JSON);
		webClient = webClient.header(apiAuthHeaderKey, getApitraryApi().getApiKey());
		webClient = webClient.header("Content-Type", contentType);

		HTTPConduit conduit = WebClient.getConfig(webClient).getHttpConduit();
		TLSClientParameters params = conduit.getTlsClientParameters();
		if (params == null) {
			params = new TLSClientParameters();
			conduit.setTlsClientParameters(params);
		}
		params.setDisableCNCheck(true);

		HTTPClientPolicy policy = new HTTPClientPolicy();
		policy.setConnectionTimeout(DEFAULTCONNECTIONTIMEOUT);
		policy.setReceiveTimeout(DEFAULTRECEIVETIMEOUT);
		policy.setAllowChunking(false);
		conduit.setClient(policy);

		return webClient;
	}
324350
protected UrlConfig getUrlConfigForTarget(Adaptable adaptable, Page targetPage) {
    Resource targetResource = null;
    if (targetPage != null) {
      targetResource = targetPage.adaptTo(Resource.class);
    }
    return getUrlConfigForTarget(adaptable, targetResource);
  }
264778
private WebTarget createWebTarget(String restPath, Map<String, String> queryParams) {
		WebTarget webTarget;
		try {
			URI u = new URI(this.baseURI + "/plugins/restapi/v1/" + restPath);
			Client client = createRestClient();

			webTarget = client.target(u);
			if (queryParams != null && !queryParams.isEmpty()) {
				for (Map.Entry<String, String> entry : queryParams.entrySet()) {
					if (entry.getKey() != null && entry.getValue() != null) {
						LOG.debug("PARAM: {} = {}", entry.getKey(), entry.getValue());
						webTarget = webTarget.queryParam(entry.getKey(), entry.getValue());
					}
				}
			}

		} catch (Exception e) {
			throw new IllegalArgumentException("Something went wrong by creating the client: " + e);
		}

		return webTarget;
	}