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, not null
7066
public WebTarget appendPathAndQueryParameters(final WebTarget webTarget) {
    ArgumentChecker.notNull(webTarget, "webTarget");
    WebTarget resultTarget = webTarget;
    resultTarget = resultTarget.path(MULTI_SET_NAME + EXTENSION);
    resultTarget = resultTarget.queryParam(COLUMNS_PARAM, buildCodeList(_quandlCodes));
    // This is a hack that stops Quandl from returning all the data as part of the query
    resultTarget = resultTarget.queryParam(EXCLUDE_DATA_PARAM, INFINITE_FUTURE);
    return resultTarget;
  }
31998
@RequestMapping(value = "builds/{buildId}/links/{targetBuildId}", method = RequestMethod.PUT)
    public Build addBuildLink(@PathVariable ID buildId, @PathVariable ID targetBuildId) {
        Build build = structureService.getBuild(buildId);
        Build targetBuild = structureService.getBuild(targetBuildId);
        structureService.addBuildLink(build, targetBuild);
        return build;
    }
792200
@Override
    public T addAsWebInfResource(final String resourceName) throws IllegalArgumentException {
        Validate.notNull(resourceName, "ResourceName should be specified");

        return addAsWebInfResource(new ClassLoaderAsset(resourceName),
            AssetUtil.getNameForClassloaderResource(resourceName));
    }
52098
public CmsResource getTarget(CmsObject cms, CmsResourceFilter filter) throws CmsException {

        try {
            // first look up by id
            return cms.readResource(getTargetId(), filter);
        } catch (CmsVfsResourceNotFoundException e) {
            // then look up by name, but from the root site
            String storedSiteRoot = cms.getRequestContext().getSiteRoot();
            try {
                cms.getRequestContext().setSiteRoot("");
                return cms.readResource(getTargetPath(), filter);
            } finally {
                cms.getRequestContext().setSiteRoot(storedSiteRoot);
            }
        }
    }
496246
@Override
    public T addAsWebInfResource(final File resource, final String target) throws IllegalArgumentException {
        Validate.notNull(resource, "Resource should be specified");
        Validate.notNullOrEmpty(target, "Target should be specified");

        return addAsWebInfResource(new FileAsset(resource), target);
    }
295610
protected CmsUploadButton createUploadButtonForTarget(String target, boolean isRootPath) {

        CmsDialogUploadButtonHandler buttonHandler = new CmsDialogUploadButtonHandler(

            new Supplier<I_CmsUploadContext>() {

                public I_CmsUploadContext get() {

                    return new I_CmsUploadContext() {

                        public void onUploadFinished(List<String> uploadedFiles) {

                            getTabHandler().updateIndex();
                        }

                    };
                }
            });

        buttonHandler.setTargetFolder(target);
        buttonHandler.setIsTargetRootPath(isRootPath);
        CmsUploadButton uploadButton = new CmsUploadButton(buttonHandler);
        uploadButton.setText(null);
        uploadButton.setTitle(Messages.get().key(Messages.GUI_GALLERY_UPLOAD_TITLE_1, target));
        uploadButton.setButtonStyle(ButtonStyle.FONT_ICON, null);
        uploadButton.setImageClass(I_CmsButton.UPLOAD_SMALL);
        return uploadButton;
    }
1032584
private BasicInjectionTarget<T> prepareInjectionTarget(BasicInjectionTarget<T> injectionTarget) {
        try {
            postProcess(initialize(validate(injectionTarget)));
            return injectionTarget;
        } catch (Throwable e) {
            throw new IllegalArgumentException(e);
        }
    }
884171
public @NotNull QueryBuilder append(@SuppressWarnings("ParameterHidesMemberVariable") @NotNull SqlQuery query) {
        this.query.append(query.getSql());
        arguments.addAll(query.getArguments());
        return this;
    }
1371556
@Override
    protected String appendAttributeToQuery(final String queryBuilder, final String dataAttribute, final List<Object> queryValues) {
        if (queryBuilder != null) {
            return queryBuilder;
        }

        final String keyAttributeName;
        if (this.queryAttributeName != null) {
            keyAttributeName = this.queryAttributeName;
        } else {
            final IUsernameAttributeProvider usernameAttributeProvider = this.getUsernameAttributeProvider();
            keyAttributeName = usernameAttributeProvider.getUsernameAttribute();
        }

        if (keyAttributeName.equals(dataAttribute)) {
            return String.valueOf(queryValues.get(0));
        }

        return null;
    }
343792
@Override
    public List<String> setTargetHostsFromCmsQueryUrl(String cmsQueryUrl)
            throws TargetHostsLoadException {
        List<String> targetHosts = new ArrayList<String>();
        try {

            logger.info("will use default project label");
            targetHosts = setTargetHostsFromCmsQueryUrl(cmsQueryUrl, "label");
        } catch (Exception e) {
            throw new TargetHostsLoadException("error when reading  "
                    + cmsQueryUrl, e);
        }

        return targetHosts;

    }
858588
private WebTarget withAuthToken(final WebTarget target) {
    if (_sessionOptions.getAuthToken() != null) {
      return target.queryParam(AUTH_TOKEN_PARAM_NAME, _sessionOptions.getAuthToken());
    } else {
      return target;
    }
  }
450910
public void addHeaders(HttpServletRequest reqSource, HttpRequestBase httpTarget)
    {
    	Enumeration<?> headerNames = reqSource.getHeaderNames();
    	while (headerNames.hasMoreElements())
    	{
    		String key = headerNames.nextElement().toString();
    		if (CONTENT_LENGTH.equalsIgnoreCase(key))
    			continue;	// Length will be different
    		Enumeration<?> headers = reqSource.getHeaders(key);
    		while (headers.hasMoreElements())
    		{
    			String value = (String)headers.nextElement();
    			if (HOST.equalsIgnoreCase(key))
    			{
    				value = proxyURLPrefix;
    				if (value.indexOf(":") != -1)
    				{
    					value = value.substring(value.indexOf(":") + 1);
    					while (value.startsWith("/"))
    					{
    						value = value.substring(1);
    					}
    				}
    				if (value.indexOf("/") != -1)
    					value = value.substring(0, value.indexOf("/"));
    			}
    			httpTarget.setHeader(new BasicHeader(key, value));
    		}
    	}
    }
1352860
public String getTargetSite() {
		try {
			String urlstr = wbRequest.getRequestUrl();
			if (urlstr == null) return null;
			URL url = new URL(urlstr);
			return url.getHost();
		} catch (MalformedURLException ex) {
			return null;
		}
	}
877611
@Override
    public T addAsWebInfResource(final URL resource, final String target) throws IllegalArgumentException {
        Validate.notNull(resource, "Resource should be specified");
        Validate.notNullOrEmpty(target, "Target should be specified");

        return addAsWebInfResource(new UrlAsset(resource), target);
    }
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;
  }
956473
public BeadledomWebTarget buildTarget(String baseUrl) {
    BeadledomClient beadledomClient = build();
    return beadledomClient.target(baseUrl);
  }
1171684
private WebResource getResource(WebResource service, APIInfo api, String... pathParams) {
        WebResource resource = service.path(api.getPath());
        resource = appendPathParams(resource, pathParams);
        return resource;
    }