diff --git a/pom/src/main/org/apache/maven/ContentValidator.java b/pom/src/main/org/apache/maven/ContentValidator.java index 211f52bb..778601c8 100644 --- a/pom/src/main/org/apache/maven/ContentValidator.java +++ b/pom/src/main/org/apache/maven/ContentValidator.java @@ -63,15 +63,17 @@ import org.apache.maven.project.Project; /** * @author Ben Walding - * @version $Id: ContentValidator.java,v 1.1 2003/02/09 13:26:40 bwalding Exp $ + * @version $Id: ContentValidator.java,v 1.2 2003/02/09 13:35:59 bwalding Exp $ */ public class ContentValidator { - List notices; - Project project; + private List notices; + private Project project; + public ContentValidator() { } + /** * @return Project */ @@ -89,16 +91,30 @@ public class ContentValidator this.project = project; } + /** + * Adds a single notice to the list + * @param notice the notice to add + */ protected void addNotice(ContentNotice notice) { notices.add(notice); } + /** + * Adds a single notice to the list + * @param level + * @param section + * @param message + */ protected void addNotice(String level, String section, String message) { addNotice(new ContentNotice(level, section, message)); } + /** + * Runs the validation routine and returns any notices + * @return List + */ public List execute() { notices = new ArrayList(); @@ -106,6 +122,9 @@ public class ContentValidator return notices; } + /** + * Validates the top level project item + */ protected void validateProject() { if (project.getLogo() == null || project.getLogo().trim().length() == 0) @@ -116,6 +135,9 @@ public class ContentValidator validateLicenses(); } + /** + * Validates the licenses element + */ protected void validateLicenses() { if (project.getLicenses().size() == 0) @@ -127,6 +149,9 @@ public class ContentValidator } } + /** + * Validates the developers element + */ protected void validateDevelopers() { }