public class SearchResultsStatus
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
OTHER
There was an unspecified problem with the search.
|
static int |
SIZE_LIMIT_EXCEEDED
The size limit was exceeded when performing the search.
|
static java.lang.String |
SIZE_LIMIT_KEY
A key to look up size limit exceeded message in resource bundle
|
static int |
SUCCESS
There was no problem with the search.
|
static int |
UNACCESSIBLE_OBJECTS_EXCLUDED
Excludes objects that are not accessible to the user.
|
static java.lang.String |
UNACCESSIBLE_OBJECTS_EXCLUDED_KEY
A key to look up the inaccessible objects excluded message in a resource bundle.
|
static java.lang.String |
UNSPECIFIED_ERROR_KEY
A key to look up unspecified message relating to search results in resource bundle
|
| Constructor and Description |
|---|
SearchResultsStatus()
Default constructor.
|
SearchResultsStatus(int reason,
ModelException e)
Constructs with a problem reason and a causing exception (if any).
|
| Modifier and Type | Method and Description |
|---|---|
void |
addStatusCode(int code)
Adds a status of the search request.
|
ModelException |
getException()
Returns the exception (if any) that caused the problem with the search.
|
int |
getStatusCode()
Gets the completion status of the search request.
|
java.lang.String |
getStatusKey()
Returns a key used to lookup a description of the result status
in a resource bundle.
|
java.lang.String |
getStatusKey(int code)
Returns a key used to look up a description of the result status
in a resource bundle for the specified code.
|
boolean |
hasStatusCode(int code)
Checks if the status code within this SearchResultsStatus has the specified status code.
|
void |
setException(ModelException e)
Changes the exception (if any) that caused the problem with the search.
|
void |
setStatusCode(int code)
Changes the completion status of the search request.
|
public static final int SUCCESS
public static final int OTHER
public static final int SIZE_LIMIT_EXCEEDED
public static final int UNACCESSIBLE_OBJECTS_EXCLUDED
public static final java.lang.String SIZE_LIMIT_KEY
public static final java.lang.String UNSPECIFIED_ERROR_KEY
public static final java.lang.String UNACCESSIBLE_OBJECTS_EXCLUDED_KEY
public SearchResultsStatus()
public SearchResultsStatus(int reason,
ModelException e)
reason - Reason for the problem with the search, NONE,
SIZE_LIMIT_EXCEEDED, OTHER.e - ModelException (if any) that caused the error, null if none
was generated.public int getStatusCode()
public void setStatusCode(int code)
code - The status code of the search, SUCCESS, SIZE_LIMIT_EXCEEDED,
OTHER.public ModelException getException()
public void setException(ModelException e)
e - ModelException (if any) that caused the error, null if none
was generated.public java.lang.String getStatusKey()
public java.lang.String getStatusKey(int code)
public boolean hasStatusCode(int code)
code - public void addStatusCode(int code)
code - The status code of the search: SUCCESS, SIZE_LIMIT_EXCEEDED,
OTHER, INACCESSIBLE_OBJECTS_EXCLUDED.