FileNet Content Services
Java Connector v3.0

com.filenet.wcm.api
Interface Realm

All Superinterfaces:
BaseObject, ReadableMetadataObject, java.io.Serializable, ValueObject

public interface Realm
extends ReadableMetadataObject

Not Implemented in CS Java Connector v3.0.

A realm is an abstract entity representing a security trust partitioning. A realm contains collections of users and groups that are trusted by the domain in which the Content Services server is running. A realm may correspond to the same domain, another domain in the same forest, or a trusted domain in a different forest. In the case of a trusted domain in a different forest, the trust relationship might be only one-directional, in which case the current user might not have sufficient rights to examine information in the trusted realm. In that case, the calling method will throw an UntrustedCredentialsException. You can attempt to recover from this exception by retrying the method with a Session object parameter that supplies credentials that are trusted by the realm.

The primary use of a Realm object is to retrieve lists of the users and groups within a trusted domain.

You can instantiate a Realm object by:

You can also instantiate a Realm object by first instantiating a Realms collection, then retrieving a Realm object from the collection. For ways to instantiate this collection object, refer to the reference help provided for the Realms interface.


Field Summary
static int PRINCIPAL_SEARCH_ATTR_DISPLAY_NAME
          

Not Implemented in CS Java Connector v3.0.

static int PRINCIPAL_SEARCH_ATTR_NONE
          

Not Implemented in CS Java Connector v3.0.

static int PRINCIPAL_SEARCH_ATTR_SHORT_NAME
          

Not Implemented in CS Java Connector v3.0.

static int PRINCIPAL_SEARCH_SORT_ASCENDING
          

Not Implemented in CS Java Connector v3.0.

static int PRINCIPAL_SEARCH_SORT_DESCENDING
          

Not Implemented in CS Java Connector v3.0.

static int PRINCIPAL_SEARCH_SORT_NONE
          

Not Implemented in CS Java Connector v3.0.

static int PRINCIPAL_SEARCH_TYPE_CONTAINS
          

Not Implemented in CS Java Connector v3.0.

static int PRINCIPAL_SEARCH_TYPE_CUSTOM
          

Not Implemented in CS Java Connector v3.0.

static int PRINCIPAL_SEARCH_TYPE_EXACT
          

Not Implemented in CS Java Connector v3.0.

static int PRINCIPAL_SEARCH_TYPE_NONE
          

Not Implemented in CS Java Connector v3.0.

static int PRINCIPAL_SEARCH_TYPE_PREFIX_MATCH
          

Not Implemented in CS Java Connector v3.0.

static int PRINCIPAL_SEARCH_TYPE_SUFFIX_MATCH
          

