SiteMinder
Java SDK r12.51


com.netegrity.sdk.dmsapi
Class SmDmsSearch

java.lang.Object
  extended by com.netegrity.sdk.dmsapi.SmDmsSearch

public class SmDmsSearch
extends java.lang.Object

Represents a configuration object for a search operation.

You can perform searches against LDAP directories and directories based on ODBC databases.

For information on ODBC queries, see setFilter().

Since:
SDK 2.0

Field Summary
static int Back
          The search should look back from the current position.
static int Forward
          The search should start from the current position.
static int Refresh
          The search should be performed again.
static int Reset
          The search should start from the beginning.
 
Constructor Summary
SmDmsSearch()
          Creates an SmDmsSearch object.
SmDmsSearch(java.lang.String filter)
          Creates an SmDmsSearch object for a specified search filter.
SmDmsSearch(java.lang.String filter, java.lang.String root)
          Creates an SmDmsSearch object for a specified search filter and starting point.
SmDmsSearch(java.lang.String filter, java.lang.String root, int maxItems)
          Creates an SmDmsSearch object for a specified search filter, search starting point, and maximum number of records that can be returned from a single search operation.
SmDmsSearch(java.lang.String filter, java.lang.String root, java.lang.String[] propertyNames)
          Creates an SmDmsSearch object for a specified search filter, search starting point, and a list of properties to be retrieved.
SmDmsSearch(java.lang.String filter, java.lang.String root, java.lang.String[] propertyNames, int maxItems)
          Creates an SmDmsSearch object for a specified search filter, search starting point, a list of properties to be retrieved, and the maximum number of records that can be returned.
 
Method Summary
 void clearResults()
          Clears the search result Vector.
 int getClassId()
          Gets the object class identifier.
 java.lang.String getFilter()
          Gets the search filter criteria.
 int getMaxItems()
          Gets the maximum number of result set items to display at one time.
 int getMaxResults()
          Gets the maximum number of records that can be returned from a single user directory search operation.
 int getNextItem()
          Gets the number of the item to start with when displaying the next set of records.
 int getNumberItemsFound()
          Gets the number of items found during the current search.
 int getNumberItemsReturned()
          Gets the number of items retrieved from the current search.
 int getPreviousItem()
          Gets the number of the item to start with when displaying the previous set of records.
 java.lang.String[] getPropertyNames()
          Gets the list of property names to search for.
 java.util.Vector getResults()
          Returns a list of SmDmsObject objects with the distinguished names of items found in the search.
 java.lang.String getRoot()
          Gets the user directory branch where the search should start.
 int getScope()
          Gets the scope of the search.
 int getTimeout()
          Gets the maximum time in seconds that the Policy Server can spend searching the user directory for results.
 void readProperties(java.util.Hashtable properties)
          Copies the search criteria properties from properties to this object.
 void setClassId(int classId)
          Sets the object class identifier.
 void setFilter(java.lang.String filter)
          Sets the search filter criteria.
 void setMaxItems(int maxItems)
          Sets the maximum number of result set items to display at one time.
 void setMaxResults(int nMaxResults)
          Sets the maximum number of records that can be returned from a single user directory search operation.
 void setNextItem(int nextItem)
          Sets the number of the item to start with when displaying the next set of records.
 void setPreviousItem(int previousItem)
          Sets the number of the item to start with when displaying the previous set of records.
 void setPropertyNames(java.lang.String[] propertyNames)
          Sets the list of property names to search for.
 void setRoot(java.lang.String root)
          Sets the user directory branch where the search should start.
 void setScope(int scope)
          Sets the scope of a search in LDAP directories.
 void setTimeout(int timeout)
          Sets the maximum time in seconds that the Policy Server can spend searching the user directory for results.
 void writeProperties(java.util.Hashtable properties)
          Copies the search criteria properties from this object to properties.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Reset

public static final int Reset
The search should start from the beginning. Value is 0.

See Also:
Constant Field Values

Forward

public static final int Forward
The search should start from the current position. Value is 1.

See Also:
Constant Field Values

Back

public static final int Back
The search should look back from the current position. Value is 2.

See Also:
Constant Field Values

Refresh

public static final int Refresh
The search should be performed again. Value is 3.

See Also:
Constant Field Values
Constructor Detail

SmDmsSearch

public SmDmsSearch()
Creates an SmDmsSearch object.


SmDmsSearch

public SmDmsSearch(java.lang.String filter)

Creates an SmDmsSearch object for a specified search filter.

Parameters:
filter - The filter that specifies the search criteria. For more information, see setFilter().

SmDmsSearch

public SmDmsSearch(java.lang.String filter,
                   java.lang.String root)
Creates an SmDmsSearch object for a specified search filter and starting point.

Parameters:
filter - Filter specifying the search criteria. For more information, see setFilter().
root - The starting point of the search.

SmDmsSearch

public SmDmsSearch(java.lang.String filter,
                   java.lang.String root,
                   int maxItems)
Creates an SmDmsSearch object for a specified search filter, search starting point, and maximum number of records that can be returned from a single search operation.

Parameters:
filter - Filter specifying the search criteria. For more information, see setFilter().
root - The starting point of the search.
maxItems - The maximum number of records that can be returned from a single user directory search operation.

SmDmsSearch

public SmDmsSearch(java.lang.String filter,
                   java.lang.String root,
                   java.lang.String[] propertyNames)
