Skip navigation links

Oracle Fusion Middleware User and Role Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14658-01


oracle.security.idm
Interface IdentityStore


public interface IdentityStore

IdentityStore represents a handle to actual identity repository. This handle can be used to search/create/drop/modify identities in the repository.

Since:
10.1.3

Field Summary
static int SEARCH_BY_GUID
          search type to specify that identities should be searched by GUID of the Identity.
static int SEARCH_BY_NAME
          search type to specify that identities should be searched by name.
static int SEARCH_BY_UNIQUE_NAME
          search type to specify that identities should be searched by unique name.

 

Method Summary
 void close()
          Closes this IdentityStore instance and free any resources associated with it.
 boolean exists(Role role)
          Determines whether the given role exists in the identity repository.
 boolean exists(User user)
          Determines whether the given user exists in the identity repository.
 ComplexSearchFilter getComplexSearchFilter(SearchFilter[] sfarr, int oper_type)
          Returns ComplexSearchFilter instance.
 java.util.List getMandatoryUserPropertyNames()
          Gets the list of mandatory user property names as supported by the underlying repository.
 RoleManager getRoleManager()
          Get the role manager for managing roles.
 java.util.List getSearchableAttributes()
          Determines all the attributes in identity respsitory that are searchable.
 SimpleSearchFilter getSimpleSearchFilter(java.lang.String attrname, int type, java.lang.Object value)
          Returns SimpleSearchFilter instance.
 StoreConfiguration getStoreConfiguration()
          Retrieves the StoreConfiguration instance associated with this IdentityStore instance.
 SubjectParser getSubjectParser()
          Returns SubjectParser instance.
 UserManager getUserManager()
          Get the user manager for managing users.
 java.util.List getUserPropertyNames()
          Gets the list of user property names as supported by the underlying repository.
 SearchResponse search(SearchParameters params)
          Search for users/roles.
 SearchResponse searchProfiles(SearchParameters params)
          Search for user/role profiles.
 Role searchRole(int searchType, java.lang.String value)
          Search for role with specified value
 SearchResponse searchRoles(int scope, SearchParameters params)
          Search for roles within specified role scope.
 User searchUser(int searchType, java.lang.String value)
          Search for user with specified value
 User searchUser(java.security.Principal principal)
          Search the user corresponding to given user principal object
 User searchUser(java.lang.String name)
          Search for user with specified name
 SearchResponse searchUsers(SearchParameters params)
          Search for users.

 

Field Detail

SEARCH_BY_NAME

static final int SEARCH_BY_NAME
search type to specify that identities should be searched by name. See searchUser(int, String), searchRole(int, String)
See Also:
Constant Field Values

SEARCH_BY_UNIQUE_NAME

static final int SEARCH_BY_UNIQUE_NAME
search type to specify that identities should be searched by unique name. See searchUser(int, String), searchRole(int, String)
See Also:
Constant Field Values

SEARCH_BY_GUID

static final int SEARCH_BY_GUID
search type to specify that identities should be searched by GUID of the Identity. See searchUser(int, String), searchRole(int, String)
See Also:
Constant Field Values

Method Detail

getRoleManager

RoleManager getRoleManager()
                           throws IMException
Get the role manager for managing roles.
Returns:
RoleManager instance
Throws:
OperationNotSupportedException - Thrown by the service provider if it doesn't support role manager
IMException - Thrown by the service provider in case of any other problem.

getUserManager

UserManager getUserManager()
                           throws IMException
Get the user manager for managing users.
Returns:
UserManager instance
Throws:
OperationNotSupportedException - Thrown by the service provider if it doesn't support user manager
IMException - Thrown by the service provider in case of any other problem.

searchUsers

SearchResponse searchUsers(SearchParameters params)
                           throws IMException
Search for users.
Parameters:
params - search parameters
Returns:
SearchResponse instance containing the search results. Each search result will be instance of User class.
Throws:
ObjectNotFoundException - Thrown by the service provider if no users matched the search criterion.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.
See Also:
SearchParameters

searchUser

User searchUser(java.lang.String name)
                throws IMException
Search for user with specified name
Parameters:
name - name of the user
Returns:
User instance representing the user with specified name
Throws:
ObjectNotFoundException - Thrown by the service provider if the user does not exist.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

searchUser

User searchUser(int searchType,
                java.lang.String value)
                throws IMException
Search for user with specified value
Parameters:
searchType - search by criteria. Currently you can SEARCH_BY_NAME or SEARCH_BY_UNIQUE_NAME
value - search value depending upon the searchType selected above.
Returns:
User instance representing the user
Throws:
ObjectNotFoundException - Thrown by the service provider if the user does not exist.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

searchUser

User searchUser(java.security.Principal principal)
                throws IMException
Search the user corresponding to given user principal object
Parameters:
principal - principal object of user
Returns:
User instance corresponding to the user principal object
Throws:
ObjectNotFoundException - Thrown by the service provider if the user does not exist.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

search

SearchResponse search(SearchParameters params)
                      throws IMException
Search for users/roles.
Parameters:
params - search parameters
Returns:
SearchResponse instance containing the search results. Each search result will be instance of User or Role class.
Throws:
ObjectNotFoundException - Thrown by the service provider if no users/roles matched the search criterion.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.
See Also:
SearchParameters

