Package org.gatein.management.api.exceptions

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


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


{
   @Override
   protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
   {
      Page pages = site.getRootPage().getChild("pages");
      if (pages == null || pages.getChildren().isEmpty()) throw new ResourceNotFoundException("No pages found for site " + getSiteKey(site));

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

         }
      }

      if (pageExportTask.getPageNames().isEmpty() && pageName != null)
      {
         throw new ResourceNotFoundException("No page found for " + new PageKey(siteKey, pageName));
      }
      else if (pageExportTask.getPageNames().isEmpty())
      {
         resultHandler.completed(new ExportResourceModel(Collections.<ExportTask>emptyList()));
      }
View Full Code Here

         else
         {
            if (result == null)
            {
               log.error("Result returned was null and method " + methodName + " for managed component " + owner.managedClass + " is not void.");
               throw new ResourceNotFoundException("Resource not found.");
            }
            else
            {
               resultHandler.completed(result);
            }
View Full Code Here

      }
     
      ManagedResource root = getRootResource();
      if (root.getSubResource(address) == null)
      {
         throw new ResourceNotFoundException("Could not locate managed resource for address '" + address + "'");
      }

      OperationHandler operationHandler = root.getOperationHandler(address, operationName);
      if (operationHandler != null)
      {
View Full Code Here

    private NavigationManagementResource navigationResource(SiteId siteId, OperationContext context) {
        requireSite(siteId, context);
        Navigation navigation = portal.getNavigation(siteId);
        if (navigation == null) {
            throw new ResourceNotFoundException("Navigation does not exist for site " + siteId);
        }

        return new NavigationManagementResource(navigation, modelProvider);
    }
View Full Code Here

        return populateModel(site, modelProvider.newModel(ModelObject.class), context.getAddress());
    }

    private Site requireSite(SiteId id, OperationContext context) {
        Site site = portal.getSite(id);
        if (site == null) throw new ResourceNotFoundException("Site not found for " + id);

        // Verify current user has access to site
        verifyAccess(site, context);

        return site;
View Full Code Here

    public static ResourceExistsException alreadyExists(String message, SiteId id, NodePath nodePath) {
        return new ResourceExistsException(message + ". Node " + nodePath + " already exists for site " + id);
    }

    public static ResourceNotFoundException notFound(String message, SiteId id) {
        return new ResourceNotFoundException(message + ". Site " + id + " does not exist.");
    }
View Full Code Here

    public static ResourceNotFoundException notFound(String message, SiteId id) {
        return new ResourceNotFoundException(message + ". Site " + id + " does not exist.");
    }

    public static ResourceNotFoundException notFound(String message, PageId id) {
        return new ResourceNotFoundException(message + ". Page " + id.getPageName() + " does not exist for site " + id.getSiteId());
    }
View Full Code Here

    public static ResourceNotFoundException notFound(String message, PageId id) {
        return new ResourceNotFoundException(message + ". Page " + id.getPageName() + " does not exist for site " + id.getSiteId());
    }

    public static ResourceNotFoundException notFound(String message, SiteId id, NodePath nodePath) {
        return new ResourceNotFoundException(message + ". Node " + nodePath + " does not exist for site " + id);
    }
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.