ALF-11591: Externalise diff/validation messages

system-messages.properties now contains log messages and diff/validation output messages.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32236 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Matt Ward
2011-11-23 13:16:27 +00:00
parent 9be594eee2
commit f495a69ba9
9 changed files with 165 additions and 67 deletions

View File

@@ -18,6 +18,8 @@
*/
package org.alfresco.util.schemacomp;
import org.springframework.extensions.surf.util.I18NUtil;
/**
* Results of a validation operation.
*
@@ -26,17 +28,19 @@ package org.alfresco.util.schemacomp;
public class ValidationResult extends Result
{
private DbProperty dbProperty;
private String message;
public ValidationResult(DbProperty dbProperty)
public ValidationResult(DbProperty dbProperty, String message)
{
this(dbProperty, null);
this(dbProperty, null, message);
}
public ValidationResult(DbProperty dbProperty, Strength strength)
public ValidationResult(DbProperty dbProperty, Strength strength, String message)
{
super(strength);
this.dbProperty = dbProperty;
this.message = message;
}
@@ -60,15 +64,11 @@ public class ValidationResult extends Result
@Override
public String describe()
{
StringBuffer sb = new StringBuffer();
sb.append("Validation ")
.append("target path:")
.append(getDbProperty().getPath())
.append(" (value: ")
.append(getValue())
.append(")");
return sb.toString();
return I18NUtil.getMessage(
"system.schema_comp.validation",
getDbProperty().getPath(),
getValue(),
message);
}
/**