|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents the store of the security identities associated information. It allows to associate properties to the identities. Stored identities are identified using the java.lang.String instance.
Field Summary | |
static int |
DELETE_USER_ACTION
Delete user action (notification event type) |
static java.lang.String |
FILTER_STRING
This string can be put into the map for filtering of results. |
static java.lang.String |
IMAGE_PROPERTY
Image property. |
static java.lang.String |
PASSWORD_PROPERTY
Password property key. |
static java.lang.String |
X509CERTIFICATE_PROPERTY
X.509 Certificate property key. |
static java.lang.String |
X509CERTIFICATECHAIN_PROPERTY
X.509 Certificate chain property key. |
Method Summary | |
void |
addNotificationListener(NotificationListener listener)
Register a listener for the NotificationEvent events. |
void |
deleteUser(java.lang.String userId)
Deletes user with given name from user store. |
PropertySerializer |
getPropertySerializer(java.lang.String propertyKey)
Returns the PropertySerializer associated with the given key. |
java.util.Iterator |
getSupportedAttributes()
Gets supported attributes for users. |
java.lang.String[] |
getUserIds()
Returns string array containing all user identifiers, typically user names. |
java.util.Map |
getUserProperties(java.lang.String userId)
Returns map of properties associated with given user. |
java.lang.Object |
getUserProperty(java.lang.String userId,
java.lang.String key)
Returns value of particular user property. |
UserIterator |
getUsers()
Returns iterator over all user entries. |
UserIterator |
getUsers(java.util.Map filter)
Returns iterator over users entries that match given filter. |
boolean |
hasUser(java.lang.String userId,
java.util.Map filter)
Determines whether user with given name and properties is present in the user store or not. |
void |
removeNotificationListener(NotificationListener listener)
Remove a listener for the NotificationEvent events. |
void |
removeUserProperty(java.lang.String userId,
java.lang.String key)
Removes user's property. |
void |
setPropertySerializer(java.lang.String propertyKey,
PropertySerializer serializer)
Registers the propertySerializer associated with the propertyKey. |
void |
setUserProperties(java.lang.String userId,
java.util.Map properties)
Sets properties to given user. |
void |
setUserProperty(java.lang.String userId,
java.lang.String key,
java.lang.Object value)
Sets particular property to given user. |
void |
setUserStoreSource(UserStoreSource source)
Set the UserStoreSource associated with this object. |
Field Detail |
public static final java.lang.String PASSWORD_PROPERTY
public static final java.lang.String X509CERTIFICATE_PROPERTY
java.security.cert.X509Certificate
.
public static final java.lang.String X509CERTIFICATECHAIN_PROPERTY
java.security.cert.X509Certificate[]
.
public static final java.lang.String FILTER_STRING
you can put the property into the first parameter
,
Constant Field Valuespublic static final java.lang.String IMAGE_PROPERTY
public static final int DELETE_USER_ACTION
Method Detail |
public void deleteUser(java.lang.String userId) throws UserStoreException
userId
- name of the user
UserStoreException
- when the user entry is not found or it cannot be removedpublic boolean hasUser(java.lang.String userId, java.util.Map filter)
The property can be either requested to be present, in which case the
map should contain only the property key and the associated value must
be set to null
or it can be requested that particular
property must have certain value, in which case both key and value in
the properties map must be set to non-null values.
userId
- name of the userfilter
- set of properties the user must possess
true
is a entry entry exist with matched properties,
false
otherwisePASSWORD_PROPERTY
,
X509CERTIFICATE_PROPERTY
,
X509CERTIFICATECHAIN_PROPERTY
public java.util.Map getUserProperties(java.lang.String userId) throws UserStoreException
userId
- name of the user
UserStoreException
- when user cannot be foundPASSWORD_PROPERTY
,
X509CERTIFICATE_PROPERTY
,
X509CERTIFICATECHAIN_PROPERTY
public java.lang.Object getUserProperty(java.lang.String userId, java.lang.String key) throws UserStoreException
userId
- name of the userkey
- key of the property to be returned
null
when this property has not been set for given user
UserStoreException
- when user cannot be foundPASSWORD_PROPERTY
,
X509CERTIFICATE_PROPERTY
,
X509CERTIFICATECHAIN_PROPERTY
public void removeUserProperty(java.lang.String userId, java.lang.String key) throws UserStoreException
userId
- name of the userkey
- key of the property to be removed
UserStoreException
- user cannot be foundPASSWORD_PROPERTY
,
X509CERTIFICATE_PROPERTY
,
X509CERTIFICATECHAIN_PROPERTY
public void setUserProperties(java.lang.String userId, java.util.Map properties) throws UserStoreException
userId
- name of the userproperties
- map of properties to be associated with user
UserStoreException
- properties cannot be setPASSWORD_PROPERTY
,
X509CERTIFICATE_PROPERTY
,
X509CERTIFICATECHAIN_PROPERTY
public void setUserProperty(java.lang.String userId, java.lang.String key, java.lang.Object value) throws UserStoreException
userId
- name of the userkey
- key of the property which value is to be setvalue
- value of the property to be set
UserStoreException
- property cannot be setPASSWORD_PROPERTY
,
X509CERTIFICATE_PROPERTY
,
X509CERTIFICATECHAIN_PROPERTY
public UserIterator getUsers()
public UserIterator getUsers(java.util.Map filter)
Given filter contains properties. The property can be either
requested to be present, in which case the
map should contain only the property key and the associated
value must be set to null
, or it can be requested
that particular property must have certain value, in which case
both key and value in the properties map must be set to non-null
values. The FILTER_STRING
property
can be set to filter results according to user identifiers.
filter
- the filter for user entries to be returned
PASSWORD_PROPERTY
,
X509CERTIFICATE_PROPERTY
,
X509CERTIFICATECHAIN_PROPERTY
public java.lang.String[] getUserIds()
public void setUserStoreSource(UserStoreSource source)
source
- the UserStoreSource associated with this object.public void setPropertySerializer(java.lang.String propertyKey, PropertySerializer serializer) throws UserStoreException
propertyKey
- a key associated with the serializerserializer
- a serializer associated with the key
UserStoreException
- serializer is already registeredpublic PropertySerializer getPropertySerializer(java.lang.String propertyKey) throws UserStoreException
propertyKey
- propertySerializer key
UserStoreException
- thrown when propertySerializer doesn't exist.public java.util.Iterator getSupportedAttributes()
public void addNotificationListener(NotificationListener listener)
listener
- notification listener to registerNotificationEvent
public void removeNotificationListener(NotificationListener listener)
listener
- notification listener to deregisterNotificationEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |