Configure an {@link FlowResourceFlowViewResolver} capable of resolving view resources by
applying the specified default resource suffix. Default is .jsp.

@param defaultViewSuffix the default view suffix
504299
@Override
    public void setDefaultViewSuffix(String defaultViewSuffix) {
        super.setDefaultViewSuffix(defaultViewSuffix);

        FlowResourceFlowViewResolver internalResourceResolver = new FlowResourceFlowViewResolver();
        internalResourceResolver.setDefaultViewSuffix(defaultViewSuffix);
        this.flowViewResolver = internalResourceResolver;
    }
162149
public static Resource getConsoleResource(BeanContext context) {
        SlingHttpServletRequest request = context.getRequest();
        ResourceResolver resolver = request.getResourceResolver();
        String path = null;
        // use the resource set by a probably executed 'defineObjects' tag (supports including components)
        Resource resource = context.getAttribute("resource", Resource.class);
        if (resource == null) {
            resource = request.getResource();
        }
        if (resource != null) {
            path = resource.getPath();
        }
        // use the suffix as the resource path if the resource is not defined or references a servlet
        if (StringUtils.isBlank(path) || path.startsWith("/bin/")) {
            RequestPathInfo requestPathInfo = request.getRequestPathInfo();
            path = requestPathInfo.getSuffix();
            resource = null;
        }
        if (resource == null && StringUtils.isNotBlank(path)) {
            resource = resolver.getResource(path);
        }
        if (resource == null) {
            // fallback to the root node if the servlet request has no suffix
            resource = resolver.getResource("/");
        }
        return resource;
    }
654541
public static Optional<MultifactorAuthenticationProvider> resolveProvider(final Map<String, MultifactorAuthenticationProvider> providers,
                                                                              final Collection<String> requestMfaMethod) {
        return providers.values()
            .stream()
            .filter(p -> requestMfaMethod.stream().filter(Objects::nonNull).anyMatch(p::matches))
            .findFirst();
    }
385707
private void initEntityResolver() {
        final String entityResolveClazzName = System.getProperty( ExtensibleXmlParser.ENTITY_RESOLVER_PROPERTY_NAME );
        if ( entityResolveClazzName != null && entityResolveClazzName.length() > 0 ) {
            try {

                final Class entityResolverClazz = classLoader.loadClass( entityResolveClazzName );
                this.entityResolver = (EntityResolver) entityResolverClazz.newInstance();
            } catch ( final Exception ignoreIt ) {
            }
        }
    }
1126762
public void setForegroundIconColorDefault() {
        stopForegroundIconColorFadeAnimation();
        foregroundIcon.getStyleClass().clear();
        foregroundIcon.getStyleClass().add(JFXConstants.CSS_ICON);
        foregroundFadeIcon.setFill(Color.TRANSPARENT);
    }
556712
protected void addFilterPathMapping(String pathSpec,
      Context webAppCtx) {
    ServletHandler handler = webAppCtx.getServletHandler();
    for(String name : filterNames) {
      FilterMapping fmap = new FilterMapping();
      fmap.setPathSpec(pathSpec);
      fmap.setFilterName(name);
      fmap.setDispatches(Handler.ALL);
      handler.addFilterMapping(fmap);
    }
  }
102253
public void setResourceAdaptorContext(ResourceAdaptorContext arg0) {
        resourceAdaptorContext = arg0;
        tracer = resourceAdaptorContext.getTracer(HttpClientNIOResourceAdaptor.class.getSimpleName());
        try {
            fireableEventType = resourceAdaptorContext.getEventLookupFacility().getFireableEventType(
                    HttpClientNIOEventTypes.HTTP_CLIENT_NIO_RESPONSE_EVENT_TYPE_ID);
        } catch (Throwable e) {
            throw new RuntimeException(e.getMessage(), e);
        }
        sbbInterface = new HttpClientNIOResourceAdaptorSbbInterfaceImpl(this);
    }
