Package org.zkybase.model

Examples of org.zkybase.model.Application


  /* (non-Javadoc)
   * @see org.zkybase.web.controller.AbstractEntityNoFormController#doGetDetails(java.lang.Long, org.springframework.ui.Model)
   */
  @Override
  protected Application doGetDetails(Long id, Model model) {
    Application app = getService().findOne(id);
    List<Farm> farms = CollectionsUtil.asSortedList(farmService.findByApplication(app));
    model.addAttribute(farms);
    return app;
  }
View Full Code Here


   * @param model
   * @return
   */
  @RequestMapping(value = "/{id}/modules/new", method = RequestMethod.GET)
  public String newModule(@PathVariable Long id, Model model) {
    model.addAttribute(new Application(id));
    model.addAttribute(new Module());
    return "createApplicationModuleForm";
  }
View Full Code Here

    applicationService.addModule(id, module, result);
   
    if (result.hasErrors()) {
      log.debug("Invalid module");
      model.addAttribute(new Application(id));
      response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
      return "createApplicationModuleForm";
    }
   
    return null;
View Full Code Here

   * @param model
   * @return
   */
  @RequestMapping(value = "/{id}/modules", method = RequestMethod.GET)
  public String getModules(@PathVariable Long id, Model model) {
    Application app = applicationService.findOneWithModules(id);
   
    model.addAttribute(app);
    model.addAttribute(CollectionsUtil.asSortedList(app.getModules()));
   
    return addNavigation(model, "applicationModuleList");
  }
View Full Code Here

   * @param model
   * @return
   */
  @RequestMapping(value = "/{applicationId}/modules/{moduleId}", method = RequestMethod.GET)
  public String getModule(@PathVariable Long applicationId, @PathVariable Long moduleId, Model model) {
    Application application = applicationService.findOne(applicationId);
    Module module = moduleService.findOne(moduleId);
    List<Package> packages = packageService.findByModule(module);
    Collections.sort(packages);
   
    model.addAttribute(application);
View Full Code Here

   * @param model
   * @return
   */
  @RequestMapping(value = "/{applicationId}/modules/{moduleId}/packages/new", method = RequestMethod.GET)
  public String newPackage(@PathVariable Long applicationId, @PathVariable Long moduleId, Model model) {
    Application app = applicationService.findOne(applicationId);
    Module module = moduleService.findOne(moduleId);
    model.addAttribute(AbstractCrudController.MK_FORM_DATA, new Package());
    return prepareCreateForm(app, module, model);
  }
View Full Code Here

      BindingResult result,
      Model model) {
   
    log.debug("Creating package: {}", pkg);
   
    Application app = applicationService.findOne(applicationId);
    Module module = moduleService.findOne(moduleId);
    pkg.setModule(module);
   
    packageService.create(pkg, result);
   
View Full Code Here

   * @param model model
   * @return logical view name
   */
  @RequestMapping(value = "/{id}/scm", method = RequestMethod.GET)
  public String getScm(@PathVariable Long id, Model model) {
    Application app = applicationService.findOneWithScm(id);
    model.addAttribute(app);
    model.addAttribute("entity", app);
    return addNavigation(model, "applicationScm");
  }
View Full Code Here

   * @param model
   * @return
   */
  @RequestMapping(value = "/{id}/scm/collaborators", method = RequestMethod.GET)
  public String getCollaborators(@PathVariable Long id, Model model) {
    Application app = applicationService.findOne(id);
   
    // FIXME Currently assuming GitHub.
    GitHubScm scm = (GitHubScm) app.getScm();
   
    // TODO Would like to put this inside GitHubScm, but don't want to use Spring Social GitHub as the data model
    // here since that is intended more for data transfer. We need to control the OJM/OXM here, and don't want
    // changes to the Spring Social GitHub API to produce changes to our web service API. But I'm not necessarily
    // excited about implementing that entire data model here. Considering options.
View Full Code Here

   * @param model
   * @return
   */
  @RequestMapping(value = "/{id}/scm/commits", method = RequestMethod.GET)
  public String getCommits(@PathVariable Long id, Model model) {
    Application app = applicationService.findOne(id);
   
    // FIXME Currently assuming GitHub.
    GitHubScm scm = (GitHubScm) app.getScm();
    List<GitHubCommit> commits = gitHub.repoOperations().getCommits(scm.getUser(), scm.getRepo());
   
    model.addAttribute(app);
    model.addAttribute("entity", app);
    model.addAttribute("commitList", commits);
View Full Code Here

TOP

Related Classes of org.zkybase.model.Application

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.