com.sap.sl.sdk.framework
Interface IStatus

All Known Subinterfaces:
RuleStatus

public interface IStatus

Provides methods to retrieve error data.


Method Summary
 java.lang.Throwable getCause()
          Returns the exception cause if any.
 IStatus[] getChildren()
          Returns children of a status.
 java.lang.String getCode()
          Returns the error code or an empty string if the code is not available.
 java.lang.String getMessage()
          Returns an error message.
 java.lang.String getMessage(java.util.Locale locale)
          Returns an error message based on the given locale without error code.
 Severity getSeverity()
          Returns the severity of the error.
 boolean hasChildren()
          Tells if the status has children.
 

Method Detail

getMessage

java.lang.String getMessage()
Returns an error message.

Same behavior as getMessage(Locale) with Locale.getDefault().

Returns:
A string that represents the error message. May be an empty string, but not null.
See Also:
getMessage(Locale)

getMessage

java.lang.String getMessage(java.util.Locale locale)
Returns an error message based on the given locale without error code.

If the message for the provided locale is not available, a message in English is returned.

Parameters:
locale - The locale. Use Locale.getDefault() if locale is null.
Returns:
A string that represents the error message. May be an empty string, but not null.

getSeverity

Severity getSeverity()
Returns the severity of the error.

Returns:
A Severity object

getCode

java.lang.String getCode()
Returns the error code or an empty string if the code is not available.

Returns:
A string that corresponds to the error code

getCause

java.lang.Throwable getCause()
Returns the exception cause if any. Can be null.

Returns:
A Throwable object

hasChildren

boolean hasChildren()
Tells if the status has children.

Returns:
true if the status has children, false otherwise
See Also:
getChildren()

getChildren

IStatus[] getChildren()
Returns children of a status.

Use hasChildren() to prevent from useless array allocation.

Returns:
An array of IStatus objects
See Also:
hasChildren()


© Copyright 2016 SAP SE or an SAP affiliate company. All rights reserved.