addActionError( getText( "projectName.already.exist.error" ) );
return INPUT;
}
}
Project project = new Project();
project.setName( projectNameTrim );
if ( projectDescription != null )
{
project.setDescription( projectDescription.trim() );
}
project.setVersion( versionTrim );
project.setScmUrl( scmTrim );
project.setScmUsername( projectScmUsername );
project.setScmPassword( projectScmPassword );
project.setScmTag( projectScmTag );
project.setScmUseCache( projectScmUseCache );
project.setExecutorId( projectType );
getContinuum().addProject( project, projectType, selectedProjectGroup, this.getBuildDefintionTemplateId() );
if ( this.getSelectedProjectGroup() > 0 )
{
this.setProjectGroupId( this.getSelectedProjectGroup() );
return "projectGroupSummary";
}
AuditLog event = new AuditLog( "Project id=" + project.getId(), AuditLogConstants.ADD_PROJECT );
event.setCategory( AuditLogConstants.PROJECT );
event.setCurrentUser( getPrincipal() );
event.log();
return SUCCESS;