com.ibm.itim.dataservices.model
Class SearchResultsStatus

java.lang.Object
  extended by com.ibm.itim.dataservices.model.SearchResultsStatus
All Implemented Interfaces:
java.io.Serializable

public class SearchResultsStatus
extends java.lang.Object
implements java.io.Serializable

Class that represents result information from search.

See Also:
Serialized Form

Field Summary
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 Summary
SearchResultsStatus()
          Default constructor.
SearchResultsStatus(int reason, ModelException e)
          Constructs with a problem reason and a causing exception (if any).
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUCCESS

public static final int SUCCESS
There was no problem with the search.

See Also:
Constant Field Values

OTHER

public static final int OTHER
There was an unspecified problem with the search.

See Also:
Constant Field Values

SIZE_LIMIT_EXCEEDED

public static final int SIZE_LIMIT_EXCEEDED
The size limit was exceeded when performing the search.

See Also:
Constant Field Values

UNACCESSIBLE_OBJECTS_EXCLUDED

public static final int UNACCESSIBLE_OBJECTS_EXCLUDED
Excludes objects that are not accessible to the user. Currently, this status is only used to view provisioning policy by role. This status can be added to the existing status.

See Also:
Constant Field Values

SIZE_LIMIT_KEY

public static final java.lang.String SIZE_LIMIT_KEY
A key to look up size limit exceeded message in resource bundle

See Also:
Constant Field Values

UNSPECIFIED_ERROR_KEY

public static final java.lang.String UNSPECIFIED_ERROR_KEY
A key to look up unspecified message relating to search results in resource bundle

See Also:
Constant Field Values

UNACCESSIBLE_OBJECTS_EXCLUDED_KEY

public static final java.lang.String UNACCESSIBLE_OBJECTS_EXCLUDED_KEY
A key to look up the inaccessible objects excluded message in a resource bundle.

See Also:
Constant Field Values
Constructor Detail

SearchResultsStatus

public SearchResultsStatus()
Default constructor. Default reason (status) is SUCCESS.


SearchResultsStatus

public SearchResultsStatus(int reason,
                           ModelException e)
Constructs with a problem reason and a causing exception (if any).

Parameters:
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.
Method Detail

getStatusCode

public int getStatusCode()
Gets the completion status of the search request.

Returns:
The status code of the search, SUCCESS, SIZE_LIMIT_EXCEEDED, OTHER.

setStatusCode

public void setStatusCode(int code)
Changes the completion status of the search request.

Parameters:
code - The status code of the search, SUCCESS, SIZE_LIMIT_EXCEEDED, OTHER.

getException

public ModelException getException()
Returns the exception (if any) that caused the problem with the search.

Returns:
ModelException that caused the problem, none if no exception was generated.

setException

public void setException(ModelException e)
Changes the exception (if any) that caused the problem with the search.

Parameters:
e - ModelException (if any) that caused the error, null if none was generated.

getStatusKey

public java.lang.String getStatusKey()
Returns a key used to lookup a description of the result status in a resource bundle.

Returns:
The resource bundle key.

getStatusKey

public 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.

Returns:
The resource bundle key.

hasStatusCode

public boolean hasStatusCode(int code)
Checks if the status code within this SearchResultsStatus has the specified status code.

Parameters:
code -
Returns:
Returns true if the status includes the specified code; otherwise, returns false.

addStatusCode

public void addStatusCode(int code)
Adds a status of the search request.

Parameters:
code - The status code of the search: SUCCESS, SIZE_LIMIT_EXCEEDED, OTHER, INACCESSIBLE_OBJECTS_EXCLUDED.


IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.