Package org.gatein.management.api.exceptions

Examples of org.gatein.management.api.exceptions.ResourceNotFoundException


        } else {
            PageKey key = new PageKey(siteKey, pageName);
            try {
                Page page = PageUtils.getPage(dataStorage, pageService, key);
                if (page == null) {
                    throw new ResourceNotFoundException("No page found for " + key);
                } else {
                    resultHandler.completed(page);
                }
            } catch (ResourceNotFoundException e) {
                throw e;
View Full Code Here


        if (siteType == null)
            throw new OperationException(operationName, "Site type was not specified.");

        ObjectType<Site> objectType = Utils.getObjectType(Utils.getSiteType(siteType));
        if (objectType == null) {
            throw new ResourceNotFoundException("No site type found for " + siteType);
        }

        POMSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(POMSessionManager.class);
        POMSession session = mgr.getSession();
        if (session == null)
View Full Code Here

        NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);

        PageNavigation pageNavigation = NavigationUtils.loadPageNavigation(new NavigationKey(siteKey, navUri),
                navigationService, descriptionService);
        if (pageNavigation == null)
            throw new ResourceNotFoundException("Navigation node not found for navigation uri '" + navUri + "'");

        resultHandler.completed(pageNavigation);
    }
View Full Code Here

    @Override
    protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site)
            throws ResourceNotFoundException, OperationException {
        Navigation navigation = site.getRootNavigation().getChild("default");
        if (navigation == null)
            throw new ResourceNotFoundException("Navigation does not exist for site " + getSiteKey(site));

        execute(operationContext, resultHandler, navigation);
    }
View Full Code Here

            // Find navigation first
            NodeContext<?> context = NavigationUtils.loadNode(navigationService, navigationService.loadNavigation(siteKey),
                    navigationKey.getNavUri());
            if (context == null)
                throw new ResourceNotFoundException("Navigation node not found for navigation uri '" + navUri + "'");

            BindingProvider bindingProvider = operationContext.getBindingProvider();
            Marshaller<PageNavigation> marshaller = bindingProvider.getMarshaller(PageNavigation.class, ContentType.XML);

            NavigationExportTask exportTask = new NavigationExportTask(navigationKey, navigationService, descriptionService,
View Full Code Here

        if (siteType == null)
            throw new OperationException(operationName, "Site type was not specified.");

        ObjectType<Site> objectType = Utils.getObjectType(Utils.getSiteType(siteType));
        if (objectType == null) {
            throw new ResourceNotFoundException("No site type found for " + siteType);
        }

        POMSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(POMSessionManager.class);
        POMSession session = mgr.getSession();
        if (session == null)
View Full Code Here

        SiteKey siteKey = getSiteKey(siteType, siteName);

        Site site = workspace.getSite(siteType, siteKey.getName());
        if (site == null)
            throw new ResourceNotFoundException("No site found for site " + siteKey);

        execute(operationContext, resultHandler, site);
    }
View Full Code Here

        NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);

        PageNavigation pageNavigation = NavigationUtils.loadPageNavigation(new NavigationKey(siteKey, navUri),
                navigationService, descriptionService);
        if (pageNavigation == null)
            throw new ResourceNotFoundException("Navigation node not found for navigation uri '" + navUri + "'");

        resultHandler.completed(pageNavigation);
    }
View Full Code Here

        Set<String> children = new LinkedHashSet<String>();

        NodeContext<NodeContext<?>> node = NavigationUtils.loadNode(navigationService, navigation, navUri);
        if (node == null) {
            throw new ResourceNotFoundException("Navigation node not found for navigation uri '" + navUri + "'");
        }

        for (NodeContext child : node.getNodes()) {
            children.add(child.getName());
        }
View Full Code Here

        } else {
            PageService pageService = operationContext.getRuntimeContext().getRuntimeComponent(PageService.class);
            PageKey pageKey = new PageKey(getSiteKey(rootPage.getSite()), pageName);

            if (pageService.loadPage(pageKey) == null) {
                throw new ResourceNotFoundException("No page found for " + pageKey);
            }

            resultHandler.completed(new ReadResourceModel("List of child pages for page '" + pageName + "'", Collections
                    .<String> emptySet()));
        }
View Full Code Here

TOP

Related Classes of org.gatein.management.api.exceptions.ResourceNotFoundException

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.