Not Implemented in CS Java Connector v3.0.

 
Fields inherited from interface com.filenet.wcm.api.BaseObject
EXPORT_DEFAULT, EXPORT_ENCODED_CONTENT, EXPORT_FULL, EXPORT_OBJECT_ID, EXPORT_OBJECT_SECURITY, IMPORT_DEFAULT, IMPORT_OBJECT_ID, IMPORT_OWNER, IMPORT_PERMISSIONS, TYPE_ACTIVE_MARKING, TYPE_ANNOTATION, TYPE_ANY, TYPE_CBR_ENGINE_TYPE, TYPE_CHOICE, TYPE_CHOICELIST, TYPE_CLASS_SUBSCRIPTION, TYPE_CLASSDEFINITION, TYPE_CLASSDESCRIPTION, TYPE_COLUMN_DEFINITION, TYPE_COMPUTER, TYPE_CONTENT_CACHE_SERVICE, TYPE_CONTENT_MGR_SERVICE, TYPE_CONTENT_REFERENCE, TYPE_CONTENT_TRANSFER, TYPE_CUSTOMOBJECT, TYPE_DOCUMENT, TYPE_DOCUMENT_CLASSIFICATION_ACTION, TYPE_DOCUMENT_LIFECYCLE_ACTION, TYPE_DOCUMENT_LIFECYCLE_POLICY, TYPE_DOCUMENTSTATE, TYPE_DOMAIN, TYPE_DYNAMIC_REFERENTIAL_CONTAINMENT_RELATIONSHIP, TYPE_ENTIRENETWORK, TYPE_EVENT, TYPE_EVENT_ACTION, TYPE_FEATURE_ADD_ON, TYPE_FILESTORE, TYPE_FOLDER, TYPE_GROUP, TYPE_INSTANCE_SUBSCRIPTION, TYPE_LINK, TYPE_LOCALIZED_STRING, TYPE_MARKING_SET, TYPE_MULTIPLEVALUES, TYPE_OBJECT_STORE, TYPE_OBJECTSET, TYPE_OBJSTORE_SERVICE, TYPE_PERMISSION, TYPE_PROPERTY_DEFINITION, TYPE_PROPERTYDESCRIPTION, TYPE_PROPERTYDESCRIPTIONS, TYPE_PUBLISH_REQUEST, TYPE_PUBLISH_TEMPLATE, TYPE_READONLY_OBJECT_SET, TYPE_REALM, TYPE_REFERENTIAL_CONTAINMENT_RELATIONSHIP, TYPE_SECURITY_POLICY, TYPE_SECURITY_TEMPLATE, TYPE_STORAGE_POLICY, TYPE_STORED_SEARCH, TYPE_STYLE_TEMPLATE, TYPE_SUBSCRIPTION, TYPE_TABLE_DEFINITION, TYPE_TRANSIENT, TYPE_USER, TYPE_VERSIONSERIES, TYPE_WORKFLOW_CLASS_SUBSCRIPTION, TYPE_WORKFLOW_INSTANCE_SUBSCRIPTION, TYPE_WORKFLOWDEFINITION, TYPE_XML_PROPERTY_MAPPING_SCRIPT
 
Method Summary
 Groups findGroups(java.lang.String searchPattern, int searchType, int searchedAttribute, int sortType, int maxResults)
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String findGroupsXML(java.lang.String searchPattern, int searchType, int searchedAttribute, int sortType, int maxResults)
          

Not Implemented in CS Java Connector v3.0.

 Users findUsers(java.lang.String searchPattern, int searchType, int searchedAttribute, int sortType, int maxResults)
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String findUsersXML(java.lang.String searchPattern, int searchType, int searchedAttribute, int sortType, int maxResults)
          

Not Implemented in CS Java Connector v3.0.

 Groups getGroups()
          Deprecated. Use findGroups().
 Groups getGroups(Session trustMe)
          Deprecated. Use findGroups().
 java.lang.String getGroupsXML()
          Deprecated. Use findGroupsXML().
 java.lang.String getGroupsXML(Session trustMe)
          Deprecated. Use findGroupsXML().
 Users getUsers()
          Deprecated. Use findUsers().
 Users getUsers(Session trustMe)
          Deprecated. Use findUsers().
 java.lang.String getUsersXML()
          Deprecated. Use findUsers().
 java.lang.String getUsersXML(Session trustMe)
          Deprecated. Use findUsers().
 
Methods inherited from interface com.filenet.wcm.api.ReadableMetadataObject
getProperties, getProperties, getPropertiesXML, getPropertyBinaryValue, getPropertyBooleanValue, getPropertyDateValue, getPropertyDoubleValue, getPropertyIntValue, getPropertyStringValue, getPropertyValue, getPropertyValuesValue, refresh, refresh
 
Methods inherited from interface com.filenet.wcm.api.BaseObject
equals, exportObject, getClassId, getId, getName, getObjectStoreId, getObjectType, getSession, hashCode, thisBaseObject
 

Field Detail

PRINCIPAL_SEARCH_TYPE_NONE

public static final int PRINCIPAL_SEARCH_TYPE_NONE

Not Implemented in CS Java Connector v3.0.

Value of 0; specifies no searching; all groups or users will be returned. Only valid with PRINCIPAL_SEARCH_ATTR_NONE.