Creates an SmDmsSearch object for a specified search filter, search starting point, and a list of properties to be retrieved.

Parameters:
filter - Filter specifying the search criteria. For more information, see setFilter().
root - The starting point of the search.
propertyNames - The list of property names to be retrieved.

SmDmsSearch

public SmDmsSearch(java.lang.String filter,
                   java.lang.String root,
                   java.lang.String[] propertyNames,
                   int maxItems)
Creates an SmDmsSearch object for a specified search filter, search starting point, a list of properties to be retrieved, and the maximum number of records that can be returned.

Parameters:
filter - Filter specifying the search criteria. For more information, see setFilter().
root - The starting point of the search.
propertyNames - The list of property names to be retrieved.
maxItems - The maximum number of records that can be returned from a single user directory search operation.
Method Detail

getMaxItems

public int getMaxItems()
Gets the maximum number of result set items to display at one time.

Returns:
The maximum number of result set items to display at one time.

setMaxItems

public void setMaxItems(int maxItems)
Sets the maximum number of result set items to display at one time.

Parameters:
maxItems - The maximum number of result set items to display at one time.

getClassId

public int getClassId()
Gets the object class identifier.

Returns:
The object class identifier.

setClassId

public void setClassId(int classId)
Sets the object class identifier.

Parameters:
classId - The object class identifier.

getScope

public int getScope()
Gets the scope of the search. Valid only with LDAP directories.

Returns:
The scope of the search.

setScope

public void setScope(int scope)
Sets the scope of a search in LDAP directories. Valid values for scope:
0 = search base only
1 = search base and one level below
2 = search whole tree

Parameters:
scope - The scope of the search.

getMaxResults

public int getMaxResults()
Gets the maximum number of records that can be returned from a single user directory search operation.

Returns:
The maximum number of records that can be returned from a single user directory search operation.

setMaxResults

public void setMaxResults(int nMaxResults)
Sets the maximum number of records that can be returned from a single user directory search operation.

Parameters:
maxItems - The maximum number of records that can be returned from a single user directory search operation.

getTimeout

public int getTimeout()
Gets the maximum time in seconds that the Policy Server can spend searching the user directory for results.

Returns:
The maximum time in seconds that the Policy Server can spend searching the user directory for results.

setTimeout

public void setTimeout(int timeout)
Sets the maximum time in seconds that the Policy Server can spend searching the user directory for results.

Parameters:
timeout - The maximum time in seconds that the Policy Server can spend searching the user directory for results.

getNumberItemsFound

public int getNumberItemsFound()
Gets the number of items found during the current search.

Returns:
The number of items found during the current search.

getNumberItemsReturned

public int getNumberItemsReturned()
Gets the number of items retrieved from the current search.

Returns:
The number of items returned after the search.

getNextItem

public int getNextItem()
Gets the number of the item to start with when displaying the next set of records. Call getMaxItems() to determine the number of records to display at one time.

Returns:
The start item when displaying the next set of records.

setNextItem

public void setNextItem(int nextItem)
Sets the number of the item to start with when displaying the next set of records. Call getMaxItems() to determine the number of records to display at one time.

Parameters:
nextItem - The start item when displaying the next set of records.

getPreviousItem

public int getPreviousItem()
Gets the number of the item to start with when displaying the previous set of records. Call getMaxItems() to determine the number of records to display at one time.

Returns:
The start item when displaying the previous set of records.

setPreviousItem

public void setPreviousItem(int previousItem)
Sets the number of the item to start with when displaying the previous set of records. Call getMaxItems() to determine the number of records to display at one time.

Parameters:
previousItem - The start item when displaying the previous set of records.

getFilter

public java.lang.String getFilter()
Gets the search filter criteria.

Returns:
The search filter criteria.

setFilter

public void setFilter(java.lang.String filter)

Sets the search filter criteria.

How you construct the search filter depends on the following circumstances:


With ODBC database searches that pass an SmDmsCursor object to the search method, the DMS API constructs the complete SQL SELECT statement from various sources, as follows:


Parameters:
filter - The search filter criteria.

getRoot

public java.lang.String getRoot()
Gets the user directory branch where the search should start. Valid only with LDAP directories.

Returns:
The starting point of the search.

setRoot

public void setRoot(java.lang.String root)
Sets the user directory branch where the search should start. Valid only with LDAP directories.

Parameters:
root - The starting point of the search.

getPropertyNames

public java.lang.String[] getPropertyNames()
Gets the list of property names to search for.

Returns:
The list of property names to search for.

setPropertyNames

public void setPropertyNames(java.lang.String[] propertyNames)
Sets the list of property names to search for.

Parameters:
propertyNames - The list of property names to search for.

getResults

public java.util.Vector getResults()
Returns a list of SmDmsObject objects with the distinguished names of items found in the search. The first element of the Vector will be an SmDmsSearchResultParams object containing the search result parameters.

Returns:
Search results.

clearResults

public void clearResults()
Clears the search result Vector.


writeProperties

public void writeProperties(java.util.Hashtable properties)
Copies the search criteria properties from this object to properties.

Parameters:
properties - The hashtable where the properties of this object will be copied.

readProperties

public void readProperties(java.util.Hashtable properties)
Copies the search criteria properties from properties to this object.

Parameters:
properties - The hashtable where the properties will be copied from.

SiteMinder
Java SDK r12.51

Mon 04/08/2013

http://ca.com
Copyright (c) 2013 CA.