@@ -0,0 +1,3062 @@
+package org.apache.maven.continuum.web.action;%0A%0A/*%0A * Copyright 2004-2006 The Apache Software Foundation.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Aimport java.util.Iterator;%0A%0Aimport org.apache.maven.continuum.model.project.ProjectGroup;%0Aimport org.apache.maven.continuum.ContinuumException;%0A%0Aimport com.opensymphony.xwork.Validateable;%0A%0A/**%0A * @author Henry Isidro %3Chisidro@exist.com%3E%0A *%0A * @plexus.component%0A *   role=%22com.opensymphony.xwork.Action%22%0A *   role-hint=%22addProjectGroup%22%0A */%0Apublic class AddProjectGroupAction%0A    extends ContinuumActionSupport%0A    implements Validateable%0A%7B%0A    private String name;%0A%0A    private String groupId;%0A%0A    private String description;%0A%0A    public void validate()%0A    %7B%0A        clearErrorsAndMessages();%0A        if ( name != null && name.equals( %22%22 ) )%0A        %7B%0A            addActionError( %22projectGroup.error.name.required%22 );%0A        %7D%0A        if ( name != null && !name.equals( %22%22 ) )%0A        %7B%0A            Iterator iterator = getContinuum().getAllProjectGroups().iterator();%0A            while ( iterator.hasNext() )%0A            %7B%0A                ProjectGroup projectGroup = (ProjectGroup) iterator.next();%0A                if ( projectGroup.getName().equals( name ) )%0A                %7B%0A                    addActionError( %22projectGroup.error.name.already.exists%22 );%0A                    break;%0A                %7D%0A            %7D%0A        %7D%0A        if ( groupId != null && groupId.equals( %22%22 ) )%0A        %7B%0A            addActionError( %22projectGroup.error.groupId.required%22 );%0A        %7D%0A    %7D%0A%0A    public String execute()%0A    %7B%0A        ProjectGroup projectGroup = new ProjectGroup();%0A%0A        projectGroup.setName( name );%0A%0A        projectGroup.setGroupId( groupId );%0A%0A        projectGroup.setDescription( description );%0A%0A        try%0A        %7B%0A            getContinuum().addProjectGroup( projectGroup );%0A        %7D%0A        catch ( ContinuumException e )%0A        %7B%0A            getLogger().error( %22Error adding project group: %22 + e.getLocalizedMessage() );%0A%0A            return ERROR;%0A        %7D%0A%0A        return SUCCESS;%0A    %7D%0A%0A    public String getDescription()%0A    %7B%0A        return description;%0A    %7D%0A%0A    public void setDescription( String description )%0A    %7B%0A        this.description = description;%0A    %7D%0A%0A    public String getGroupId()%0A    %7B%0A        return groupId;%0A    %7D%0A%0A    public void setGroupId( String groupId )%0A    %7B%0A        this.groupId = groupId;%0A    %7D%0A%0A    public String getName()%0A    %7B%0A        return name;%0A    %7D%0A%0A    public void setName( String name )%0A    %7B%0A        this.name = name;%0A    %7D%0A%7D%0A

Add missing action