org.wso2.carbon.integration.common.admin.client
Class UserManagementClient

java.lang.Object
  extended by org.wso2.carbon.integration.common.admin.client.UserManagementClient

public class UserManagementClient
extends Object


Constructor Summary
UserManagementClient(String backendURL, String sessionCookie)
           
UserManagementClient(String backendURL, String userName, String password)
           
 
Method Summary
 void addInternalRole(String roleName, String[] userList, String[] permissions)
           
 void addRemoveRolesOfUser(String userName, String[] newRoles, String[] deletedRoles)
           
 void addRemoveUsersOfRole(String roleName, String[] newUsers, String[] deletedUsers)
           
 void addRole(String roleName, String[] userList, String[] permissions)
           
 void addRole(String roleName, String[] userList, String[] permissions, boolean isSharedRole)
           
 void addUser(String userName, String password, String[] roles, String profileName)
           
 void bulkImportUsers(String filename, DataHandler handler, String defaultPassword)
           
 void changePassword(String userName, String newPassword)
           
 void changePasswordByUser(String oldPassword, String newPassword)
           
 void deleteRole(String roleName)
           
 void deleteUser(String userName)
           
 org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] getAllRolesNames(String filter, int limit)
           
 org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] getAllSharedRoleNames(String filter, int limit)
           
 org.wso2.carbon.user.mgt.stub.types.carbon.UIPermissionNode getAllUIPermissions()
           
 org.wso2.carbon.user.mgt.stub.types.carbon.UIPermissionNode getRolePermissions(String roleName)
           
 org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] getRolesOfCurrentUser()
           
 org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] getRolesOfUser(String userName, String filter, int limit)
           
 org.apache.axis2.client.Stub getServiceStub()
           
 HashSet<String> getUserList()
           
 org.wso2.carbon.user.mgt.stub.types.carbon.UserRealmInfo getUserRealmInfo()
           
 org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] getUsersOfRole(String roleName, String filter, int limit)
           
protected  void handleException(String msg, Exception e)
           
 Boolean hasMultipleUserStores()
           
 boolean isSharedRolesEnabled()
           
 org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] listAllUsers(String filter, int limit)
           
 org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] listRoles(String filter, int limit)
          Lists all roles caught by wither with in limit
 org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] listUserByClaim(org.wso2.carbon.user.mgt.stub.types.carbon.ClaimValue claimValue, String filter, int maxLimit)
           
 String[] listUsers(String filter, int limit)
          Lists all users with in filter and limit
 boolean roleNameExists(String roleName)
           
 void setRoleUIPermission(String roleName, String[] rawResources)
           
static org.wso2.carbon.user.mgt.stub.types.carbon.ClaimValue[] toADBClaimValues(org.wso2.carbon.user.mgt.stub.types.carbon.ClaimValue[] claimValues)
           
 void updateRoleName(String roleName, String newRoleName)
           
 void updateRolesOfUser(String userName, String[] newUserList)
           
 void updateUserListOfRole(String roleName, String[] addingUsers, String[] deletingUsers)
           
 void updateUsersOfRole(String roleName, org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] userList)
           
 boolean userNameExists(String roleName, String userName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserManagementClient

public UserManagementClient(String backendURL,
                            String sessionCookie)
                     throws org.apache.axis2.AxisFault
Throws:
org.apache.axis2.AxisFault

UserManagementClient

public UserManagementClient(String backendURL,
                            String userName,
                            String password)
                     throws org.apache.axis2.AxisFault
Throws:
org.apache.axis2.AxisFault
Method Detail

getServiceStub

public org.apache.axis2.client.Stub getServiceStub()

toADBClaimValues

public static org.wso2.carbon.user.mgt.stub.types.carbon.ClaimValue[] toADBClaimValues(org.wso2.carbon.user.mgt.stub.types.carbon.ClaimValue[] claimValues)

addRole

public void addRole(String roleName,
                    String[] userList,
                    String[] permissions)
             throws RemoteException,
                    org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

addRole

public void addRole(String roleName,
                    String[] userList,
                    String[] permissions,
                    boolean isSharedRole)
             throws RemoteException,
                    org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

addUser

public void addUser(String userName,
                    String password,
                    String[] roles,
                    String profileName)
             throws RemoteException,
                    org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

deleteRole

public void deleteRole(String roleName)
                throws RemoteException,
                       org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

deleteUser

public void deleteUser(String userName)
                throws RemoteException,
                       org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

handleException

protected void handleException(String msg,
                               Exception e)
                        throws Exception
Throws:
Exception

updateUserListOfRole

public void updateUserListOfRole(String roleName,
                                 String[] addingUsers,
                                 String[] deletingUsers)
                          throws Exception
Throws:
Exception

roleNameExists

public boolean roleNameExists(String roleName)
                       throws Exception
Throws:
Exception

listRoles

public org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] listRoles(String filter,
                                                                          int limit)
                                                                   throws Exception
