SiteMinder
Java SDK r12.0 SP2


com.netegrity.sdk.dmsapi
Class SmDmsOrganization

java.lang.Object
  |
  +--com.netegrity.sdk.dmsapi.SmDmsObject
        |
        +--com.netegrity.sdk.dmsapi.SmDmsOrganization

public class SmDmsOrganization
extends SmDmsObject

Represents an organization, such as Engineering or Human Resources, within a directory.

A SiteMinder user directory is a conceptual view of a single organizational unit (such as Engineering or Human Resources) within a larger entity (such as a corporation). SiteMinder user directories make managing an entire directory structure easier by breaking up the directory into smaller, more manageable, and logically related segments.

This class lets you perform the following operations:

Since:
SDK 2.0

Field Summary
 
Fields inherited from class com.netegrity.sdk.dmsapi.SmDmsObject
DMSOBJECT_CLASS_DIRECTORY, DMSOBJECT_CLASS_GROUP, DMSOBJECT_CLASS_ORGANIZATION, DMSOBJECT_CLASS_ROLE, DMSOBJECT_CLASS_UNKNOWN, DMSOBJECT_CLASS_USER
 
Method Summary
 SmApiResult getGroups(SmDmsCursor cursorObj, java.util.Vector attrNames, java.util.Vector groups, int direction)
          Gets a list of groups in the organization, and also gets information about the group attributes specified in attrNames.
 SmApiResult getGroups(java.util.Vector groups)
          Gets a list of groups in the organization.
 SmApiResult getOrganizations(java.util.Vector organizations)
          Gets organizations within an organization.
 SmApiResult getRoles(java.util.Vector roles)
          Gets roles of an organization.
 SmDmsGroup newGroup(java.lang.String dn)
          Gets a new SmDmsGroup object.
 SmDmsOrganization newOrganization(java.lang.String dn)
          Gets a new SmDmsOrganization object.
 SmDmsRole newRole(java.lang.String dn)
          Gets a new SmDmsRole object for a given distinguished name.
 SmDmsUser newUser(java.lang.String dn)
          Gets a new SmDmsUser object.
 SmApiResult search(SmDmsSearch searchObj)
          Searches an organization for the specified search criteria.
 SmApiResult search(SmDmsSearch searchObj, int direction)
          Searches an organization for the specified search criteria and in the specified direction.
 SmApiResult search(SmDmsSearch searchObj, SmDmsCursor cursorObj)
          Searches an organization for the specified search criteria, sorts the result set, and fetches the first page.
 SmApiResult search(SmDmsSearch searchObj, SmDmsCursor cursorObj, int direction)
          Searches an organization for the specified search criteria according to the specified cursor description and search direction.
 SmApiResult searchBack(SmDmsSearch searchObj)
          Searches backward in an organization for the specified search criteria.
 SmApiResult searchBack(SmDmsSearch searchObj, SmDmsCursor cursorObj)
          Fetches the previous page in the result set and refreshes the search if necessary.
 SmApiResult searchForward(SmDmsSearch searchObj)
          Searches forward in an organization for the specified search criteria.
 SmApiResult searchForward(SmDmsSearch searchObj, SmDmsCursor cursorObj)
          Fetches the next page in the result set and refreshes the search if necessary.
 SmApiResult searchRefresh(SmDmsSearch searchObj)
          Repeats the search for the specified search criteria.
 SmApiResult searchRefresh(SmDmsSearch searchObj, SmDmsCursor cursorObj)
          Repeats the search for the specified search criteria, sorts the result, and fetches the same page currently being viewed.
 
Methods inherited from class com.netegrity.sdk.dmsapi.SmDmsObject
addObject, addToGroup, clearAttributes, deleteObject, getApiSession, getAttribute, getAttributes, getClassId, getDmsConfig, getDn, getGroups, getGroups, getObject, getObject, getOrganizationDn, getRealm, getUserDirectory, getVersion, isActiveDir, modifyObject, modifyObjectClass, newDmsObject, readAttributes, removeFromGroup, setActiveDir, setAttribute, setAttributes, setClassId, toString, writeAttributes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

newUser

public SmDmsUser newUser(java.lang.String dn)
                  throws SmApiException
Gets a new SmDmsUser object. This method does not create a user in a directory. To add a user in a directory, call addObject() on the SmDmsUser object.

Parameters:
dn - The distinguished name of the user.
Returns:
An SmDmsUser object.
SmApiException

newGroup

public SmDmsGroup newGroup(java.lang.String dn)
                    throws SmApiException
Gets a new SmDmsGroup object. This method does not add a group in a directory. To add a group to a directory, call addObject() on the SmDmsGroup object.

