Package org.gatein.management.api.operation.model

Examples of org.gatein.management.api.operation.model.ExportResourceModel


        try {
            executeHandlers(resource, operationContext, address, OperationNames.READ_CONFIG_AS_XML, stepResultHandler, filter,
                    true);
            List<PageNavigation> results = stepResultHandler.getResults();
            if (results.isEmpty()) {
                resultHandler.completed(new ExportResourceModel(Collections.<ExportTask> emptyList()));
            } else {
                NavigationExportTask task = new NavigationExportTask(stepResultHandler.getResults().get(0), marshaller);
                resultHandler.completed(new ExportResourceModel(task));
            }
        } catch (ResourceNotFoundException e) {
            throw e;
        } catch (OperationException e) {
            throw new OperationException(e.getOperationName(), getStepMessage(e, address, stepResultHandler), e);
View Full Code Here


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

            NavigationExportTask exportTask = new NavigationExportTask(navigationKey, navigationService, descriptionService,
                    marshaller);

            resultHandler.completed(new ExportResourceModel(exportTask));
        }
    }
View Full Code Here

        try {
            executeHandlers(resource, operationContext, address, OperationNames.READ_CONFIG, stepResultHandler, filter, true);
            List<PageNavigation> results = stepResultHandler.getResults();
            if (results.isEmpty()) {
                resultHandler.completed(new ExportResourceModel(Collections.<ExportTask> emptyList()));
            } else {
                NavigationExportTask task = new NavigationExportTask(stepResultHandler.getResults().get(0), marshaller);
                resultHandler.completed(new ExportResourceModel(task));
            }
        } catch (ResourceNotFoundException e) {
            throw e;
        } catch (OperationException e) {
            throw new OperationException(e.getOperationName(), getStepMessage(e, address, stepResultHandler), e);
View Full Code Here

        BindingProvider bindingProvider = operationContext.getBindingProvider();
        DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);

        SiteKey siteKey = getSiteKey(site);

        resultHandler.completed(new ExportResourceModel(new SiteLayoutExportTask(siteKey, dataStorage, bindingProvider
                .getMarshaller(PortalConfig.class, ContentType.XML))));
    }
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()));
        } else {
            tasks.add(pageExportTask);
            resultHandler.completed(new ExportResourceModel(tasks));
        }
    }
View Full Code Here

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

         NavigationExportTask exportTask = new NavigationExportTask(new NavigationKey(siteKey, navUri), navigationService, descriptionService, marshaller);

         resultHandler.completed(new ExportResourceModel(exportTask));
      }
   }
View Full Code Here

      {
         executeHandlers(resource, operationContext, address, OperationNames.READ_CONFIG_AS_XML, stepResultHandler, filter, true);
         List<PageNavigation> results = stepResultHandler.getResults();
         if (results.isEmpty())
         {
            resultHandler.completed(new ExportResourceModel(Collections.<ExportTask>emptyList()));
         }
         else
         {
            NavigationExportTask task = new NavigationExportTask(stepResultHandler.getResults().get(0), marshaller);
            resultHandler.completed(new ExportResourceModel(task));
         }
      }
      catch (OperationException e)
      {
         throw new OperationException(e.getOperationName(), getStepMessage(e, address, stepResultHandler), e);
View Full Code Here

      BindingProvider bindingProvider = operationContext.getBindingProvider();
      DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);

      SiteKey siteKey = getSiteKey(site);

      resultHandler.completed(new ExportResourceModel(new SiteLayoutExportTask(siteKey, dataStorage, bindingProvider.getMarshaller(PortalConfig.class, ContentType.XML))));
   }
View Full Code Here

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

      List<ExportTask> tasks = new ArrayList<ExportTask>();
      for (ExportResourceModel model : exportResultHandler.getResults())
      {
         tasks.addAll(model.getTasks());
      }
      return new ExportResourceModel(tasks);
   }
View Full Code Here

TOP

Related Classes of org.gatein.management.api.operation.model.ExportResourceModel

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.