See Also:
Constant Field Values

PRINCIPAL_SEARCH_TYPE_CUSTOM

public static final int PRINCIPAL_SEARCH_TYPE_CUSTOM

Not Implemented in CS Java Connector v3.0.

Value of 1; specifies a search in which the provided search string will be passed directly to the Directory Service without escaping special characters. Provides a calling application the flexibility needed to place wildcards directly in the search string.

See Also:
Constant Field Values

PRINCIPAL_SEARCH_TYPE_PREFIX_MATCH

public static final int PRINCIPAL_SEARCH_TYPE_PREFIX_MATCH

Not Implemented in CS Java Connector v3.0.

Value of 2; specifies a search that returns groups or users whose names start with the given string. A search of "ab" will return all groups or users whose names start with the characters ab.

See Also:
Constant Field Values

PRINCIPAL_SEARCH_TYPE_SUFFIX_MATCH

public static final int PRINCIPAL_SEARCH_TYPE_SUFFIX_MATCH

Not Implemented in CS Java Connector v3.0.

Value of 3; specifies a search that returns groups or users whose names end with the given string. A search of "yz" will return all groups or users whose names end with the characters yz.

See Also:
Constant Field Values

PRINCIPAL_SEARCH_TYPE_CONTAINS

public static final int PRINCIPAL_SEARCH_TYPE_CONTAINS

Not Implemented in CS Java Connector v3.0.

Value of 4; specifies a search that returns groups or users whose names contain the given string. A search of "do" will return all groups or users whose names have the characters do in their name.

See Also:
Constant Field Values

PRINCIPAL_SEARCH_TYPE_EXACT

public static final int PRINCIPAL_SEARCH_TYPE_EXACT

Not Implemented in CS Java Connector v3.0.

Value of 5; specifies a search that returns groups or users whose names exactly match the given string. The string is escaped before being sent to the Directory Service, which allows user or group names to contain characters that would otherwise be treated as wildcards to be specified (ab?d, for instance). A search of "do" will return all groups or users whose names are do.

See Also:
Constant Field Values

PRINCIPAL_SEARCH_ATTR_NONE

public static final int PRINCIPAL_SEARCH_ATTR_NONE

Not Implemented in CS Java Connector v3.0.

Value of 0; specifies that no attribute is included in the search criteria. Only valid with PRINCIPAL_SEARCH_TYPE_NONE.

See Also:
Constant Field Values

PRINCIPAL_SEARCH_ATTR_SHORT_NAME

public static final int PRINCIPAL_SEARCH_ATTR_SHORT_NAME

Not Implemented in CS Java Connector v3.0.

Value of 1; specifies that the group's or user's Short Name is the attribute to be included in the search criteria.

See Also:
Constant Field Values

PRINCIPAL_SEARCH_ATTR_DISPLAY_NAME

public static final int PRINCIPAL_SEARCH_ATTR_DISPLAY_NAME

Not Implemented in CS Java Connector v3.0.

Value of 2; specifies that the group's or user's Display Name is the attribute to be included in the search criteria.

See Also:
Constant Field Values

PRINCIPAL_SEARCH_SORT_NONE

public static final int PRINCIPAL_SEARCH_SORT_NONE

Not Implemented in CS Java Connector v3.0.

Value of 0; specifies that no sorting is done; items are returned directly from the Directory Service.

See Also:
Constant Field Values

PRINCIPAL_SEARCH_SORT_ASCENDING

public static final int PRINCIPAL_SEARCH_SORT_ASCENDING

Not Implemented in CS Java Connector v3.0.

Value of 1; specifies that the returned items will be in ascending order.

See Also:
Constant Field Values

PRINCIPAL_SEARCH_SORT_DESCENDING

public static final int PRINCIPAL_SEARCH_SORT_DESCENDING

Not Implemented in CS Java Connector v3.0.

Value of 2; specifies that the returned items will be in descending order.

See Also:
Constant Field Values
Method Detail