searchProfiles

SearchResponse searchProfiles(SearchParameters params)
                              throws IMException
Search for user/role profiles.
Parameters:
params - search parameters
Returns:
SearchResponse instance containing the search results. Each search result will be instance of UserProfile/RoleProfile class.
Throws:
ObjectNotFoundException - Thrown by the service provider if no users/roles matched the search criterion.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.
See Also:
SearchParameters

searchRoles

SearchResponse searchRoles(int scope,
                           SearchParameters params)
                           throws IMException
Search for roles within specified role scope.
Parameters:
scope - role scope. See all the possbile scopes in Role
params - search parameters
Returns:
SearchResponse instance containing the search results. Each search result will be instance of Role class.
Throws:
ObjectNotFoundException - Thrown by the service provider if no roles matched the search criterion.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.
See Also:
SearchParameters, Role

searchRole

Role searchRole(int searchType,
                java.lang.String value)
                throws IMException
Search for role with specified value
Parameters:
searchType - search by criteria. Currently you can SEARCH_BY_NAME or SEARCH_BY_UNIQUE_NAME
value - search value depending upon the searchType selected above.
Returns:
User instance representing the user
Throws:
ObjectNotFoundException - Thrown by the service provider if the role does not exist.
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

getComplexSearchFilter

ComplexSearchFilter getComplexSearchFilter(SearchFilter[] sfarr,
                                           int oper_type)
Returns ComplexSearchFilter instance.
Parameters:
sfarr - Array of searchfilters which will constitue the complexfilter
oper_type - Logical operator type ComplexSearchFilter.TYPE_AND, ComplexSearchFilter.TYPE_OR.
Returns:
ComplexSearchFilter instance representing complex search filter.
Throws:
IMException - Thrown by the service provider in case of any problem.
See Also:
ComplexSearchFilter

getSimpleSearchFilter

SimpleSearchFilter getSimpleSearchFilter(java.lang.String attrname,
                                         int type,
                                         java.lang.Object value)
Returns SimpleSearchFilter instance.
Parameters:
attrname - name of the attribute to be filtered
type - evaluation operator. Defined in SimpleSearchFilter
value - value of the attribute
Returns:
SimpleSearchFilter instance representing simple search filter.
Throws:
IMException - Thrown by the service provider in case of any problem.
See Also:
SimpleSearchFilter

exists

boolean exists(User user)
               throws IMException
Determines whether the given user exists in the identity repository.
Parameters:
user - user whose existance is to be verified
Returns:
true if exists else false.
Throws:
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

exists

boolean exists(Role role)
               throws IMException
Determines whether the given role exists in the identity repository.
Parameters:
role - role whose existance is to be verified
Returns:
true if exists else false.
Throws:
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

getSearchableAttributes

java.util.List getSearchableAttributes()
                                       throws IMException
Determines all the attributes in identity respsitory that are searchable.
Returns:
List of attribute names.
Throws:
OperationNotSupportedException - Thrown by the service provider
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

getSubjectParser

SubjectParser getSubjectParser()
Returns SubjectParser instance.
Returns:
SubjectParser instance
Throws:
OperationNotSupportedException - Thrown by the service provider
OperationFailureException - Thrown in case of operation failure
IMException - Thrown by the service provider in case of any other problem.

getStoreConfiguration

StoreConfiguration getStoreConfiguration()
                                         throws IMException
Retrieves the StoreConfiguration instance associated with this IdentityStore instance. The returned instance can be used to change configuration of this IdentityStore instance and thus control its behaviour. However some service providers may not support store configuration at all and throw exception to this effect.
Returns:
StoreConfiguration store configuration object.
Throws:
OperationNotSupportedException - Thrown by the service provider
IMException - Thrown by the service provider in case of any problem.
See Also:
StoreConfiguration

getUserPropertyNames

java.util.List getUserPropertyNames()
                                    throws IMException
Gets the list of user property names as supported by the underlying repository.
Returns:
List of user properties. The property name would be a UserProfile property (ex. UserProfile.NAME, UserProfile.USER_NAME etc.) if the corresponding mapping is available in the provider. If no mapping is available then the property name would be same as the native name in the underlying repository.
Throws:
IMException - Thrown by the service provider in case of any problem.

getMandatoryUserPropertyNames

java.util.List getMandatoryUserPropertyNames()
                                             throws IMException
Gets the list of mandatory user property names as supported by the underlying repository.
Returns:
List of user mandatory properties. The property name would be a UserProfile property (ex. UserProfile.NAME, UserProfile.USER_NAME etc.) if the corresponding mapping is available in the provider. If no mapping is available then the property name would be same as the native name in the underlying repository.
Throws:
IMException - Thrown by the service provider in case of any problem.

close

void close()
           throws IMException
Closes this IdentityStore instance and free any resources associated with it.
After the close() call is completed this Store object becomes invalid and terminates its link to underlying identity repository. Any object(s) returned directly or indirectly by this Store(including users/roles) also become invalid. Any operation on such invalid objects may lead to undefined behaviour.
This method should be called only when application has no more need for accessing the underlying identity repository.
Throws:
IMException - Thrown by the service provider in case of any problem.

Skip navigation links

Oracle Fusion Middleware User and Role Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14658-01


Copyright © 2005, 2009, Oracle. All rights reserved.