Parameters:
dn - The distinguished name of the group.
Returns:
An SmDmsGroup object.
SmApiException

newOrganization

public SmDmsOrganization newOrganization(java.lang.String dn)
                                  throws SmApiException
Gets a new SmDmsOrganization object. This method does not add an organization in a directory. To add an organization to a directory, call addObject() on the SmDmsOrganization object.

Parameters:
dn - The distinguished name of the organization.
Returns:
An SmDmsOrganization object.
SmApiException

newRole

public SmDmsRole newRole(java.lang.String dn)
                  throws SmApiException
Gets a new SmDmsRole object for a given distinguished name. This method does not add a role. To add a role, call addObject() on the SmDmsRole object.

Parameters:
dn - The distinguished name of the role.
Returns:
An SmDmsRole object.
SmApiException

getOrganizations

public SmApiResult getOrganizations(java.util.Vector organizations)
                             throws SmApiException

Gets organizations within an organization.

This method requires an organization administrator session or higher.

Parameters:
organizations - Vector containing organization DNs (String).
Returns:
SmApiResult Result of the request.
SmApiException

getGroups

public SmApiResult getGroups(java.util.Vector groups)
                      throws SmApiException
Gets a list of groups in the organization.

To retrieve group names and selected attribute information, call getGroups(SmDmsCursor, Vector, Vector, int).

Parameters:
groups - When this method returns successfully, this output parameter is filled with a Vector of strings containing the distinguished names of groups.
Returns:
SmApiResult Result of the request.
SmApiException

getGroups

public SmApiResult getGroups(SmDmsCursor cursorObj,
                             java.util.Vector attrNames,
                             java.util.Vector groups,
                             int direction)
                      throws SmApiException
Gets a list of groups in the organization, and also gets information about the group attributes specified in attrNames.

The search result is sorted and paginated according to the information in SmDmsCursor.

Call this method each time you want to retrieve a new page from the result set.

With LDAP directories, do not retrieve the attribute that lists all the static members for the group. Including this attribute degrades performance and could overwhelm the buffer.

To retrieve group names only, call getGroups(Vector).

Note: This version of getGroups() is not supported with ODBC databases. Use an SmDmsOrganization.search... method instead, or use the getGroups(Vector) version that retrieves group names but not attribute information.

Parameters:
cursorObj - The object containing cursor sorting and paging information.
attrNames - A Vector of strings containing the names of the attributes to retrieve.
groups - When this method returns successfully, this output parameter is filled with a Vector of SmDmsObject objects containing the distinguished names of the retrieved groups and the specified attribute information.
direction - The search direction. One of the following:
Returns:
SmApiResult Result of the request.
SmApiException
Since:
SDK 2.2

getRoles

public SmApiResult getRoles(java.util.Vector roles)
                     throws SmApiException

Gets roles of an organization.

This method requires an organization administrator session or higher.

Parameters:
roles - Vector output parameter containing distinguished names of roles (String).
Returns:
SmApiResult Result of the request.
SmApiException

search

public SmApiResult search(SmDmsSearch searchObj)
                   throws SmApiException

Searches an organization for the specified search criteria.

To retrieve the result, call getResults().

This method requires an organization administrator session or higher.

Parameters:
searchObj - SmDmsSearch object containing the search expression.
Returns:
SmApiResult Result of the request.
SmApiException
See Also:
search(SmDmsSearch, int), search(SmDmsSearch, SmDmsCursor), search(SmDmsSearch, SmDmsCursor, int)

search

public SmApiResult search(SmDmsSearch searchObj,
                          SmDmsCursor cursorObj)
                   throws SmApiException
Searches an organization for the specified search criteria, sorts the result set, and fetches the first page.

This method implicitly resets the cursor's offset to zero.

To retrieve the result, call getResults().

This method requires an organization administrator session or higher.

Parameters:
searchObj - SmDmsSearch object containing the search expression.
cursorObj - SmDmsCursor object containing cursor sorting and paging information.
Returns:
SmApiResult Result of the request.
SmApiException
Since:
SDK 2.2
See Also:
search(SmDmsSearch), search(SmDmsSearch, int), search(SmDmsSearch, SmDmsCursor, int)

searchForward

public SmApiResult searchForward(SmDmsSearch searchObj)
                          throws SmApiException

Searches forward in an organization for the specified search criteria.

To search forward and sort the result set, call searchForward(SmDmsSearch, SmDmsCursor).

To retrieve the result, call getResults().

This method requires an organization administrator session or higher.

Parameters:
searchObj - SmDmsSearch object containing the search expression.
Returns:
SmApiResult Result of the request.
SmApiException

