SWF-752 - FacesMessage.SEVERITY_FATAL does not propagate through FlowFacesContext

This commit is contained in:
Jeremy Grelle
2008-07-02 15:43:22 +00:00
parent 119384783b
commit 6982e0ac2d
5 changed files with 41 additions and 7 deletions

View File

@@ -38,6 +38,7 @@ import org.springframework.core.style.ToStringCreator;
* </code>
* </p>
* @author Keith Donald
* @author Jeremy Grelle
*/
public class MessageBuilder {
@@ -78,6 +79,15 @@ public class MessageBuilder {
return this;
}
/**
* Records that the message being built is a fatal message.
* @return this, for fluent API usage
*/
public MessageBuilder fatal() {
severity = Severity.FATAL;
return this;
}
/**
* Records that the message being built is against the provided source.
* @param source the source generating the message

View File

@@ -21,6 +21,7 @@ import org.springframework.core.enums.StaticLabeledEnum;
* Enum exposing supported message severities.
*
* @author Keith Donald
* @author Jeremy Grelle
* @see Message
*/
public class Severity extends StaticLabeledEnum {
@@ -37,10 +38,15 @@ public class Severity extends StaticLabeledEnum {
public static final Severity WARNING = new Severity(1, "Warning");
/**
* THe "Error" severity. Used to indicate a significant problem like a business rule violation.
* The "Error" severity. Used to indicate a significant problem like a business rule violation.
*/
public static final Severity ERROR = new Severity(2, "Error");
/**
* The "Fatal" severity. Used to indicate a fatal problem like a system error.
*/
public static final Severity FATAL = new Severity(3, "Fatal");
private Severity(int code, String label) {
super(code, label);
}