public interface IPrincipalSearchFilter
IPrincipalFactory.getPrincipalSearchFilter(boolean,String)
.
Note: For consistency reasons no leading or trailing spaces are allowed in namespaces, attribute names and String values.
Modifier and Type | Field and Description |
---|---|
static String |
CHECK_ACCESS
Deprecated.
|
static String |
EXTENDED_SEARCH
Deprecated.
|
static String |
HIDE_UME_ROLES
Transient search attribute used to hide UME roles during a role search.
|
static int |
SEARCHMETHOD_AND
Constant used to define the search operation.
|
static int |
SEARCHMETHOD_OR
Constant used to define the search operation.
|
static String |
TRANSIENT_SEARCH_NAMESPACE
Constant used to define namespace used for attributes you can not search
for but used to specify specific search flags.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all search attributes, namespaces and values.
|
String |
getDisplayName()
Gets the display name to match.
|
com.sap.security.api.persistence.ISearchElement |
getElementAt(int i)
Deprecated.
use
getSearchElementAt(int) instead |
int |
getElementSize()
Get the number of elements to search
|
int |
getMaxSearchResultSize()
Gets the max size of the search result
|
String[] |
getSearchAttributeNames(String namespace)
Get the attribute names of the set search attributes
|
String[] |
getSearchAttributes(String namespace,
String attributeName)
Get the values to match the search for the given namespace and attribute
|
ISearchAttribute |
getSearchElementAt(int i)
Get the ISearchAttribute at a specific position in the list of search
elements.
|
int |
getSearchMethod()
Get the used search method.
|
String[] |
getSearchNamespaces()
Get the namespaces of the set search attributes
|
int |
getSearchOperator(String namespace,
String attributeName,
Object attribute)
Get the search operator of a specific criteria
ISearchAttribute |
String |
getSearchPrincipalType()
Get the type of the principals to search. e.g.
|
boolean |
isEmpty()
Tests if this search filter has no components.
|
void |
setDirectChild(String principalID,
int mode,
boolean caseSensitive)
Set the id of a direct child to match in the principal search.
|
void |
setDisplayName(String displayname,
int mode,
boolean caseSensitive)
Set the displayname attribute value to match in the principal search.
|
void |
setMaxSearchResultSize(int resultsize)
Set the maxium size of the search result.
|
void |
setSearchAttribute(String namespace,
String attribute,
String value,
int mode,
boolean caseSensitive)
Set the value of a attribute to match in the principal search.
|
void |
setSearchMethod(int searchMethod)
Set the search method.
|
static final int SEARCHMETHOD_AND
static final int SEARCHMETHOD_OR
static final String TRANSIENT_SEARCH_NAMESPACE
static final String EXTENDED_SEARCH
static final String CHECK_ACCESS
static final String HIDE_UME_ROLES
void setSearchMethod(int searchMethod)
searchMethod
- The search methodvoid setDirectChild(String principalID, int mode, boolean caseSensitive)
principalID
- The unique id of the direct childmode
- Use constants defined in
ISearchAttribute
caseSensitive
- The case sensitivityvoid setSearchAttribute(String namespace, String attribute, String value, int mode, boolean caseSensitive)
namespace
- The namespace of the attributeattribute
- The name of the attributevalue
- The value to matchmode
- Use constants defined in
ISearchAttribute
caseSensitive
- The case sensitivityString getSearchPrincipalType()
String[] getSearchNamespaces()
String[] getSearchAttributeNames(String namespace)
namespace
- The namespace of the attributesString[] getSearchAttributes(String namespace, String attributeName)
namespace
- The namespace of the attributeattributeName
- The attribute's nameint getSearchOperator(String namespace, String attributeName, Object attribute)
ISearchAttribute
namespace
- The namespace of the attributeattributeName
- The attribute's nameattribute
- The value to match in the searchISearchAttribute
int getSearchMethod()
void clear()
boolean isEmpty()
true
if and only if this search filter has no search
criteria specified, that is, the search filter is in its initial
state; false
otherwiseint getElementSize()
com.sap.security.api.persistence.ISearchElement getElementAt(int i)
getSearchElementAt(int)
insteadi
- The index of the element in the listISearchAttribute getSearchElementAt(int i)
i
- The index of the element in the listString getDisplayName()
void setDisplayName(String displayname, int mode, boolean caseSensitive)
Note: This method can only be used, if no other search attributes are set yet and vice versa.
When using the filter for searching users (@link com.sap.security.api.IUserSearchFilter) with operator ISearchAttribute.EQUALS_OPERATOR
, UME will try to extract attributes' values
from the searched value based on UME property ume.users.displayname_template. If the attributes and their values are successfully
determined, the search is executed based on these values. For other operators or if the attributes' values cannot be determined, the UME will search for users with attributes retrieved
from the property and display name and unique name with value the searched string.
For example:
ume.users.displayname_template={lastname}, {firstname}
and searched string
"Smith, John", operator is ISearchAttribute.EQUALS_OPERATOR
UME will search for user with
firstname=John
lastname=Smith
If the searched string is "SmithJohn" the UME will search users with
firstname=SmithJohn
or
lastname=SmithJohn
or
displayname=SmithJohn
or
uniquename=SmithJohn
or
j_user=SmithJohn (from the account of the user)
If you would like to search users only by "displayname" attribute (just searching datasource by "displayname" attribute), use
setSearchAttribute(String, String, String, int, boolean)
displayname
- The value which is searched in the displayname field
of principalsmode
- The search mode ISearchAttribute
caseSensitive
- Set case sensitivityvoid setMaxSearchResultSize(int resultsize)
Note: This method can only be used, if only one search attribute is specified
resultsize
- The value which is used to limit the search result.int getMaxSearchResultSize()
Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] CORE-TOOLS
|
[sap.com]
|
default
|
BC-JAS
|
[sap.com] ENGFACADE
|
[sap.com] tc/je/usermanagement/api
|
api
|
BC-JAS-SEC
|
[sap.com] ENGINEAPI
|
[sap.com]
|
-
|
BC-JAS-SEC-UME
|
[sap.com] ENGINEAPI
|
[sap.com]
|
default
|
BC-JAS-SEC-UME
|
Copyright 2018 SAP AG Complete Copyright Notice