getUsers

public Users getUsers()
Deprecated. Use findUsers().

Not Implemented in CS Java Connector v3.0.


getUsers

public Users getUsers(Session trustMe)
               throws UntrustedCredentialsException
Deprecated. Use findUsers().

Not Implemented in CS Java Connector v3.0.

Throws:
UntrustedCredentialsException

getGroups

public Groups getGroups()
Deprecated. Use findGroups().

Not Implemented in CS Java Connector v3.0.


getGroups

public Groups getGroups(Session trustMe)
                 throws UntrustedCredentialsException
Deprecated. Use findGroups().

Not Implemented in CS Java Connector v3.0.

Throws:
UntrustedCredentialsException

getUsersXML

public java.lang.String getUsersXML()
Deprecated. Use findUsers().

Not Implemented in CS Java Connector v3.0.


getUsersXML

public java.lang.String getUsersXML(Session trustMe)
                             throws UntrustedCredentialsException
Deprecated. Use findUsers().

Not Implemented in CS Java Connector v3.0.

Throws:
UntrustedCredentialsException

getGroupsXML

public java.lang.String getGroupsXML()
Deprecated. Use findGroupsXML().

Not Implemented in CS Java Connector v3.0.


getGroupsXML

public java.lang.String getGroupsXML(Session trustMe)
                              throws UntrustedCredentialsException
Deprecated. Use findGroupsXML().

Not Implemented in CS Java Connector v3.0.

Throws:
UntrustedCredentialsException

findUsers

public Users findUsers(java.lang.String searchPattern,
                       int searchType,
                       int searchedAttribute,
                       int sortType,
                       int maxResults)

Not Implemented in CS Java Connector v3.0.

Searches for and returns a set of users based on search criteria. The search criteria consists of a search pattern, search type, and an attribute to be searched for. You can also sort the collection as well as limit the number of elements returned in the collection.

The searchPattern parameter defines a string of characters that are used to compare against the name of each user in the realm. For instance, "ab" (along with a search type of PRINCIPAL_SEARCH_TYPE_PREFIX_MATCH) will find all users whose names start with the characters ab.

The searchType parameter identifies the type of search you want to conduct, as follows:

The searchedAttribute parameter identifies the User object attribute to be included in the search criteria, as follows:

The sortType parameter specifies how to sort the User objects in the returned collection, as follows:

You can limit the number of elements returned in the collection by setting the maxResults parameter. A value of zero (0) or less returns all users, while a positive value limits the results to the specified number.

Note that performing an unsorted search AND specifying a maximum results value may return unexpected results. As an example, you might ask for the first 50 items that are prefixed with "abb" and expect to see both "abba" and "abbot" in the returned list. Because the Directory Service chooses which 50 items to return, the result list might contain "abbot" but not "abba" (or might contain neither). You can avoid this issue by specifying a sorted list.

Parameters:
searchPattern - A String that contains a pattern of characters to search for. If null or an empty string, searchType must be set to 0 (PRINCIPAL_SEARCH_TYPE_NONE), in which case all users in this realm are returned. If one or more characters are specified in the searchPattern string, then searchType and searchedAttribute must be set to a value other than 0 (None). If these parameter combination constraints are not met, an exception is thrown.

searchType - An integer that indicates the type of search to conduct. Valid values are 0 through 5. Specify the value using one of the PRINCIPAL_SEARCH_TYPE constants defined in this interface. If set to 0 (PRINCIPAL_SEARCH_TYPE_NONE), then searchPattern must be null or an empty string (in which case all users in this realm are returned). If set to a value other than 0, then searchPattern cannot be null or an empty string, and searchedAttribute must be set to a value other than 0 (PRINCIPAL_SEARCH_ATTR_NONE). If these parameter combination constraints are not met, an exception is thrown.

