From a66be7f905fe115d2ef0a58c75a9a31e6cb888b8 Mon Sep 17 00:00:00 2001 From: Vincent Siveton Date: Thu, 24 May 2007 05:45:26 +0000 Subject: [PATCH] MNG-2461: Write JavaDoc documentation o added some Javadoc o no code change git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@541188 13f79535-47bb-0310-9956-ffa450edef68 --- .../validation/SettingsValidationResult.java | 25 +++++++++++++++++-- .../validation/SettingsValidator.java | 9 ++++++- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/maven-settings/src/main/java/org/apache/maven/settings/validation/SettingsValidationResult.java b/maven-settings/src/main/java/org/apache/maven/settings/validation/SettingsValidationResult.java index f2c30b0865..cbc0e980e4 100644 --- a/maven-settings/src/main/java/org/apache/maven/settings/validation/SettingsValidationResult.java +++ b/maven-settings/src/main/java/org/apache/maven/settings/validation/SettingsValidationResult.java @@ -29,42 +29,63 @@ import java.util.List; */ public final class SettingsValidationResult { - /** */ private final static String NEWLINE = System.getProperty( "line.separator" ); - /** */ private List messages; + /** + * Default constructor + */ public SettingsValidationResult() { messages = new ArrayList(); } + /** + * @return + */ public int getMessageCount() { return messages.size(); } + /** + * @param i + * @return + */ public String getMessage( int i ) { return messages.get( i ).toString(); } + /** + * @return + */ public List getMessages() { return Collections.unmodifiableList( messages ); } + /** + * @param message + */ public void addMessage( String message ) { messages.add( message ); } + /** + * @see java.lang.Object#toString() + */ public String toString() { return render( "" ); } + /** + * @param indentation + * @return + */ public String render( String indentation ) { if ( messages.size() == 0 ) diff --git a/maven-settings/src/main/java/org/apache/maven/settings/validation/SettingsValidator.java b/maven-settings/src/main/java/org/apache/maven/settings/validation/SettingsValidator.java index d2d9e81465..08f52ef2fe 100644 --- a/maven-settings/src/main/java/org/apache/maven/settings/validation/SettingsValidator.java +++ b/maven-settings/src/main/java/org/apache/maven/settings/validation/SettingsValidator.java @@ -1,6 +1,5 @@ package org.apache.maven.settings.validation; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -23,11 +22,19 @@ package org.apache.maven.settings.validation; import org.apache.maven.settings.Settings; /** + * Validate a model settings + * * @author Milos Kleint */ public interface SettingsValidator { String ROLE = SettingsValidator.class.getName(); + /** + * Validate a model settings + * + * @param model + * @return a SettingsValidationResult instance + */ SettingsValidationResult validate( Settings model ); }