Class FedletDataStoreProvider
- java.lang.Object
-
- com.sun.identity.plugin.datastore.impl.FedletDataStoreProvider
-
- All Implemented Interfaces:
DataStoreProvider
public class FedletDataStoreProvider extends Object implements DataStoreProvider
TheFedletDataStoreProvideris an implementation ofDataStoreProviderfor Fedlet deployment. The implemetation performs no operation on those methods.- See Also:
DataStoreProvider
-
-
Constructor Summary
Constructors Constructor Description FedletDataStoreProvider()Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getAttribute(String userID, String attrName)Returns values for a given attribute.Map<String,Set<String>>getAttributes(String userID, Set<String> attrNames)Returns attribute values for a user.byte[][]getBinaryAttribute(String userID, String attrName)Returns values for a given attribute.Map<String,byte[][]>getBinaryAttributes(String userID, Set<String> attrNames)Returns attribute values for a user.StringgetUserID(String orgDN, Map<String,Set<String>> avPairs)Returns user matching the search criteria.voidinit(String componentName)Initializes the provider.booleanisUserExists(String userID)Checks if a given user exists.voidsetAttributes(String userID, Map<String,Set<String>> attrMap)Sets attributes for a user.
-
-
-
Method Detail
-
init
public void init(String componentName) throws DataStoreProviderException
Initializes the provider.- Specified by:
initin interfaceDataStoreProvider- Parameters:
componentName- name of the component.- Throws:
DataStoreProviderException- if an error occurred during initialization.
-
getAttribute
public Set<String> getAttribute(String userID, String attrName) throws DataStoreProviderException
Returns values for a given attribute.- Specified by:
getAttributein interfaceDataStoreProvider- Parameters:
userID- Universal identifier of the user.attrName- Name of the attribute whose value to be retrieved.- Returns:
- Set of the values for the attribute.
- Throws:
DataStoreProviderException- if unable to retrieve the attribute.
-
getAttributes
public Map<String,Set<String>> getAttributes(String userID, Set<String> attrNames) throws DataStoreProviderException
Returns attribute values for a user.- Specified by:
getAttributesin interfaceDataStoreProvider- Parameters:
userID- Universal identifier of the user.attrNames- Set of attributes whose values are to be retrieved.- Returns:
- Map containing attribute key/value pair, key is the attribute name, value is a Set of values.
- Throws:
DataStoreProviderException- if unable to retrieve the values.
-
getBinaryAttribute
public byte[][] getBinaryAttribute(String userID, String attrName) throws DataStoreProviderException
Returns values for a given attribute.- Specified by:
getBinaryAttributein interfaceDataStoreProvider- Parameters:
userID- Universal identifier of the user.attrName- Name of the attribute whose value to be retrieved.- Returns:
- Set of the values for the attribute.
- Throws:
DataStoreProviderException- if unable to retrieve the attribute.
-
getBinaryAttributes
public Map<String,byte[][]> getBinaryAttributes(String userID, Set<String> attrNames) throws DataStoreProviderException
Returns attribute values for a user.- Specified by:
getBinaryAttributesin interfaceDataStoreProvider- Parameters:
userID- Universal identifier of the user.attrNames- Set of attributes whose values are to be retrieved.- Returns:
- Map containing attribute key/value pair, key is the attribute name, value is a Set of values.
- Throws:
DataStoreProviderException- if unable to retrieve the values.
-
setAttributes
public void setAttributes(String userID, Map<String,Set<String>> attrMap) throws DataStoreProviderException
Sets attributes for a user.- Specified by:
setAttributesin interfaceDataStoreProvider- Parameters:
userID- Universal identifier of the user.attrMap- Map of attributes to be set, key is the attribute name and value is a Set containing the attribute values.- Throws:
DataStoreProviderException- if unable to set values.
-
getUserID
public String getUserID(String orgDN, Map<String,Set<String>> avPairs) throws DataStoreProviderException
Returns user matching the search criteria.- Specified by:
getUserIDin interfaceDataStoreProvider- Parameters:
orgDN- The realm to search the user. If null, searches the root realm.avPairs- Attribute key/value pairs that will be used for searching the user. Key is the attribute name, value is a Set containing attribute value(s).- Returns:
- Universal identifier of the matching user, null if the matching user could not be found.
- Throws:
DataStoreProviderException- if error occurs during search or multiple matching users found.
-
isUserExists
public boolean isUserExists(String userID) throws DataStoreProviderException
Checks if a given user exists.- Specified by:
isUserExistsin interfaceDataStoreProvider- Parameters:
userID- Universal identifier of the user to be checked.- Returns:
trueif the user exists.- Throws:
DataStoreProviderException- if an error occurred.
-
-