searchedAttribute - An integer that indicates the attribute to be included in the search criteria. Valid values are 0 through 2. Specify the value using one of the PRINCIPAL_SEARCH_ATTR constants defined in this interface. If set to 0 (PRINCIPAL_SEARCH_ATTR_NONE), then searchPattern must be null or an empty string, and searchType and sortType must be set to 0 (None) otherwise an exception is thrown; this combination of settings returns an unsorted collection of all users in this realm.

sortType - An integer that indicates how to sort the items in the returned collection. Valid values are 0 through 2. Specify the value using one of the PRINCIPAL_SEARCH_SORT constants defined in this interface. If set to a value other than 0 (PRINCIPAL_SEARCH_SORT_NONE), then searchedAttribute must be set to a value other than 0 (PRINCIPAL_SEARCH_ATTR_NONE) or an exception is thrown. In other words, if you specify an ascending or descending sort, then you must also specify whether the sort should be performed on the Short Name or the Display Name.

maxResults - Specifies the maximum number of items to include in the result set. A value less than or equal to 0 returns all users; a positive value limits the results to the specified number.

Returns:
A Users collection. The elements of the returned collection represent the users in this realm that met the specified search criteria.

findGroups

public Groups findGroups(java.lang.String searchPattern,
                         int searchType,
                         int searchedAttribute,
                         int sortType,
                         int maxResults)

Not Implemented in CS Java Connector v3.0.

Searches for and returns a set of groups based on search criteria. The search criteria consists of a search pattern, search type, and an attribute to be searched for. You can also sort the collection as well as limit the number of elements returned in the collection.

The searchPattern parameter defines a string of characters that are used to compare against the name of each group in the realm. For instance, "ab" (along with a search type of PRINCIPAL_SEARCH_TYPE_PREFIX_MATCH) will find all groups whose names start with the characters ab.

The searchType parameter identifies the type of search you want to conduct, as follows:

The searchedAttribute parameter identifies the Group object attribute to be included in the search criteria, as follows:

The sortType parameter specifies how to sort the Group objects in the returned collection, as follows:

You can limit the number of elements returned in the collection by setting the maxResults parameter. A value of zero (0) or less returns all groups, while a positive value limits the results to the specified number.

Note that performing an unsorted search AND specifying a maximum results value may return unexpected results. As an example, you might ask for the first 50 items that are prefixed with "abb" and expect to see both "abba" and "abbot" in the returned list. Because the Directory Service chooses which 50 items to return, the result list might contain "abbot" but not "abba" (or might contain neither). You can avoid this issue by specifying a sorted list.

Parameters:
searchPattern - A String that contains a pattern of characters to search for. If null or an empty string, searchType must be set to 0 (PRINCIPAL_SEARCH_TYPE_NONE), in which case all groups in this realm are returned. If one or more characters are specified in the searchPattern string, then searchType and searchedAttribute must be set to a value other than 0 (None). If these parameter combination constraints are not met, an exception is thrown.

searchType - An integer that indicates the type of search to conduct. Valid values are 0 through 5. Specify the value using one of the PRINCIPAL_SEARCH_TYPE constants defined in this interface. If set to 0 (PRINCIPAL_SEARCH_TYPE_NONE), then searchPattern must be null or an empty string (in which case all groups in this realm are returned). If set to a value other than 0, then searchPattern cannot be null or an empty string, and searchedAttribute must be set to a value other than 0 (PRINCIPAL_SEARCH_ATTR_NONE). If these parameter combination constraints are not met, an exception is thrown.

searchedAttribute - An integer that indicates the attribute to be included in the search criteria. Valid values are 0 through 2. Specify the value using one of the PRINCIPAL_SEARCH_ATTR constants defined in this interface. If set to 0 (PRINCIPAL_SEARCH_ATTR_NONE), then searchPattern must be null or an empty string, and searchType and sortType must be set to 0 (None) otherwise an exception is thrown; this combination of settings returns an unsorted collection of all groups in this realm.

