Package com.day.cq.wcm.api

Examples of com.day.cq.wcm.api.PageManager


        return null;
    }

    private Page getResourcePage(Object adaptable) {
        PageManager pageManager = getPageManager(adaptable);
        Resource resource = getResource(adaptable);

        if (pageManager != null && resource != null) {
            return pageManager.getContainingPage(resource);
        }

        return null;
    }
View Full Code Here


*/
public class navimage_png extends AbstractImageServlet {

    protected Layer createLayer(ImageContext ctx)
            throws RepositoryException, IOException {
        PageManager pageManager = ctx.resolver.adaptTo(PageManager.class);
        Page currentPage = pageManager.getContainingPage(ctx.resource);

        // constants
        int scale = 6;
        int paddingX = 24;
        int paddingY = 24;
View Full Code Here

     * @throws RepositoryException could not find folderPath node
     */
    private Page createPage(ResourceResolver resourceResolver, String folderPath, String nodeName, String templatePath,
                            String title) throws RepositoryException, WCMException {

        final PageManager pageManager = resourceResolver.adaptTo(PageManager.class);
        final Template template = pageManager.getTemplate(templatePath);

        if (template != null) {
            // A template is defined so use that
            return pageManager.create(folderPath, nodeName, templatePath, title, false);
        } else {
            // Manually create the page nodes to prevent the creation of nt:unstructured-based jcr:content node
            final Session session = resourceResolver.adaptTo(Session.class);
            final Node folderNode = session.getNode(folderPath);

View Full Code Here

        int templatesWithoutIcons = 0;

        ResourceResolver resolver = null;
        try {
            resolver = rrFactory.getAdministrativeResourceResolver(null);
            PageManager pageManager = resolver.adaptTo(PageManager.class);

            Collection<Template> templates = pageManager.getTemplates(null);
            for (Template template : templates) {
                String path = template.getPath();
                if (StringUtils.startsWithAny(path, paths)) {
                    String thumbnailPath = template.getThumbnailPath();
View Full Code Here

TOP

Related Classes of com.day.cq.wcm.api.PageManager

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.