searchForward

public SmApiResult searchForward(SmDmsSearch searchObj,
                                 SmDmsCursor cursorObj)
                          throws SmApiException

Fetches the next page in the result set and refreshes the search if necessary. If the search is refreshed, the result is sorted.

This method implicitly advances the cursor's offset to point to the beginning of the next page.

To search forward without sorting the result set, call searchForward(SmDmsSearch).

To retrieve the result, call getResults().

This method requires an organization administrator session or higher.

Parameters:
searchObj - SmDmsSearch object containing the search expression.
cursorObj - SmDmsCursor object containing cursor sorting and paging information.
Returns:
SmApiResult Result of the request.
SmApiException
Since:
SDK 2.2

searchBack

public SmApiResult searchBack(SmDmsSearch searchObj)
                       throws SmApiException

Searches backward in an organization for the specified search criteria. To search backward and sort the result set, call searchBack(SmDmsSearch, SmDmsCursor).

To retrieve the result, call getResults().

This method requires an organization administrator session or higher.

Parameters:
searchObj - SmDmsSearch object containing the search expression.
Returns:
SmApiResult Result of the request.
SmApiException

searchBack

public SmApiResult searchBack(SmDmsSearch searchObj,
                              SmDmsCursor cursorObj)
                       throws SmApiException

Fetches the previous page in the result set and refreshes the search if necessary. If the search is refreshed, the result is sorted.

This method implicitly regresses the cursor's offset to point to the beginning of the previous page.

To search backward without sorting the result set, call searchBack(SmDmsSearch).

To retrieve the result, call getResults().

This method requires an organization administrator session or higher.

Parameters:
searchObj - SmDmsSearch object containing the search expression.
cursorObj - SmDmsCursor object containing cursor sorting and paging information.
Returns:
SmApiResult Result of the request.
SmApiException
Since:
SDK 2.2

searchRefresh

public SmApiResult searchRefresh(SmDmsSearch searchObj)
                          throws SmApiException

Repeats the search for the specified search criteria.

To refresh the search and sort the result set, call searchRefresh(SmDmsSearch, SmDmsCursor).

To retrieve the result, call getResults().

This method requires an organization administrator session or higher.

Parameters:
searchObj - SmDmsSearch object containing the search expression.
Returns:
SmApiResult Result of the request.
SmApiException

searchRefresh

public SmApiResult searchRefresh(SmDmsSearch searchObj,
                                 SmDmsCursor cursorObj)
                          throws SmApiException

Repeats the search for the specified search criteria, sorts the result, and fetches the same page currently being viewed.

This method does not modify the cursor's offset.

To refresh the search without sorting the result set, call searchRefresh(SmDmsSearch).

To retrieve the result, call getResults().

This method requires an organization administrator session or higher.

Parameters:
searchObj - SmDmsSearch object containing the search expression.
cursorObj - SmDmsCursor object containing cursor sorting and paging information.
Returns:
SmApiResult Result of the request.
SmApiException
Since:
SDK 2.2

search

public SmApiResult search(SmDmsSearch searchObj,
                          int direction)
                   throws SmApiException
Searches an organization for the specified search criteria and in the specified direction.

To retrieve the result, call getResults().

This method requires an organization administrator session or higher.

Parameters:
searchObj - SmDmsSearch object containing the search expression.
direction - Direction of the search defined in SmDmsSearch. One of the following: If none of the above values is specified, the method performs a regular search().
Returns:
SmApiResult Result of the request.
SmApiException
See Also:
search(SmDmsSearch), search(SmDmsSearch, SmDmsCursor), search(SmDmsSearch, SmDmsCursor, int)

search

public SmApiResult search(SmDmsSearch searchObj,
                          SmDmsCursor cursorObj,
                          int direction)
                   throws SmApiException
Searches an organization for the specified search criteria according to the specified cursor description and search direction.

To retrieve the result, call getResults().

Call this method each time you want to retrieve a new page from the result set.

This method requires an organization administrator session or higher.

Parameters:
searchObj - SmDmsSearch object containing the search expression.
cursorObj - SmDmsCursor object containing cursor sorting and paging information.
direction - Direction of the search defined in SmDmsSearch. One of the following: If none of the above values is specified, the method performs a regular search(SmDmsSearch,SmDmsCursor).
Returns:
SmApiResult Result of the request.
SmApiException
Since:
SDK 2.2
See Also:
search(SmDmsSearch), search(SmDmsSearch, int), search(SmDmsSearch, SmDmsCursor)

SiteMinder
Java SDK r12.0 SP2

Fri 11/06/2009

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