Package fr.openwide.maven.artifact.notifier.core.business.project.model

Examples of fr.openwide.maven.artifact.notifier.core.business.project.model.ProjectVersion


          @Override
          public void onClick(AjaxRequestTarget target) {
            try {
              Project project = ProjectDescriptionPanel.this.getModelObject();
              ProjectVersion projectVersion = getModelObject();
             
              projectService.deleteProjectVersion(project, projectVersion);
              Session.get().success(getString("project.version.delete.success"));
            } catch (Exception e) {
              LOGGER.error("Error occured while removing artifact", e);
View Full Code Here


  }
 
  private void pushNewVersionIntoProject(Artifact artifact, ArtifactVersion artifactVersion) throws ServiceException, SecurityServiceException {
    if (artifact.getProject() != null) {
      Project project = artifact.getProject();
      ProjectVersion projectVersion = projectVersionService.getByProjectAndVersion(artifact.getProject(), artifactVersion.getVersion());
     
      if (projectVersion == null) {
        projectVersion = new ProjectVersion(artifactVersion.getVersion());
        projectVersion.setStatus(ProjectVersionStatus.PUBLISHED_ON_MAVEN_CENTRAL);
        projectVersionService.create(projectVersion);
       
        project.addVersion(projectVersion);
        projectService.update(project);
      } else if (ProjectVersionStatus.IN_PROGRESS.equals(projectVersion.getStatus())) {
        projectVersion.setStatus(ProjectVersionStatus.PUBLISHED_ON_MAVEN_CENTRAL);
      }
      projectVersion.setLastUpdateDate(artifactVersion.getLastUpdateDate());
      projectVersionService.update(projectVersion);

      artifactVersion.setProjectVersion(projectVersion);
      artifactVersionService.update(artifactVersion);
    }
View Full Code Here

    AjaxButton validate = new AjaxButton("save", form) {
      private static final long serialVersionUID = 1L;
     
      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
        ProjectVersion projectVersion = ProjectVersionFormPopupPanel.this.getModelObject();
       
        if (StringUtils.hasText(projectVersion.getVersion())) {
          try {
            if (isAddMode()) {
              ProjectVersion duplicate = projectVersionService.getByProjectAndVersion(getProject(), projectVersion.getVersion());
              if (duplicate == null) {
                projectService.createProjectVersion(getProject(), projectVersion);
                getSession().success(getString("project.version.add.success"));
                closePopup(target);
                target.add(getPage());
View Full Code Here

 
  @Override
  protected void onShow(AjaxRequestTarget target) {
    super.onShow(target);
    if (isAddMode()) {
      ProjectVersion version = new ProjectVersion(null);
      getModel().setObject(version);
    }
  }
View Full Code Here

TOP

Related Classes of fr.openwide.maven.artifact.notifier.core.business.project.model.ProjectVersion

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.