package org.apache.maven.continuum.buildcontroller;

import org.apache.maven.continuum.core.action.AbstractContinuumAction;
import org.apache.maven.continuum.model.project.BuildDefinition;
import org.apache.maven.continuum.model.project.BuildResult;
import org.apache.maven.continuum.model.project.Project;
import org.apache.maven.continuum.model.scm.ScmResult;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * This class holds build context information.
 *
 * @author <a href="mailto:kenney@apache.org">Kenney Westerhof</a>
 *
 */
public class BuildContext
{

    private long startTime;

    private Project project;

    private BuildDefinition buildDefinition;

    private BuildResult oldBuildResult;

    private ScmResult oldScmResult;

    private Map actionContext;

    private ScmResult scmResult;

    private int trigger;

    private BuildResult buildResult;

    public void setStartTime( long startTime )
    {
        this.startTime = startTime;
    }

    public long getStartTime()
    {
        return startTime;
    }

    public void setProject( Project project )
    {
        this.project = project;
    }

    public Project getProject()
    {
        return project;
    }

    public void setBuildDefinition( BuildDefinition buildDefinition )
    {
        this.buildDefinition = buildDefinition;
    }

    public BuildDefinition getBuildDefinition()
    {
        return buildDefinition;
    }

    public void setBuildResult( BuildResult build )
    {
        this.buildResult = build;
    }

    public BuildResult getBuildResult()
    {
        return buildResult;
    }

    public void setOldBuildResult( BuildResult buildResult )
    {
        this.oldBuildResult = buildResult;
    }

    public BuildResult getOldBuildResult()
    {
        return oldBuildResult;
    }

    public void setOldScmResult( ScmResult oldScmResult )
    {
        this.oldScmResult = oldScmResult;
    }

    public ScmResult getOldScmResult()
    {
        return oldScmResult;
    }

    public void setScmResult( ScmResult scmResult )
    {
        this.scmResult = scmResult;
    }

    public ScmResult getScmResult()
    {
        return scmResult;
    }

    public Map getActionContext()
    {
        if ( actionContext == null )
        {
            actionContext = new HashMap();
        }
        return actionContext;
    }

    public int getTrigger()
    {
        return trigger;
    }

    public void setTrigger( int trigger )
    {
        this.trigger = trigger;
    }

}

@@ -46,16 +46,638 @@
 oller;%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%0A
 import o
@@ -1188,11 +1188,10 @@
 ext%0A
+
 %7B%0A
-%0A
     
@@ -3131,11 +3131,10 @@
 ;%0A    %7D%0A
-%0A
 %7D%0A

Add copyright