Package com.day.cq.wcm.api.designer

Examples of com.day.cq.wcm.api.designer.Design


        Page page = pageManager.getContainingPage(resource);
        if (page == null) {
            return Collections.emptyList();
        }

        Design design = designer.getDesign(page);
        if (design == null) {
            return Collections.emptyList();
        }

        return Collections.singletonList(new Reference(TYPE_DESIGN_PAGE,
                String.format("%s (Design)", design.getId()),
                design.getContentResource(),
                getLastModified(design)));
    }
View Full Code Here


                Object cachedResourceDesign = request.getAttribute(resourceDesignKey);

                if (cachedResourceDesign != null) {
                    return (Design) cachedResourceDesign;
                } else {
                    Design resourceDesign = designer.getDesign(resourcePage);
                    request.setAttribute(resourceDesignKey, resourceDesign);

                    return resourceDesign;
                }
            }
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

        if (designer == null) {
            return "";
        }

        final Design design = designer.getDesign(page);
        final Resource designResource = resourceResolver.getResource(design.getPath());

        if (design == null) {
            return "";
        }
View Full Code Here

    protected static String searchUp(Resource resource, String pathPrefix, String path) {
        if (resource == null || StringUtils.equals(resource.getPath(), "/")) {
            return null;
        }

        final Design design = resource.adaptTo(Design.class);

        if (design != null) {
            String designResourcePath = makePath(resource, pathPrefix, path);

            Resource designResource = resource.getResourceResolver().getResource(designResourcePath);
View Full Code Here

TOP

Related Classes of com.day.cq.wcm.api.designer.Design

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.