Package org.apache.sling.scripting.thymeleaf

Examples of org.apache.sling.scripting.thymeleaf.SlingContext


        Validate.notNull(templateProcessingParameters, "Template Processing Parameters cannot be null");

        final IContext context = templateProcessingParameters.getContext();
        if (context instanceof SlingContext) {
            final SlingContext slingContext = (SlingContext) context;
            final ResourceResolver resourceResolver = slingContext.getResourceResolver();
            final Resource resource = resourceResolver.getResource(resourceName);
            return resource.adaptTo(InputStream.class);
        } else {
            throw new TemplateProcessingException("Cannot handle context: " + context.getClass().getName());
        }
View Full Code Here

TOP

Related Classes of org.apache.sling.scripting.thymeleaf.SlingContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.