public class ErrorReporter extends Object
This logic was taken from
ResearchDocumentRuleBase so that classes don't have to
subclass ResearchDocumentRuleBase to report an error using these convenient methods.
| Constructor and Description |
|---|
ErrorReporter() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getMethodPath(int fromLevel,
int toLevel)
This method duplicates the functionality of ExceptionUtils.describeStackLevels which is no longer supported in Rice.
|
Map<String,Collection<SoftError>> |
getSoftErrors() |
boolean |
propertyHasErrorReported(String propertyName)
Does the property have any errors in the message map?
|
void |
removeErrors(String propertyName)
Removed the errors in the message map for the property.
|
void |
reportAuditError(org.kuali.rice.kns.util.AuditError error,
String errorKey,
String clusterLabel,
String clusterCategory)
Adds an audit error to the
KNSGlobalVariables.getAuditErrorMap(). |
void |
reportError(String propertyName,
String errorKey,
String... errorParams)
Wrapper around global errorMap.put call, to allow better logging.
|
void |
reportSoftError(String propertyName,
String errorKey,
String... errorParams) |
void |
reportWarning(String propertyName,
String errorKey,
String... errorParams)
Wrapper around global errorMap.put call, to allow better logging.
|
public void reportError(String propertyName, String errorKey, String... errorParams)
propertyName - errorKey - errorParams - public void reportAuditError(org.kuali.rice.kns.util.AuditError error,
String errorKey,
String clusterLabel,
String clusterCategory)
KNSGlobalVariables.getAuditErrorMap().error - the error to add.errorKey - the error map keyclusterLabel - the cluster labelclusterCategory - the cluster categoryIllegalArgumentException - if error, errorKey, clusterLabel, or clusterCategory are null or
if errorKey, clusterLabel, or clusterCategory are whitespacepublic void reportSoftError(String propertyName, String errorKey, String... errorParams)
public Map<String,Collection<SoftError>> getSoftErrors()
public void reportWarning(String propertyName, String errorKey, String... errorParams)
propertyName - errorKey - errorParams - public boolean propertyHasErrorReported(String propertyName)
propertyName - public void removeErrors(String propertyName)
propertyName - public static String getMethodPath(int fromLevel, int toLevel)
fromLevel - toLevel - Copyright © 2013 The Kuali Foundation. All Rights Reserved.