441908
@Nonnull
	private static Properties findDefaultProperties() {
		final InputStream in = SourceCodeFormatter.class.getClassLoader().getResourceAsStream(DEFAULT_PROPERTIES_PATH);
		final Properties p = new Properties();
		try {
			p.load(in);
		} catch (final IOException e) {
			throw new RuntimeException(String.format("Can not load resource %s", DEFAULT_PROPERTIES_PATH));
		}
		return p;
	}
1050297
public String getNoSuffixViewURI(String controllerName, String viewName) {
        FastStringWriter buf = new FastStringWriter();

        return getViewURIInternal(controllerName, viewName, buf, false);
    }
317113
@Override
    ResolveResult<? extends AbstractConfigValue> resolveSubstitutions(ResolveContext context, ResolveSource source) {
        ResolveContext newContext = context.addCycleMarker(this);
        AbstractConfigValue v;
        try {
            ResolveSource.ResultWithPath resultWithPath = source.lookupSubst(newContext, expr, prefixLength);
            newContext = resultWithPath.result.context;

            if (resultWithPath.result.value != null) {
                if (ConfigImpl.traceSubstitutionsEnabled())
                    ConfigImpl.trace(newContext.depth(), "recursively resolving " + resultWithPath
                            + " which was the resolution of " + expr + " against " + source);

                ResolveSource recursiveResolveSource = (new ResolveSource(
                        (AbstractConfigObject) resultWithPath.pathFromRoot.last(), resultWithPath.pathFromRoot));

                if (ConfigImpl.traceSubstitutionsEnabled())
                    ConfigImpl.trace(newContext.depth(), "will recursively resolve against " + recursiveResolveSource);

                ResolveResult<? extends AbstractConfigValue> result = newContext.resolve(resultWithPath.result.value,
                        recursiveResolveSource);
                v = result.value;
                newContext = result.context;
            } else {
                ConfigValue fallback = context.options().getResolver().lookup(expr.path().render());
                v = (AbstractConfigValue) fallback;
            }
        } catch (NotPossibleToResolve e) {
            if (ConfigImpl.traceSubstitutionsEnabled())
                ConfigImpl.trace(newContext.depth(),
                        "not possible to resolve " + expr + ", cycle involved: " + e.traceString());
            if (expr.optional())
                v = null;
            else
                throw new ConfigException.UnresolvedSubstitution(origin(), expr
                        + " was part of a cycle of substitutions involving " + e.traceString(), e);
        }

        if (v == null && !expr.optional()) {
            if (newContext.options().getAllowUnresolved())
                return ResolveResult.make(newContext.removeCycleMarker(this), this);
            else
                throw new ConfigException.UnresolvedSubstitution(origin(), expr.toString());
        } else {
            return ResolveResult.make(newContext.removeCycleMarker(this), v);
        }
    }
1151686
public synchronized void setDefaultSSLContext() throws Exception {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "setDefaultSSLContext");

        if (FrameworkState.isStopping()) {
            return;
        }

        SSLConfig defaultSSLConfig = getDefaultSSLConfig();

        if (defaultSSLConfig != null)
            JSSEProviderFactory.getInstance(null).setServerDefaultSSLContext(defaultSSLConfig);
        else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "There is no default SSLConfig.");
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "setDefaultSSLContext");

    }
466015
public static void loadResourcesDefaults(Properties defaultProperties, String propertiesFileName) throws IOException {
        final String resource = Setup.TEMPLATE_RESOURCES_PATH + "/" + propertiesFileName;
        InputStream is = Preferences.class.getClassLoader().getResourceAsStream(
            resource);
        if(null==is) {
            throw new IOException("Unable to load resource: " + resource);
        }
        try {
            defaultProperties.load(is);
        } finally {
            if (null != is) {
                is.close();
            }
        }
    }
1002625
public static PageFlowController getCurrentPageFlow( HttpServletRequest request, ServletContext servletContext )
    {
        ActionResolver cur = getCurrentActionResolver( request, servletContext );

        if (cur != null && cur.isPageFlow()) {
            PageFlowController pfc = (PageFlowController) cur;
            pfc.reinitializeIfNecessary(request, null, servletContext);
            return pfc;
        }

        return null;
    }
