Runs the certificate configuration update for a given set of sites and workplace URLS.<p>

@param report the report to write to
@param sites the sites
@param workplaceUrls the workplace URLS

@return true if the Letsencrypt update was successful
165103
private boolean run(I_CmsReport report, Collection<CmsSite> sites, Collection<String> workplaceUrls) {

        try {
            DomainGrouping domainGrouping = computeDomainGrouping(sites, workplaceUrls);
            if (domainGrouping.isEmpty()) {
                report.println(
                    org.opencms.ui.apps.Messages.get().container(
                        org.opencms.ui.apps.Messages.RPT_LETSENCRYPT_NO_DOMAINS_0));
                return false;
            }
            String certConfig = domainGrouping.generateCertJson();
            if (!m_configUpdater.update(certConfig)) {
                report.println(
                    org.opencms.ui.apps.Messages.get().container(
                        org.opencms.ui.apps.Messages.RPT_LETSENCRYPT_UPDATE_FAILED_0),
                    I_CmsReport.FORMAT_WARNING);
                return false;
            }
            return true;
        } catch (Exception e) {
            report.println(e);
            return false;
        }
    }
1039118
public void setReportDefinitions(java.util.Collection<ReportDefinition> reportDefinitions) {
        if (reportDefinitions == null) {
            this.reportDefinitions = null;
            return;
        }

        this.reportDefinitions = new java.util.ArrayList<ReportDefinition>(reportDefinitions);
    }
334054
public static ro.nextreports.server.domain.Report renameImagesAsUnique(ro.nextreports.server.domain.Report report) {
        NextContent reportContent = (NextContent) report.getContent();
		try {
			String masterContent = new String(reportContent.getNextFile().getDataProvider().getBytes(), "UTF-8");
			for (JcrFile imageFile : reportContent.getImageFiles()) {
				String oldName = imageFile.getName();
				int index = oldName.lastIndexOf(ro.nextreports.server.report.util.ReportUtil.EXTENSION_SEPARATOR);
				String newName = oldName.substring(0, index) + ro.nextreports.server.report.util.ReportUtil.IMAGE_DELIM
						+ UUID.randomUUID().toString() + oldName.substring(index);
				masterContent = masterContent.replaceAll(oldName, newName);
				imageFile.setName(newName);
			}
			JcrFile templateFile = reportContent.getTemplateFile();
			if (templateFile != null) {
				String oldName = templateFile.getName();
				int index = oldName.lastIndexOf(ro.nextreports.server.report.util.ReportUtil.EXTENSION_SEPARATOR);
				String newName = oldName.substring(0, index) + ro.nextreports.server.report.util.ReportUtil.IMAGE_DELIM
						+ UUID.randomUUID().toString() + oldName.substring(index);
				masterContent = masterContent.replaceAll(oldName, newName);
				templateFile.setName(newName);
			}
			
			reportContent.getNextFile().setDataProvider(new JcrDataProviderImpl(masterContent.getBytes("UTF-8")));
		} catch (UnsupportedEncodingException e) {
			LOG.error("Error inside renameImagesAsUnique: " + e.getMessage(), e);
			e.printStackTrace();
		}

        return report;
    }
1004412
public void setEnabledCipherSuites(String[] suites) throws SSLException {
        if (this.isOutbound) {
            this.sslConnLink.getSSLEngine().setEnabledCipherSuites(suites);
        } else {
            throw new SocketEstablishedSSLException("Error, established setting cannot be modified.");
        }
    }
1279310
public boolean isMatching(CmsSiteMatcher matcher) {

        boolean result = m_siteMatcherSites.get(matcher) != null;
        if (!result) {
            // try to match the workplace site
            result = isWorkplaceRequest(matcher);
        }
        return result;
    }
141058
@POST
  @Path("/report")
  @Consumes(SmileMediaTypes.APPLICATION_JACKSON_SMILE)
  public Response report(
      PushedSegmentsReport report,
      @Context final HttpServletRequest req
  )
  {
    ChatHandlers.authorizationCheck(
        req,
        Action.WRITE,
        getDataSource(),
        authorizerMapper
    );
    if (runner == null) {
      return Response.status(Response.Status.SERVICE_UNAVAILABLE).entity("task is not running yet").build();
    } else {
      runner.collectReport(report);
      return Response.ok().build();
    }
  }