sortType - An integer that indicates how to sort the items in the returned collection. Valid values are 0 through 2. Specify the value using one of the PRINCIPAL_SEARCH_SORT constants defined in this interface. If set to a value other than 0 (PRINCIPAL_SEARCH_SORT_NONE), then searchedAttribute must be set to a value other than 0 (PRINCIPAL_SEARCH_ATTR_NONE) or an exception is thrown. In other words, if you specify an ascending or descending sort, then you must also specify whether the sort should be performed on the Short Name or the Display Name.

maxResults - Specifies the maximum number of items to include in the result set. A value less than or equal to 0 returns all groups; a positive value limits the results to the specified number.

Returns:
A Groups collection. The elements of the returned collection represent the groups in this Realm that met the specified search criteria.

findUsersXML

public java.lang.String findUsersXML(java.lang.String searchPattern,
                                     int searchType,
                                     int searchedAttribute,
                                     int sortType,
                                     int maxResults)

Not Implemented in CS Java Connector v3.0.

Searches for a set of users based on search criteria and returns a string in XML that represents those users. The search criteria consists of a search pattern, search type, and an attribute to be searched for. You can also sort the collection as well as limit the number of elements returned in the collection.

The searchPattern parameter defines a string of characters that are used to compare against the name of each user in the realm. For instance, "ab" (along with a search type of PRINCIPAL_SEARCH_TYPE_PREFIX_MATCH) will find all users that start with the characters ab.

The searchType parameter identifies the type of search you want to conduct, as follows:

The searchedAttribute parameter identifies the User object attribute to be included in the search criteria, as follows:

The sortType parameter specifies how to sort the User objects in the returned collection, as follows:

You can limit the number of elements returned in the collection by setting the maxResults parameter. A value of zero (0) or less returns all users, while a positive value limits the results to the specified number.

Note that performing an unsorted search AND specifying a maximum results value may return unexpected results. As an example, you might ask for the first 50 items that are prefixed with "abb" and expect to see both "abba" and "abbot" in the returned list. Because the Directory Service chooses which 50 items to return, the result list might contain "abbot" but not "abba" (or might contain neither). You can avoid this issue by specifying a sorted list.

Parameters:
searchPattern - A String that contains a pattern of characters to search for. If null or an empty string, searchType must be set to 0 (PRINCIPAL_SEARCH_TYPE_NONE), in which case all users in this realm are returned. If one or more characters are specified in the searchPattern string, then searchType and searchedAttribute must be set to a value other than 0 (None). If these parameter combination constraints are not met, an exception is thrown.

searchType - An integer that indicates the type of search to conduct. Valid values are 0 through 5. Specify the value using one of the PRINCIPAL_SEARCH_TYPE constants defined in this interface. If set to 0 (PRINCIPAL_SEARCH_TYPE_NONE), then searchPattern must be null or an empty string (in which case all users in this realm are returned). If set to a value other than 0, then searchPattern cannot be null or an empty string, and searchedAttribute must be set to a value other than 0 (PRINCIPAL_SEARCH_ATTR_NONE). If these parameter combination constraints are not met, an exception is thrown.

searchedAttribute - An integer that indicates the attribute to be included in the search criteria. Valid values are 0 through 2. Specify the value using one of the PRINCIPAL_SEARCH_ATTR constants defined in this interface. If set to 0 (PRINCIPAL_SEARCH_ATTR_NONE), then searchPattern must be null or an empty string, and searchType and sortType must be set to 0 (None) otherwise an exception is thrown; this combination of settings returns an unsorted collection of all users in this realm.

sortType - An integer that indicates how to sort the items in the returned collection. Valid values are 0 through 2. Specify the value using one of the PRINCIPAL_SEARCH_SORT constants defined in this interface. If set to a value other than 0 (PRINCIPAL_SEARCH_SORT_NONE), then searchedAttribute must be set to a value other than 0 (PRINCIPAL_SEARCH_ATTR_NONE) or an exception is thrown. In other words, if you specify an ascending or descending sort, then you must also specify whether the sort should be performed on the Short Name or the Display Name.

