View Javadoc

1   package org.apache.maven.continuum.notification;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import org.apache.continuum.model.project.ProjectScmRoot;
23  import org.apache.maven.continuum.model.project.BuildDefinition;
24  import org.apache.maven.continuum.model.project.BuildResult;
25  import org.apache.maven.continuum.model.project.Project;
26  
27  /**
28   * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
29   * @version $Id: ContinuumNotificationDispatcher.java 709300 2008-10-31 00:01:38Z ctan $
30   * @todo use build result for all of these? need project for those that do?
31   */
32  public interface ContinuumNotificationDispatcher
33  {
34      String ROLE = ContinuumNotificationDispatcher.class.getName();
35  
36      // ----------------------------------------------------------------------
37      //
38      // ----------------------------------------------------------------------
39  
40      String MESSAGE_ID_BUILD_STARTED = "BuildStarted";
41  
42      String MESSAGE_ID_CHECKOUT_STARTED = "CheckoutStarted";
43  
44      String MESSAGE_ID_CHECKOUT_COMPLETE = "CheckoutComplete";
45  
46      String MESSAGE_ID_RUNNING_GOALS = "RunningGoals";
47  
48      String MESSAGE_ID_GOALS_COMPLETED = "GoalsCompleted";
49  
50      String MESSAGE_ID_BUILD_COMPLETE = "BuildComplete";
51  
52      String MESSAGE_ID_PREPARE_BUILD_COMPLETE = "PrepareBuildComplete";
53  
54      String CONTEXT_BUILD = "build";
55  
56      String CONTEXT_BUILD_OUTPUT = "build-output";
57  
58      String CONTEXT_PROJECT = "project";
59  
60      String CONTEXT_BUILD_DEFINITION = "buildDefinition";
61  
62      String CONTEXT_PROJECT_NOTIFIER = "projectNotifier";
63  
64      String CONTEXT_BUILD_RESULT = "result";
65  
66      String CONTEXT_UPDATE_SCM_RESULT = "scmResult";
67  
68      // ----------------------------------------------------------------------
69      //
70      // ----------------------------------------------------------------------
71  
72      void buildStarted( Project project, BuildDefinition buildDefinition );
73  
74      void checkoutStarted( Project project, BuildDefinition buildDefinition );
75  
76      void checkoutComplete( Project project, BuildDefinition buildDefinition );
77  
78      void runningGoals( Project project, BuildDefinition buildDefinition, BuildResult buildResult );
79  
80      void goalsCompleted( Project project, BuildDefinition buildDefinition, BuildResult buildResult );
81  
82      void buildComplete( Project project, BuildDefinition buildDefinition, BuildResult buildResult );
83  
84      void prepareBuildComplete( ProjectScmRoot projectScmRoot );
85  }