693141
public void addWorkplaceServer(String workplaceServer, String sslmode) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0));
        }
        if (!m_workplaceServers.containsKey(workplaceServer)) {
            m_workplaceServers.put(workplaceServer, CmsSSLMode.getModeFromXML(sslmode));
        }
    }
1070635
public void setCcAddresses(java.util.Collection<String> ccAddresses) {
        if (ccAddresses == null) {
            this.ccAddresses = null;
            return;
        }

        this.ccAddresses = new com.amazonaws.internal.SdkInternalList<String>(ccAddresses);
    }
816763
public static base_responses update(nitro_service client, sslvserver resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			sslvserver updateresources[] = new sslvserver[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new sslvserver();
				updateresources[i].vservername = resources[i].vservername;
				updateresources[i].cleartextport = resources[i].cleartextport;
				updateresources[i].dh = resources[i].dh;
				updateresources[i].dhfile = resources[i].dhfile;
				updateresources[i].dhcount = resources[i].dhcount;
				updateresources[i].ersa = resources[i].ersa;
				updateresources[i].ersacount = resources[i].ersacount;
				updateresources[i].sessreuse = resources[i].sessreuse;
				updateresources[i].sesstimeout = resources[i].sesstimeout;
				updateresources[i].cipherredirect = resources[i].cipherredirect;
				updateresources[i].cipherurl = resources[i].cipherurl;
				updateresources[i].sslv2redirect = resources[i].sslv2redirect;
				updateresources[i].sslv2url = resources[i].sslv2url;
				updateresources[i].clientauth = resources[i].clientauth;
				updateresources[i].clientcert = resources[i].clientcert;
				updateresources[i].sslredirect = resources[i].sslredirect;
				updateresources[i].redirectportrewrite = resources[i].redirectportrewrite;
				updateresources[i].nonfipsciphers = resources[i].nonfipsciphers;
				updateresources[i].ssl2 = resources[i].ssl2;
				updateresources[i].ssl3 = resources[i].ssl3;
				updateresources[i].tls1 = resources[i].tls1;
				updateresources[i].tls11 = resources[i].tls11;
				updateresources[i].tls12 = resources[i].tls12;
				updateresources[i].snienable = resources[i].snienable;
				updateresources[i].pushenctrigger = resources[i].pushenctrigger;
				updateresources[i].sendclosenotify = resources[i].sendclosenotify;
				updateresources[i].dtlsprofilename = resources[i].dtlsprofilename;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
864338
public static base_responses update(nitro_service client, sslocspresponder resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			sslocspresponder updateresources[] = new sslocspresponder[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new sslocspresponder();
				updateresources[i].name = resources[i].name;
				updateresources[i].url = resources[i].url;
				updateresources[i].cache = resources[i].cache;
				updateresources[i].cachetimeout = resources[i].cachetimeout;
				updateresources[i].batchingdepth = resources[i].batchingdepth;
				updateresources[i].batchingdelay = resources[i].batchingdelay;
				updateresources[i].resptimeout = resources[i].resptimeout;
				updateresources[i].respondercert = resources[i].respondercert;
				updateresources[i].trustresponder = resources[i].trustresponder;
				updateresources[i].producedattimeskew = resources[i].producedattimeskew;
				updateresources[i].signingcert = resources[i].signingcert;
				updateresources[i].usenonce = resources[i].usenonce;
				updateresources[i].insertclientcert = resources[i].insertclientcert;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
858503
public static boolean checkForParametersWithDefaultSource(Report report) {
    	Map<String, QueryParameter> params = getUsedParametersMap(report);
        for (QueryParameter qp : params.values()) {
        	if ((qp.getDefaultSource() != null) && !qp.getDefaultSource().equals("")) {
        		return true;
        	}
        }
        return false;
    }
325071
public void checkWorkplaceRequest(HttpServletRequest request, CmsObject cms) {

        try {
            if ((OpenCms.getSiteManager().getSites().size() > 1)
                && !OpenCms.getSiteManager().isWorkplaceRequest(request)) {
                // this is a multi site-configuration, but not a request to the configured Workplace site

                CmsUser user = cms.getRequestContext().getCurrentUser();
                // to limit the number of times broadcast is called for a user, we use an expiring cache
                // with the user name as  key
                if (null == m_workplaceServerUserChecks.getIfPresent(user.getName())) {
                    m_workplaceServerUserChecks.put(user.getName(), "");
                    OpenCms.getSessionManager().sendBroadcast(
                        null,
                        Messages.get().getBundle(getWorkplaceLocale(cms)).key(
                            Messages.ERR_WORKPLACE_SERVER_CHECK_FAILED_0),
                        user);

                }

            }
        } catch (Exception e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
1083390
@SuppressWarnings("deprecation")
    public void validateLinks(CmsObject cms) throws CmsException {

        if (m_report == null) {
            m_report = new CmsLogReport(cms.getRequestContext().getLocale(), CmsExternalLinksValidator.class);
        }

        m_report.println(
            Messages.get().container(Messages.RPT_VALIDATE_EXTERNAL_LINKS_BEGIN_0),
            I_CmsReport.FORMAT_HEADLINE);

        // get all links

        int pointerId = OpenCms.getResourceManager().getResourceType(
            CmsResourceTypePointer.getStaticTypeName()).getTypeId();
        CmsResourceFilter filter = CmsResourceFilter.ONLY_VISIBLE_NO_DELETED.addRequireType(pointerId);
        List<CmsResource> links = cms.readResources("/", filter);
        Iterator<CmsResource> iterator = links.iterator();
        Map<String, String> brokenLinks = new HashMap<String, String>();

        for (int i = 1; iterator.hasNext(); i++) {
            CmsFile link = cms.readFile(cms.getSitePath(iterator.next()), filter);
            String linkUrl = new String(link.getContents());

            // print to the report
            m_report.print(
                org.opencms.report.Messages.get().container(
                    org.opencms.report.Messages.RPT_SUCCESSION_1,
                    new Integer(i),
                    new Integer(links.size())),
                I_CmsReport.FORMAT_NOTE);
            m_report.print(Messages.get().container(Messages.RPT_VALIDATE_LINK_0), I_CmsReport.FORMAT_NOTE);
            m_report.print(
                org.opencms.report.Messages.get().container(
                    org.opencms.report.Messages.RPT_ARGUMENT_1,
                    link.getRootPath()));
            m_report.print(Messages.get().container(Messages.GUI_LINK_POINTING_TO_0), I_CmsReport.FORMAT_NOTE);
            m_report.print(
                org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_ARGUMENT_1, linkUrl));
            m_report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0));

            // check link and append it to the list of broken links, if test fails
            if (!checkUrl(cms, linkUrl)) {
                brokenLinks.put(link.getRootPath(), linkUrl);
                m_report.println(Messages.get().container(Messages.RPT_BROKEN_0), I_CmsReport.FORMAT_ERROR);
            } else {
                m_report.println(
                    org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0),
                    I_CmsReport.FORMAT_OK);
            }
        }

        m_report.println(
            Messages.get().container(
                Messages.RPT_LINK_VALIDATION_STAT_2,
                new Integer(links.size()),
                new Integer(brokenLinks.size())),
            I_CmsReport.FORMAT_HEADLINE);
        m_report.println(
            Messages.get().container(Messages.RPT_VALIDATE_EXTERNAL_LINKS_END_0),
            I_CmsReport.FORMAT_HEADLINE);

        OpenCms.getLinkManager().setPointerLinkValidationResult(new CmsExternalLinksValidationResult(brokenLinks));
    }
283799
public void setTlsCertificates(java.util.Collection<LoadBalancerTlsCertificate> tlsCertificates) {
        if (tlsCertificates == null) {
            this.tlsCertificates = null;
            return;
        }

        this.tlsCertificates = new java.util.ArrayList<LoadBalancerTlsCertificate>(tlsCertificates);
    }
956436
public static ro.nextreports.server.domain.Report restoreImagesName(ro.nextreports.server.domain.Report report) {
        NextContent reportContent = (NextContent) report.getContent();
        JcrFile masterFile = reportContent.getNextFile();
		try {
			String masterContent = new String(masterFile.getDataProvider().getBytes(), "UTF-8");
			if (reportContent.getImageFiles() != null) {
				for (JcrFile imageFile : reportContent.getImageFiles()) {
					String oldName = imageFile.getName();
					int startIndex = oldName.indexOf(ro.nextreports.server.report.util.ReportUtil.IMAGE_DELIM);
					int extIndex = oldName.lastIndexOf(ro.nextreports.server.report.util.ReportUtil.EXTENSION_SEPARATOR);
					String newName;
					if (startIndex < 0) {
						newName = oldName;
					} else {
						newName = oldName.substring(0, startIndex) + oldName.substring(extIndex);
					}
					masterContent = masterContent.replaceAll(oldName, newName);
					imageFile.setName(newName);
					if (LOG.isDebugEnabled()) {
						LOG.debug("Image " + ": " + oldName + " > " + newName);
						// LOG.debug("master = " + master);
					}
				}
			}
			if (reportContent.getTemplateFile() != null) {
				String oldName = reportContent.getTemplateFile().getName();
				int startIndex = oldName.indexOf(ro.nextreports.server.report.util.ReportUtil.IMAGE_DELIM);
				int extIndex = oldName.lastIndexOf(ro.nextreports.server.report.util.ReportUtil.EXTENSION_SEPARATOR);
				String newName;
				if (startIndex < 0) {
					newName = oldName;
				} else {
					newName = oldName.substring(0, startIndex) + oldName.substring(extIndex);
				}
				masterContent = masterContent.replaceAll(oldName, newName);
				reportContent.getTemplateFile().setName(newName);
				if (LOG.isDebugEnabled()) {
					LOG.debug("Template " + ": " + oldName + " > " + newName);
					// LOG.debug("master = " + master);
				}
			}
			masterFile.setDataProvider(new JcrDataProviderImpl(masterContent.getBytes("UTF-8")));
		} catch (UnsupportedEncodingException e) {
			LOG.error("Error inside renameImagesAsUnique: " + e.getMessage(), e);
			e.printStackTrace();
		}

		return report;
    }
711628
public static base_responses update(nitro_service client, appfwprofile resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			appfwprofile updateresources[] = new appfwprofile[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new appfwprofile();
				updateresources[i].name = resources[i].name;
				updateresources[i].starturlaction = resources[i].starturlaction;
				updateresources[i].starturlclosure = resources[i].starturlclosure;
				updateresources[i].denyurlaction = resources[i].denyurlaction;
				updateresources[i].refererheadercheck = resources[i].refererheadercheck;
				updateresources[i].cookieconsistencyaction = resources[i].cookieconsistencyaction;
				updateresources[i].cookietransforms = resources[i].cookietransforms;
				updateresources[i].cookieencryption = resources[i].cookieencryption;
				updateresources[i].cookieproxying = resources[i].cookieproxying;
				updateresources[i].addcookieflags = resources[i].addcookieflags;
				updateresources[i].fieldconsistencyaction = resources[i].fieldconsistencyaction;
				updateresources[i].csrftagaction = resources[i].csrftagaction;
				updateresources[i].crosssitescriptingaction = resources[i].crosssitescriptingaction;
				updateresources[i].crosssitescriptingtransformunsafehtml = resources[i].crosssitescriptingtransformunsafehtml;
				updateresources[i].crosssitescriptingcheckcompleteurls = resources[i].crosssitescriptingcheckcompleteurls;
				updateresources[i].sqlinjectionaction = resources[i].sqlinjectionaction;
				updateresources[i].sqlinjectiontransformspecialchars = resources[i].sqlinjectiontransformspecialchars;
				updateresources[i].sqlinjectiononlycheckfieldswithsqlchars = resources[i].sqlinjectiononlycheckfieldswithsqlchars;
				updateresources[i].fieldformataction = resources[i].fieldformataction;
				updateresources[i].defaultfieldformattype = resources[i].defaultfieldformattype;
				updateresources[i].defaultfieldformatminlength = resources[i].defaultfieldformatminlength;
				updateresources[i].defaultfieldformatmaxlength = resources[i].defaultfieldformatmaxlength;
				updateresources[i].bufferoverflowaction = resources[i].bufferoverflowaction;
				updateresources[i].bufferoverflowmaxurllength = resources[i].bufferoverflowmaxurllength;
				updateresources[i].bufferoverflowmaxheaderlength = resources[i].bufferoverflowmaxheaderlength;
				updateresources[i].bufferoverflowmaxcookielength = resources[i].bufferoverflowmaxcookielength;
				updateresources[i].creditcardaction = resources[i].creditcardaction;
				updateresources[i].creditcard = resources[i].creditcard;
				updateresources[i].creditcardmaxallowed = resources[i].creditcardmaxallowed;
				updateresources[i].creditcardxout = resources[i].creditcardxout;
				updateresources[i].requestcontenttype = resources[i].requestcontenttype;
				updateresources[i].responsecontenttype = resources[i].responsecontenttype;
				updateresources[i].xmldosaction = resources[i].xmldosaction;
				updateresources[i].xmlformataction = resources[i].xmlformataction;
				updateresources[i].xmlsqlinjectionaction = resources[i].xmlsqlinjectionaction;
				updateresources[i].xmlsqlinjectiononlycheckfieldswithsqlchars = resources[i].xmlsqlinjectiononlycheckfieldswithsqlchars;
				updateresources[i].xmlsqlinjectionparsecomments = resources[i].xmlsqlinjectionparsecomments;
				updateresources[i].xmlxssaction = resources[i].xmlxssaction;
				updateresources[i].xmlwsiaction = resources[i].xmlwsiaction;
				updateresources[i].xmlattachmentaction = resources[i].xmlattachmentaction;
				updateresources[i].xmlvalidationaction = resources[i].xmlvalidationaction;
				updateresources[i].xmlerrorobject = resources[i].xmlerrorobject;
				updateresources[i].customsettings = resources[i].customsettings;
				updateresources[i].signatures = resources[i].signatures;
				updateresources[i].xmlsoapfaultaction = resources[i].xmlsoapfaultaction;
				updateresources[i].usehtmlerrorobject = resources[i].usehtmlerrorobject;
				updateresources[i].errorurl = resources[i].errorurl;
				updateresources[i].htmlerrorobject = resources[i].htmlerrorobject;
				updateresources[i].logeverypolicyhit = resources[i].logeverypolicyhit;
				updateresources[i].stripcomments = resources[i].stripcomments;
				updateresources[i].striphtmlcomments = resources[i].striphtmlcomments;
				updateresources[i].stripxmlcomments = resources[i].stripxmlcomments;
				updateresources[i].exemptclosureurlsfromsecuritychecks = resources[i].exemptclosureurlsfromsecuritychecks;
				updateresources[i].defaultcharset = resources[i].defaultcharset;
				updateresources[i].postbodylimit = resources[i].postbodylimit;
				updateresources[i].fileuploadmaxnum = resources[i].fileuploadmaxnum;
				updateresources[i].canonicalizehtmlresponse = resources[i].canonicalizehtmlresponse;
				updateresources[i].enableformtagging = resources[i].enableformtagging;
				updateresources[i].sessionlessfieldconsistency = resources[i].sessionlessfieldconsistency;
				updateresources[i].sessionlessurlclosure = resources[i].sessionlessurlclosure;
				updateresources[i].semicolonfieldseparator = resources[i].semicolonfieldseparator;
				updateresources[i].excludefileuploadfromchecks = resources[i].excludefileuploadfromchecks;
				updateresources[i].sqlinjectionparsecomments = resources[i].sqlinjectionparsecomments;
				updateresources[i].invalidpercenthandling = resources[i].invalidpercenthandling;
				updateresources[i].type = resources[i].type;
				updateresources[i].checkrequestheaders = resources[i].checkrequestheaders;
				updateresources[i].comment = resources[i].comment;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
1246353
public function onGetSiteTransientUpdateThemes($report)
    {
        if ($this->App->Config->§specs['§in_wp']) {
            return $report; // Not applicable.
        } // i.e., Available inside WordPress already.
        // i.e., The project is hosted by WordPress.org.

        if ($this->App->Config->§specs['§type'] !== 'theme') {
            return $report; // Not applicable.
        } // i.e., Applies only to theme instances.

        if (!is_object($report)) { // e.g., Does not exist yet?
            $report = (object) []; // Force object instance.
        }
        if (!isset($report->response) || !is_array($report->response)) {
            $report->response = []; // Force an array value.
        }
        $theme_url      = $this->s::brandUrl('/changelog');
        $theme_slug     = $this->App->Config->©brand['§product_slug'];
        $latest_version = $this->latestVersion(); // Latest available.

        if (version_compare($latest_version, $this->App::VERSION, '>')) {
            if (($latest_package = $this->latestPackage())) {
                $report->response[$theme_slug] = (object) [
                    'theme'       => $theme_slug,
                    'url'         => $theme_url,
                    'new_version' => $latest_version,
                    'package'     => $theme_package,
                ];
            } // ↑ If we can acquire latest package also.
        }
        return $report; // With possible update for this app.
    }