maxResults - Specifies the maximum number of items to include in the result set. A value less than or equal to 0 returns all users; a positive value limits the results to the specified number.

Returns:
An XML String representing the users in this realm. For documentation that describes the XML schema used to generate the string, refer to Schemas in the FileNet P8 Developer's Roadmap.

findGroupsXML

public java.lang.String findGroupsXML(java.lang.String searchPattern,
                                      int searchType,
                                      int searchedAttribute,
                                      int sortType,
                                      int maxResults)

Not Implemented in CS Java Connector v3.0.

Searches for a set of groups based on search criteria and returns a string in XML that represents those groups. The search criteria consists of a search pattern, search type, and an attribute to be searched for. You can also sort the collection as well as limit the number of elements returned in the collection.

The searchPattern parameter defines a string of characters that are used to compare against the name of each group in the realm. For instance, "ab" (along with a search type of PRINCIPAL_SEARCH_TYPE_PREFIX_MATCH) will find all groups whose names start with the characters ab.

The searchType parameter identifies the type of search you want to conduct, as follows:

The searchedAttribute parameter identifies the Group object attribute to be included in the search criteria, as follows:

The sortType parameter specifies how to sort the Group objects in the returned collection, as follows:

You can limit the number of elements returned in the collection by setting the maxResults parameter. A value of zero (0) or less returns all groups, while a positive value limits the results to the specified number.

Note that performing an unsorted search AND specifying a maximum results value may return unexpected results. As an example, you might ask for the first 50 items that are prefixed with "abb" and expect to see both "abba" and "abbot" in the returned list. Because the Directory Service chooses which 50 items to return, the result list might contain "abbot" but not "abba" (or might contain neither). You can avoid this issue by specifying a sorted list.

Parameters:
searchPattern - A String that contains a pattern of characters to search for. If null or an empty string, searchType must be set to 0 (PRINCIPAL_SEARCH_TYPE_NONE), in which case all groups in this realm are returned. If one or more characters are specified in the searchPattern string, then searchType and searchedAttribute must be set to a value other than 0 (None). If these parameter combination constraints are not met, an exception is thrown.

searchType - An integer that indicates the type of search to conduct. Valid values are 0 through 5. Specify the value using one of the PRINCIPAL_SEARCH_TYPE constants defined in this interface. If set to 0 (PRINCIPAL_SEARCH_TYPE_NONE), then searchPattern must be null or an empty string (in which case all groups in this realm are returned). If set to a value other than 0, then searchPattern cannot be null or an empty string, and searchedAttribute must be set to a value other than 0 (PRINCIPAL_SEARCH_ATTR_NONE). If these parameter combination constraints are not met, an exception is thrown.

searchedAttribute - An integer that indicates the attribute to be included in the search criteria. Valid values are 0 through 2. Specify the value using one of the PRINCIPAL_SEARCH_ATTR constants defined in this interface. If set to 0 (PRINCIPAL_SEARCH_ATTR_NONE), then searchPattern must be null or an empty string, and searchType and sortType must be set to 0 (None) otherwise an exception is thrown; this combination of settings returns an unsorted collection of all groups in this realm.

sortType - An integer that indicates how to sort the items in the returned collection. Valid values are 0 through 2. Specify the value using one of the PRINCIPAL_SEARCH_SORT constants defined in this interface. If set to a value other than 0 (PRINCIPAL_SEARCH_SORT_NONE), then searchedAttribute must be set to a value other than 0 (PRINCIPAL_SEARCH_ATTR_NONE) or an exception is thrown. In other words, if you specify an ascending or descending sort, then you must also specify whether the sort should be performed on the Short Name or the Display Name.

maxResults - Specifies the maximum number of items to include in the result set. A value less than or equal to 0 returns all groups; a positive value limits the results to the specified number.

Returns:
An XML String representing the groups in this realm. For documentation that describes the XML schema used to generate the string, refer to Schemas in the FileNet P8 Developer's Roadmap.

FileNet Content Services
Java Connector v3.0