953579
@Override
    protected DefaultIndexBuilder fillIndexBuilder(Path path) throws Exception {
        final KieModule module = moduleService.resolveModule(Paths.convert(path));
        if (module == null) {
            logger.error("Unable to index " + path.toUri().toString() + ": module could not be resolved.");
            return null;
        }

        // responsible for basic index info: project name, branch, etc
        final DefaultIndexBuilder builder = getIndexBuilder(path,
                                                            module);
        String bpmnStr = ioService.readAllString(path);
        ClassLoader projectClassLoader = getProjectClassLoader(module);

        XmlProcessReader xmlReader = new XmlProcessReader(modules,
                                                          projectClassLoader);
        List<Process> processes = xmlReader.read(new StringReader(bpmnStr));
        if (processes != null) {
            try {

                // create process data list and validate each
                List<DesignerProcessDataEventListener> processDataList = new ArrayList<>();
                processes.forEach(
                        process -> {
                            DesignerProcessDataEventListener processData
                                    = (DesignerProcessDataEventListener) process.getMetaData().get(DesignerProcessDataEventListener.NAME);
                            processDataList.add(processData);

                            logger.info("Validating process with id: " + process.getId());
                            ProcessValidationError[] errors = RuleFlowProcessValidator.getInstance().validateProcess((RuleFlowProcess) process);
                            for (ProcessValidationError error : errors) {
                                logger.warn("Process validation error: " + error.getMessage());
                            }

                            xmlReader.getProcessBuildData().onBuildComplete(process);
                        });

                for (DesignerProcessDataEventListener processData : processDataList) {
                    addReferencedResourcesToIndexBuilder(builder,
                                                         processData);
                    builder.setPackageName(processData.getProcess().getPackageName());
                }
            } catch (Throwable t) {
                logger.warn("Exception during indexing: " + t.getMessage());
            }
        } else {
            logger.warn("No process was found in file: " + path.toUri());
        }

        return builder;
    }
59614
private void addDefaultProviderToMap(Map<String, String> propertiesMap, String propertiesPath) {
        DefaultPropertiesProvider provider = new DefaultPropertiesProvider(propertiesPath);
        propertiesMap.putAll(provider.getProperties());
    }
745054
public void init(CmsElementView view, boolean useDefault) {

        m_currentView = view;
        if (!view.getId().equals(getViewSelector().getValue())) {
            getViewSelector().setValue(view.getId());
        }
        getVerticalLayout().removeAllComponents();

        List<CmsResourceTypeBean> typeBeans = m_typeHelper.getPrecomputedTypes(view);
        if (view.getId().equals(ID_VIEW_ALL)) {
            typeBeans = m_allTypes;
        }

        if (typeBeans == null) {

            LOG.warn("precomputed type list is null: " + view.getTitle(A_CmsUI.getCmsObject(), Locale.ENGLISH));
            return;
        }
        for (CmsResourceTypeBean type : typeBeans) {
            final String typeName = type.getType();
            String title = typeName;
            String subtitle = getSubtitle(type, useDefault);
            CmsExplorerTypeSettings explorerType = OpenCms.getWorkplaceManager().getExplorerTypeSetting(typeName);

            title = CmsVaadinUtils.getMessageText(explorerType.getKey());
            CmsResourceInfo info = new CmsResourceInfo(
                title,
                subtitle,
                CmsResourceUtil.getBigIconResource(explorerType, null));
            info.setData(type);
            m_resourceInfoMap.put(type, info);
            getVerticalLayout().addComponent(info);
        }
    }
1333254
public void setXPathVariableResolver(XPathVariableResolver resolver) {
        if ( resolver == null ) {
            String fmsg = XSLMessages.createXPATHMessage( 
                    XPATHErrorResources.ER_ARG_CANNOT_BE_NULL,
                    new Object[] {"XPathVariableResolver"} );
            throw new NullPointerException( fmsg );
        }
        this.variableResolver = resolver;
    }