Package com.day.cq.wcm.api.components

Examples of com.day.cq.wcm.api.components.ComponentContext


        }

        final SlingHttpServletRequest slingRequest = (SlingHttpServletRequest) request;
        final SlingHttpServletResponse slingResponse = (SlingHttpServletResponse) response;

        final ComponentContext componentContext = WCMUtils.getComponentContext(request);

        if (componentContext == null
                || componentContext.isRoot()) {
            chain.doFilter(request, response);
        } else if (editModeEnabled
                && (componentHelper.isEditMode(slingRequest)
                || componentHelper.isDesignMode(slingRequest)
                || WCMMode.ANALYTICS.equals(WCMMode.fromRequest(slingRequest)))) {
View Full Code Here


     *
     * @param adaptable a SlingHttpServletRequest
     * @return the current Page if the adaptable was a SlingHttpServletRequest, null otherwise
     */
    private Page getCurrentPage(Object adaptable) {
        ComponentContext context = getComponentContext(adaptable);

        return (context != null) ? context.getPage() : null;
    }
View Full Code Here

     * @param adaptable a SlingHttpServletRequest
     * @return the current Style if the adaptable was a SlingHttpServletRequest, null otherwise
     */
    private Style getCurrentStyle(Object adaptable) {
        Design currentDesign = getCurrentDesign(adaptable);
        ComponentContext componentContext = getComponentContext(adaptable);

        if (currentDesign != null && componentContext != null) {
            return currentDesign.getStyle(componentContext.getCell());
        }

        return null;
    }
View Full Code Here

TOP

Related Classes of com.day.cq.wcm.api.components.ComponentContext

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.