/*
(non-Javadoc)

@see io.parallec.core.taskbuilder.targethosts.ITargetHostsBuilder#
setTargetHostsFromCmsQueryUrl(java.lang.String)
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;

    }
1069936
public void setTargetedLocations(com.google.api.ads.admanager.axis.v201811.Location[] targetedLocations) {
        this.targetedLocations = targetedLocations;
    }
955610
public void setTargetForlder(CmsResource resource) {

        if (resource.isFolder()) {
            if (m_context.getResources().size() == 1) {
                try {
                    if (m_dialogMode.equals(DialogMode.copy)
                        | (m_dialogMode.equals(DialogMode.copy_and_move)
                            && CmsResource.getParentFolder(m_context.getResources().get(0).getRootPath()).equals(
                                resource.getRootPath()))) {
                        m_targetPath.setValue(getTargetName(m_context.getResources().get(0), resource));
                    } else {

                        m_targetPath.setValue(
                            getCms().getSitePath(resource) + getTargetName(m_context.getResources().get(0), resource));
                    }
                } catch (CmsException e) {
                    m_targetPath.setValue(getCms().getSitePath(resource));
                }
            } else {
                m_targetPath.setValue(getCms().getSitePath(resource));
            }

            updateDefaultActions(resource.getRootPath());
        } else {
            throw new CmsIllegalArgumentException(
                org.opencms.workplace.commons.Messages.get().container(
                    org.opencms.workplace.commons.Messages.ERR_COPY_MULTI_TARGET_NOFOLDER_1,
                    A_CmsUI.getCmsObject().getSitePath(resource)));
        }
    }
56241
public void setUrl(final String url) {
		String currUrl = getUrl();

		if (!Objects.equals(url, currUrl)) {
			getOrCreateComponentModel().url = url;
		}
	}
817944
public void setTargetAddress(String targetAddress)
    {
        try
        {
            this.JOB.setDialstring(targetAddress);
        }
        catch(Exception exception)
        {
            throw new FaxException("Error while setting job target address.",exception);
        }
    }
157360
public void addMappingTarget(String mapping, RequestProcessor target) throws Exception {
        this.requestMapper.addMapping(mapping, target);
    }
1107663
public void setUrl(String url) throws IOException {
    if (failException != null) {
      throw failException;
    }

    sessionInfo.url = url;

    SessionInfo newInfo = new SessionInfo(sessionInfo);
    cmNotifier.addCall(
      new ClusterManagerService.sessionUpdateInfo_args(sessionId, newInfo));
  }
938606
public void setUrlMapper(QuerySpecUrlMapper urlMapper) {
        checkNotConfiguredYet();
        PreconditionUtil.verify(urlMapper != null, "urlMapper parameter must not be null");
        moduleRegistry.setUrlMapper(urlMapper);
    }
350322
public void setTargetFilters(java.util.Map<String, java.util.List<String>> targetFilters) {
        this.targetFilters = targetFilters;
    }
1159744
public void setUrlPatterns(Collection<String> urlPatterns) {
		Assert.notNull(urlPatterns, "UrlPatterns must not be null");
		this.urlPatterns = new LinkedHashSet<>(urlPatterns);
	}
1342929
@SuppressWarnings("deprecation")
    public boolean cancelOnTargetHosts(List<String> targetHosts) {

        boolean success = false;

        try {

            switch (state) {

            case IN_PROGRESS:
                if (executionManager != null
                        && !executionManager.isTerminated()) {
                    executionManager.tell(new CancelTaskOnHostRequest(
                            targetHosts), executionManager);
                    logger.info(
                            "asked task to stop from running on target hosts with count {}...",
                            targetHosts.size());
                } else {
                    logger.info("manager already killed or not exist.. NO OP");
                }
                success = true;
                break;
            case COMPLETED_WITHOUT_ERROR:
            case COMPLETED_WITH_ERROR:
            case WAITING:
                logger.info("will NO OP for cancelOnTargetHost as it is not in IN_PROGRESS state");
                success = true;
                break;
            default:
                break;

            }

        } catch (Exception e) {
            logger.error(
                    "cancel task {} on hosts with count {} error with exception details ",
                    this.getTaskId(), targetHosts.size(), e);
        }

        return success;
    }
1233791
public void setUrl(String url) {
        this.url = url;
        
        if (clazz == null && url != null) {
            setClazz(ElementPlugin.class);
        }
    }
40760
public ListDeploymentTargetsRequest withTargetFilters(java.util.Map<String, java.util.List<String>> targetFilters) {
        setTargetFilters(targetFilters);
        return this;
    }
530351
public void setTileUrls(List<String> tileUrls) {
		this.tileUrls = tileUrls;
		if (null != urlStrategy) {
			urlStrategy.setUrls(tileUrls);
		}
	}
221653
public void setServiceEndPointUrl(String url) {
		ServiceDefTarget endpoint = (ServiceDefTarget) service;
		endpoint.setServiceEntryPoint(url);
	}
637777
public ParallelTaskBuilder setTargetHostsFromLineByLineText(
            String sourcePath, HostsSourceType sourceType)
            throws TargetHostsLoadException {

        this.targetHosts = targetHostBuilder.setTargetHostsFromLineByLineText(sourcePath,
                sourceType);
        return this;
    }
1312903
private static HttpHost determineTarget(HttpUriRequest request) throws ClientProtocolException {
		// A null target may be acceptable if there is a default target.
		// Otherwise, the null target is detected in the director.
		HttpHost target = null;
		URI requestURI = request.getURI();
		if (requestURI.isAbsolute()) {
			target = URIUtils.extractHost(requestURI);
			if (target == null) {
				throw new ClientProtocolException(
						"URI does not specify a valid host name: " + requestURI);
			}
		}
		return target;
	}