Lists all roles caught by wither with in limit

Parameters:
filter -
limit -
Returns:
Throws:
Exception

listUsers

public String[] listUsers(String filter,
                          int limit)
                   throws Exception
Lists all users with in filter and limit

Parameters:
filter -
limit -
Returns:
FlaggedName[]
Throws:
Exception

listAllUsers

public org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] listAllUsers(String filter,
                                                                             int limit)
                                                                      throws RemoteException,
                                                                             org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

userNameExists

public boolean userNameExists(String roleName,
                              String userName)
                       throws Exception
Throws:
Exception

hasMultipleUserStores

public Boolean hasMultipleUserStores()
                              throws RemoteException,
                                     org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

addInternalRole

public void addInternalRole(String roleName,
                            String[] userList,
                            String[] permissions)
                     throws RemoteException,
                            org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

getAllRolesNames

public org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] getAllRolesNames(String filter,
                                                                                 int limit)
                                                                          throws RemoteException,
                                                                                 org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

addRemoveUsersOfRole

public void addRemoveUsersOfRole(String roleName,
                                 String[] newUsers,
                                 String[] deletedUsers)
                          throws RemoteException,
                                 org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

addRemoveRolesOfUser

public void addRemoveRolesOfUser(String userName,
                                 String[] newRoles,
                                 String[] deletedRoles)
                          throws RemoteException,
                                 org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

getUsersOfRole

public org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] getUsersOfRole(String roleName,
                                                                               String filter,
                                                                               int limit)
                                                                        throws RemoteException,
                                                                               org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

getRolesOfUser

public org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] getRolesOfUser(String userName,
                                                                               String filter,
                                                                               int limit)
                                                                        throws RemoteException,
                                                                               org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

updateUsersOfRole

public void updateUsersOfRole(String roleName,
                              org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] userList)
                       throws RemoteException,
                              org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

updateRolesOfUser

public void updateRolesOfUser(String userName,
                              String[] newUserList)
                       throws RemoteException,
                              org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

changePassword

public void changePassword(String userName,
                           String newPassword)
                    throws RemoteException,
                           org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

updateRoleName

public void updateRoleName(String roleName,
                           String newRoleName)
                    throws RemoteException,
                           org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

changePasswordByUser

public void changePasswordByUser(String oldPassword,
                                 String newPassword)
                          throws RemoteException,
                                 org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

getAllSharedRoleNames

public org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] getAllSharedRoleNames(String filter,
                                                                                      int limit)
                                                                               throws RemoteException,
                                                                                      org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

getAllUIPermissions

public org.wso2.carbon.user.mgt.stub.types.carbon.UIPermissionNode getAllUIPermissions()
                                                                                throws RemoteException,
                                                                                       org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

setRoleUIPermission

public void setRoleUIPermission(String roleName,
                                String[] rawResources)
                         throws RemoteException,
                                org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

getRolePermissions

public org.wso2.carbon.user.mgt.stub.types.carbon.UIPermissionNode getRolePermissions(String roleName)
                                                                               throws RemoteException,
                                                                                      org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

getRolesOfCurrentUser

public org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] getRolesOfCurrentUser()
                                                                               throws RemoteException,
                                                                                      org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

listUserByClaim

public org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName[] listUserByClaim(org.wso2.carbon.user.mgt.stub.types.carbon.ClaimValue claimValue,
                                                                                String filter,
                                                                                int maxLimit)
                                                                         throws RemoteException,
                                                                                org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

getUserRealmInfo

public org.wso2.carbon.user.mgt.stub.types.carbon.UserRealmInfo getUserRealmInfo()
                                                                          throws RemoteException,
                                                                                 org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

isSharedRolesEnabled

public boolean isSharedRolesEnabled()
                             throws RemoteException,
                                    org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

bulkImportUsers

public void bulkImportUsers(String filename,
                            DataHandler handler,
                            String defaultPassword)
                     throws RemoteException,
                            org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException

getUserList

public HashSet<String> getUserList()
                            throws RemoteException,
                                   org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException
Throws:
RemoteException
org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException


Copyright © 2015 WSO2. All rights reserved.