KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > project > MavenProjectBuildingResult


1 package org.apache.maven.project;
2
3 /*
4  * Copyright 2001-2005 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import org.apache.maven.project.validation.ModelValidationResult;
20
21 /**
22  * @author <a HREF="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
23  * @version $Id: MavenProjectBuildingResult.java 164760 2005-04-26 07:39:27Z brett $
24  */

25 public class MavenProjectBuildingResult
26 {
27     /** */
28     private MavenProject project;
29
30     /** */
31     private ModelValidationResult modelValidationResult;
32
33     /** */
34     private boolean successful;
35
36     /**
37      * @param project
38      */

39     public MavenProjectBuildingResult( MavenProject project )
40     {
41         this.project = project;
42
43         successful = true;
44     }
45
46     public MavenProjectBuildingResult( ModelValidationResult modelValidationResult )
47     {
48         this.modelValidationResult = modelValidationResult;
49
50         successful = modelValidationResult.getMessageCount() == 0;
51     }
52
53     /**
54      * @return Returns the modelValidationResult.
55      */

56     public ModelValidationResult getModelValidationResult()
57     {
58         return modelValidationResult;
59     }
60
61     /**
62      * @return Returns the project.
63      */

64     public MavenProject getProject()
65     {
66         return project;
67     }
68
69     /**
70      * Returns true if the project is valid.
71      *
72      * @return Returns true if the project is valid.
73      */

74     public boolean isSuccessful()
75     {
76         return successful;
77     }
78 }
79
Popular Tags