|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 anUntrustedCredentialsException
.
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:
getUserRealm
method on an EntireNetwork
object, which returns a Realm
object representing the domain in
which the user resides. (Calling getUserRealmXML
returns an XML
representation of the Realm
object.)Domain
object's Realm property.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. |
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 |
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 withPRINCIPAL_SEARCH_ATTR_NONE
.
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.
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 charactersab
.
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 charactersyz
.
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 charactersdo
in their name.
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 aredo
.
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 withPRINCIPAL_SEARCH_TYPE_NONE
.
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.
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.
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.
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.
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.
Method Detail |
public Users getUsers()
Not Implemented in CS Java Connector v3.0.
public Users getUsers(Session trustMe) throws UntrustedCredentialsException
Not Implemented in CS Java Connector v3.0.
UntrustedCredentialsException
public Groups getGroups()
Not Implemented in CS Java Connector v3.0.
public Groups getGroups(Session trustMe) throws UntrustedCredentialsException
Not Implemented in CS Java Connector v3.0.
UntrustedCredentialsException
public java.lang.String getUsersXML()
Not Implemented in CS Java Connector v3.0.
public java.lang.String getUsersXML(Session trustMe) throws UntrustedCredentialsException
Not Implemented in CS Java Connector v3.0.
UntrustedCredentialsException
public java.lang.String getGroupsXML()
Not Implemented in CS Java Connector v3.0.
public java.lang.String getGroupsXML(Session trustMe) throws UntrustedCredentialsException
Not Implemented in CS Java Connector v3.0.
UntrustedCredentialsException
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:
PRINCIPAL_SEARCH_TYPE_NONE
) specifies that no attribute
is included in the search criteria.PRINCIPAL_SEARCH_TYPE_CUSTOM
) specifies a search in which the
provided search string will be passed directly to the Directory Service without
escaping special characters. This custom search type provides a calling
application the flexibility needed to place wildcards directly in the search string.
If you specify this value, you need to properly escape the search string for the
Directory Service (that is, replace '*', '(', ')', and '\' with '\2a',
'\28', '\29', and '\5c', respectively).PRINCIPAL_SEARCH_TYPE_PREFIX_MATCH
) specifies a search that
returns all users whose names start with the given string.PRINCIPAL_SEARCH_TYPE_SUFFIX_MATCH
) specifies a search that
returns all users whose names end with the given string. Specifying this option
could result in degraded performance when used with directories containing
large numbers of groups or users.PRINCIPAL_SEARCH_TYPE_CONTAINS
) specifies a search that
returns all users whose names contain the given string. Specifying this option
could result in degraded performance when used with directories containing
large numbers of groups or users.PRINCIPAL_SEARCH_TYPE_EXACT
) specifies a search that returns all users
whose names exactly match the given string. The string is escaped before being
sent to the Directory Service, which allows user names to contain characters
that would otherwise be treated as wildcards to be specified (ab?d, for instance).The searchedAttribute
parameter identifies the
User
object attribute to be included in the search criteria,
as follows:
PRINCIPAL_SEARCH_ATTR_NONE
) specifies that no
attribute is included in the search criteria.PRINCIPAL_SEARCH_ATTR_SHORT_NAME
) specifies that the
user's short name is to be included in the search criteria. PRINCIPAL_SEARCH_ATTR_DISPLAY_NAME
) specifies that the
user's display name is to be included in the search criteria. The sortType
parameter specifies how to sort the
User
objects in the returned collection,
as follows:
PRINCIPAL_SEARCH_SORT_NONE
) specifies that no
sorting is done; items are returned directly from the Directory Service.PRINCIPAL_SEARCH_SORT_ASCENDING
) specifies that
the returned items will be in ascending order.PRINCIPAL_SEARCH_SORT_DESCENDING
) specifies that the
returned items will be in descending order.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.
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.
Users
collection. The elements of the returned
collection represent the users in this realm that met the specified
search criteria.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:
PRINCIPAL_SEARCH_TYPE_NONE
) specifies that no attribute
is included in the search criteria.PRINCIPAL_SEARCH_TYPE_CUSTOM
) specifies a search in which the
provided search string will be passed directly to the Directory Service without
escaping special characters. This custom search type provides a calling
application the flexibility needed to place wildcards directly in the search string.
If you specify this value, you need to properly escape the search string for the
Directory Service (that is, replace '*', '(', ')', and '\' with '\2a',
'\28', '\29', and '\5c', respectively).PRINCIPAL_SEARCH_TYPE_PREFIX_MATCH
) specifies a search that
returns all groups whose names start with the given string.PRINCIPAL_SEARCH_TYPE_SUFFIX_MATCH
) specifies a search that
returns all groups whose names end with the given string. Specifying this option
could result in degraded performance when used with directories containing
large numbers of groups or users.PRINCIPAL_SEARCH_TYPE_CONTAINS
) specifies a search that
returns all groups whose names contain the given string. Specifying this option
could result in degraded performance when used with directories containing
large numbers of groups or users.PRINCIPAL_SEARCH_TYPE_EXACT
) specifies a search that returns all groups
whose names exactly match the given string. The string is escaped before being
sent to the Directory Service, which allows group names to contain characters
that would otherwise be treated as wildcards to be specified (ab?d, for instance).The searchedAttribute
parameter identifies the
Group
object attribute to be included in the search criteria,
as follows:
PRINCIPAL_SEARCH_ATTR_NONE
) specifies that no
attribute is included in the search criteria.PRINCIPAL_SEARCH_ATTR_SHORT_NAME
) specifies that the
group's short name is to be included in the search criteria. PRINCIPAL_SEARCH_ATTR_DISPLAY_NAME
) specifies that the
group's display name is to be included in the search criteria.The sortType
parameter specifies how to sort the
Group
objects in the returned collection,
as follows:
PRINCIPAL_SEARCH_SORT_NONE
) specifies that no
sorting is done; items are returned directly from the Directory Service.PRINCIPAL_SEARCH_SORT_ASCENDING
) specifies that
the returned items will be in ascending order.PRINCIPAL_SEARCH_SORT_DESCENDING
) specifies that the
returned items will be in descending order.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.
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.
Groups
collection. The elements of the returned
collection represent the groups in this Realm that met the specified
search criteria.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:
PRINCIPAL_SEARCH_TYPE_NONE
) specifies that no attribute
is included in the search criteria.PRINCIPAL_SEARCH_TYPE_CUSTOM
) specifies a search in which the
provided search string will be passed directly to the Directory Service without
escaping special characters. This custom search type provides a calling
application the flexibility needed to place wildcards directly in the search string.
If you specify this value, you need to properly escape the search string for the
Directory Service (that is, replace '*', '(', ')', and '\' with '\2a',
'\28', '\29', and '\5c', respectively).PRINCIPAL_SEARCH_TYPE_PREFIX_MATCH
) specifies a search that
returns all users whose names start with the given string.PRINCIPAL_SEARCH_TYPE_SUFFIX_MATCH
) specifies a search that
returns all users whose names end with the given string. Specifying this option
could result in degraded performance when used with directories containing
large numbers of groups or users.PRINCIPAL_SEARCH_TYPE_CONTAINS
) specifies a search that
returns all users whose names contain the given string. Specifying this option
could result in degraded performance when used with directories containing
large numbers of groups or users.PRINCIPAL_SEARCH_TYPE_EXACT
) specifies a search that returns all users
whose names exactly match the given string. The string is escaped before being
sent to the Directory Service, which allows user names to contain characters
that would otherwise be treated as wildcards to be specified (ab?d, for instance).The searchedAttribute
parameter identifies the
User
object attribute to be included in the search criteria,
as follows:
PRINCIPAL_SEARCH_ATTR_NONE
) specifies that no
attribute is included in the search criteria.PRINCIPAL_SEARCH_ATTR_SHORT_NAME
) specifies that the
user's short name is to be included in the search criteria. PRINCIPAL_SEARCH_ATTR_DISPLAY_NAME
) specifies that the
user's display name is to be included in the search criteria. The sortType
parameter specifies how to sort the
User
objects in the returned collection,
as follows:
PRINCIPAL_SEARCH_SORT_NONE
) specifies that no
sorting is done; items are returned directly from the Directory Service.PRINCIPAL_SEARCH_SORT_ASCENDING
) specifies that
the returned items will be in ascending order.PRINCIPAL_SEARCH_SORT_DESCENDING
) specifies that the
returned items will be in descending order.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.
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.
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:
PRINCIPAL_SEARCH_TYPE_NONE
) specifies that no attribute
is included in the search criteria.PRINCIPAL_SEARCH_TYPE_CUSTOM
) specifies a search in which the
provided search string will be passed directly to the Directory Service without
escaping special characters. This custom search type provides a calling
application the flexibility needed to place wildcards directly in the search string.
If you specify this value, you need to properly escape the search string for the
Directory Service (that is, replace '*', '(', ')', and '\' with '\2a',
'\28', '\29', and '\5c', respectively).PRINCIPAL_SEARCH_TYPE_PREFIX_MATCH
) specifies a search that
returns all groups whose names start with the given string.PRINCIPAL_SEARCH_TYPE_SUFFIX_MATCH
) specifies a search that
returns all groups whose names end with the given string. Specifying this option
could result in degraded performance when used with directories containing
large numbers of groups or users.PRINCIPAL_SEARCH_TYPE_CONTAINS
) specifies a search that
returns all groups whose names contain the given string. Specifying this option
could result in degraded performance when used with directories containing
large numbers of groups or users.PRINCIPAL_SEARCH_TYPE_EXACT
) specifies a search that returns all groups
whose names exactly match the given string. The string is escaped before being
sent to the Directory Service, which allows group names to contain characters
that would otherwise be treated as wildcards to be specified (ab?d, for instance).The searchedAttribute
parameter identifies the
Group
object attribute to be included in the search criteria,
as follows:
PRINCIPAL_SEARCH_ATTR_NONE
) specifies that no
attribute is included in the search criteria.PRINCIPAL_SEARCH_ATTR_SHORT_NAME
) specifies that the
group's short name is to be included in the search criteria. PRINCIPAL_SEARCH_ATTR_DISPLAY_NAME
) specifies that the
group's display name is to be included in the search criteria. The sortType
parameter specifies how to sort the
Group
objects in the returned collection,
as follows:
PRINCIPAL_SEARCH_SORT_NONE
) specifies that no
sorting is done; items are returned directly from the Directory Service.PRINCIPAL_SEARCH_SORT_ASCENDING
) specifies that
the returned items will be in ascending order.PRINCIPAL_SEARCH_SORT_DESCENDING
) specifies that the
returned items will be in descending order.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.
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.
|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |