|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.idoox.security.pstore.AbstractUserStore
org.systinet.wasp.admin.security.UserStoreProxy
This class acts as a UserStore instance over PStoreService interface. This proxy almost implements UserStore interface.
Nested Class Summary | |
protected class |
UserStoreProxy.UserIteratorImpl
|
Field Summary |
Fields inherited from class org.idoox.security.pstore.AbstractUserStore |
listeners |
Fields inherited from interface org.idoox.security.pstore.UserStore |
DELETE_USER_ACTION, FILTER_STRING, IMAGE_PROPERTY, PASSWORD_PROPERTY, X509CERTIFICATE_PROPERTY, X509CERTIFICATECHAIN_PROPERTY |
Constructor Summary | |
UserStoreProxy(PStoreService service)
Consturects proxy above secure service. |
Method Summary | |
void |
deleteUser(java.lang.String userId)
Removes user with given name from the user store. |
PropertySerializer |
getPropertySerializer(java.lang.String propertyKey)
Returns the PropertySerializer associated with the given key. WARNING: This function is not remote - it gets PropertySerializer locally! |
protected java.util.HashSet |
getSupported()
Returns set of supported property types |
java.util.Iterator |
getSupportedAttributes()
Gets supported attributes for the user on both side (caller side and called server side). |
java.lang.String[] |
getUserIds()
Returns string array containing all user ids from this user store. |
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 property associated with given user. |
UserIterator |
getUsers()
Returns iterator containing all users from this user store. |
UserIterator |
getUsers(java.util.Map filter)
Returns iterator containing users which correspond to a given filter. |
protected UserStore |
getUserStore()
Returns UserStore instance |
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 |
removeUserProperty(java.lang.String userId,
java.lang.String key)
Removes user associated property with given key. |
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)
Associated given user with a new map of properties. |
void |
setUserProperties(java.lang.String userId,
UserProperty[] properties)
Associated given user with a new array of property objects. |
void |
setUserProperty(java.lang.String userId,
java.lang.String key,
java.lang.Object value)
Sets particular property value for given user. |
void |
setUserStoreSource(UserStoreSource source)
Set the UserStoreSource associated with this object. |
Methods inherited from class org.idoox.security.pstore.AbstractUserStore |
addNotificationListener, destroy, fireDeleteUserAction, match, removeNotificationListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UserStoreProxy(PStoreService service)
service
- SecureService InterfaceMethod Detail |
protected UserStore getUserStore()
protected java.util.HashSet getSupported()
public void deleteUser(java.lang.String userId) throws UserStoreException
userId
- name of the user to be removed
UserStoreException
- when the user is not found or cannot be
removedpublic java.util.Map getUserProperties(java.lang.String userId) throws UserStoreException
userId
- name of the user
UserStoreException
- when user cannot be foundUserStore.PASSWORD_PROPERTY
,
UserStore.X509CERTIFICATE_PROPERTY
,
UserStore.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 foundUserStore.PASSWORD_PROPERTY
,
UserStore.X509CERTIFICATE_PROPERTY
,
UserStore.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
- when user cannot be foundUserStore.PASSWORD_PROPERTY
,
UserStore.X509CERTIFICATE_PROPERTY
,
UserStore.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
- the properties
cannot be set ( cannot save to the db)UserStore.PASSWORD_PROPERTY
,
UserStore.X509CERTIFICATE_PROPERTY
,
UserStore.X509CERTIFICATECHAIN_PROPERTY
public void setUserProperties(java.lang.String userId, UserProperty[] properties) throws UserStoreException
userId
- name of the userproperties
- array of property objects to be associated with user
UserStoreException
- the properties
cannot be set ( cannot save to the db)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
- if user cannot be found or the property
value cannot be setUserStore.PASSWORD_PROPERTY
,
UserStore.X509CERTIFICATE_PROPERTY
,
UserStore.X509CERTIFICATECHAIN_PROPERTY
public UserIterator getUsers()
public java.lang.String[] getUserIds()
public java.util.Iterator getSupportedAttributes()
public PropertySerializer getPropertySerializer(java.lang.String propertyKey) throws UserStoreException
propertyKey
- the key to retrieve propertySerializer
UserStoreException
- thrown when propertySerializer doesn't exist.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
- Exceptionpublic 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
UserStore.PASSWORD_PROPERTY
,
UserStore.X509CERTIFICATE_PROPERTY
,
UserStore.X509CERTIFICATECHAIN_PROPERTY
public UserIterator getUsers(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.
filter
- the filter for users to be returned
UserStore.PASSWORD_PROPERTY
,
UserStore.X509CERTIFICATE_PROPERTY
,
UserStore.X509CERTIFICATECHAIN_PROPERTY
public void setUserStoreSource(UserStoreSource source)
source
- the UserStoreSource associated with this object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |