org.wso2.registry.users.def
Class DefaultUserStoreReader

java.lang.Object
  extended by org.wso2.registry.users.def.DefaultUserStoreReader
All Implemented Interfaces:
UserStoreReader
Direct Known Subclasses:
DefaultUserStoreAdmin

public class DefaultUserStoreReader
extends java.lang.Object
implements UserStoreReader

Manipulates data in the User Store

See Also:
org.wso2.usermanager.UserStoreReader

Field Summary
protected  javax.sql.DataSource dataSource
           
 
Constructor Summary
DefaultUserStoreReader(javax.sql.DataSource dataSource)
           
 
Method Summary
 java.lang.String[] getAllRoleNames()
          Retrieves all role names
 java.lang.String[] getAllUserNames()
          Retrieves all user names
 java.util.Map getRoleProperties(java.lang.String roleName)
          Retrieves role properties given the role name
 java.lang.String[] getUserNamesWithPropertyValue(java.lang.String propertyName, java.lang.String propetyValue)
          If propertyName is null then the value is searched If propertyName contains % then a likenss querry is searched
 java.util.Map getUserProperties(java.lang.String userName)
          Retrieves user properties given the user name
 java.lang.String[] getUserPropertyNames()
          Retrieves user properties given the user name
 java.lang.String[] getUserRoles(java.lang.String userName)
          Gets all user roles
 java.lang.String[] getUsersInRole(java.lang.String roleName)
          Retrieves users in a role
 boolean isExistingRole(java.lang.String roleName)
          Checks whether a role exist in the user store
 boolean isExistingUser(java.lang.String userName)
          Checks whether an user exist in the user store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataSource

protected javax.sql.DataSource dataSource
Constructor Detail

DefaultUserStoreReader

public DefaultUserStoreReader(javax.sql.DataSource dataSource)
Method Detail

getAllRoleNames

public java.lang.String[] getAllRoleNames()
                                   throws UserStoreException
Description copied from interface: UserStoreReader
Retrieves all role names

Specified by:
getAllRoleNames in interface UserStoreReader
Throws:
UserStoreException

getAllUserNames

public java.lang.String[] getAllUserNames()
                                   throws UserStoreException
Description copied from interface: UserStoreReader
Retrieves all user names

Specified by:
getAllUserNames in interface UserStoreReader
Throws:
UserStoreException

getRoleProperties

public java.util.Map getRoleProperties(java.lang.String roleName)
                                throws UserStoreException
Description copied from interface: UserStoreReader
Retrieves role properties given the role name

Specified by:
getRoleProperties in interface UserStoreReader
Throws:
UserStoreException

getUserProperties

public java.util.Map getUserProperties(java.lang.String userName)
                                throws UserStoreException
Description copied from interface: UserStoreReader
Retrieves user properties given the user name

Specified by:
getUserProperties in interface UserStoreReader
Throws:
UserStoreException

getUserPropertyNames

public java.lang.String[] getUserPropertyNames()
                                        throws UserStoreException
Description copied from interface: UserStoreReader
Retrieves user properties given the user name

Specified by:
getUserPropertyNames in interface UserStoreReader
Throws:
UserStoreException

getUserRoles

public java.lang.String[] getUserRoles(java.lang.String userName)
                                throws UserStoreException
Description copied from interface: UserStoreReader
Gets all user roles

Specified by:
getUserRoles in interface UserStoreReader
Throws:
UserStoreException

isExistingUser

public boolean isExistingUser(java.lang.String userName)
                       throws UserStoreException
Description copied from interface: UserStoreReader
Checks whether an user exist in the user store

Specified by:
isExistingUser in interface UserStoreReader
Parameters:
userName - TODO
Throws:
UserStoreException

isExistingRole

public boolean isExistingRole(java.lang.String roleName)
                       throws UserStoreException
Description copied from interface: UserStoreReader
Checks whether a role exist in the user store

Specified by:
isExistingRole in interface UserStoreReader
Parameters:
roleName - RoleName
Throws:
UserStoreException

getUserNamesWithPropertyValue

public java.lang.String[] getUserNamesWithPropertyValue(java.lang.String propertyName,
                                                        java.lang.String propetyValue)
                                                 throws UserStoreException
If propertyName is null then the value is searched If propertyName contains % then a likenss querry is searched

Specified by:
getUserNamesWithPropertyValue in interface UserStoreReader
Throws:
UserStoreException

getUsersInRole

public java.lang.String[] getUsersInRole(java.lang.String roleName)
                                  throws UserStoreException
Description copied from interface: UserStoreReader
Retrieves users in a role

Specified by:
getUsersInRole in interface UserStoreReader
Throws:
UserStoreException


Copyright © 2007 Apache Web Services Project. All Rights Reserved.