com.atlassian.confluence.rpc.soap.services
Class UsersSoapService

java.lang.Object
  extended by com.atlassian.confluence.rpc.soap.services.UsersSoapService

public class UsersSoapService
extends Object


Constructor Summary
UsersSoapService()
           
 
Method Summary
 boolean addGroup(String groupname)
          Adds the specified group.
 boolean addProfilePicture(String userName, String fileName, String mimeType, byte[] pictureData)
          Add a profile picture to a user's profile
 boolean addUser(RemoteUser user, String password)
          Adds user.
 boolean addUserToGroup(String username, String groupname)
          Add user to the specified group.
 boolean changeMyPassword(String oldPass, String newPass)
          Changes your password.
 boolean changeUserPassword(String username, String newPass)
          Changes the user's password.
 boolean deactivateUser(String username)
          Deactivates the specified user.
 boolean editUser(RemoteUser remoteUser)
          Allows the email and the fullname of a user to be edited by specifying these values in the passed in RemoteUser.
 String[] getActiveUsers(boolean viewAll)
           
 String[] getGroups()
          Returns all groups.
 PersonalInformationManager getPersonalInformationManager()
           
 RemoteUser getUser(String username)
           
 String[] getUserGroups(String username)
          Fetches the groups that the specified user belongs to.
 RemoteUserInformation getUserInformation(String username)
           
 boolean getUserPreferenceBoolean(String username, String key)
           
 long getUserPreferenceLong(String username, String key)
           
 String getUserPreferenceString(String username, String key)
           
 boolean hasGroup(String groupname)
           
 boolean hasUser(String username)
           
 boolean isActiveUser(String username)
           
 boolean reactivateUser(String username)
           
 boolean removeAllPermissionsForGroup(String groupname)
          Delete all permissions (global and space level) permissions for the group with the given name.
 boolean removeGroup(String groupName, String moveToGroupName)
          Delete group with name groupname.
 boolean removeUser(String username)
          Delete the given user from the Confluence System.
 boolean removeUserFromGroup(String username, String groupname)
          Delete the user with name username from the group with name groupname.
 void setAttachmentManager(AttachmentManager attachmentManager)
           
 void setPermissionManager(PermissionManager permissionManager)
           
 void setPersonalInformationManager(PersonalInformationManager personalInformationManager)
           
 void setSoapServiceHelper(SoapServiceHelper soapServiceHelper)
           
 void setSpaceManager(SpaceManager spaceManager)
           
 void setSpacePermissionManager(SpacePermissionManager spacePermissionManager)
           
 void setUserAccessor(UserAccessor userAccessor)
           
 void setUserContentManager(UserContentManager userContentManager)
           
 boolean setUserInformation(RemoteUserInformation userInfo)
           
 boolean setUserPreferenceBoolean(String username, String key, boolean value)
           
 boolean setUserPreferenceLong(String username, String key, long value)
           
 boolean setUserPreferenceString(String username, String key, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsersSoapService

public UsersSoapService()
Method Detail

setUserContentManager

public void setUserContentManager(UserContentManager userContentManager)

setAttachmentManager

public void setAttachmentManager(AttachmentManager attachmentManager)

setUserAccessor

public void setUserAccessor(UserAccessor userAccessor)

setSpacePermissionManager

public void setSpacePermissionManager(SpacePermissionManager spacePermissionManager)

setSoapServiceHelper

public void setSoapServiceHelper(SoapServiceHelper soapServiceHelper)

setSpaceManager

public void setSpaceManager(SpaceManager spaceManager)

setPermissionManager

public void setPermissionManager(PermissionManager permissionManager)

getUser

public RemoteUser getUser(String username)
                   throws RemoteException
Throws:
RemoteException

addUser

public boolean addUser(RemoteUser user,
                       String password)
                throws RemoteException
Adds user.

Throws:
NotPermittedException - if you do not have permissions to add the user.
RemoteException

removeUser

public boolean removeUser(String username)
                   throws RemoteException
Delete the given user from the Confluence System.

Parameters:
username - is the name of the user that is to be deleted from the CONFLUENCE SYSTEM.
Throws:
RemoteException - if the specified user has authored content. You cannot remove users that have authored content.
NotPermittedException - if you do not have permissions to remove the user

editUser

public boolean editUser(RemoteUser remoteUser)
                 throws NotPermittedException,
                        RemoteException
Allows the email and the fullname of a user to be edited by specifying these values in the passed in RemoteUser.

Throws:
NotPermittedException - if you do not have permissions to edit this user
RemoteException - if the no user found with the name specified in remoteUser

getUserGroups

public String[] getUserGroups(String username)
                       throws RemoteException
Fetches the groups that the specified user belongs to.

Returns:
an array of the groups that this user belongs to as String's
Throws:
RemoteException - if the no user found with the name specified in remoteUser

addUserToGroup

public boolean addUserToGroup(String username,
                              String groupname)
                       throws RemoteException
Add user to the specified group.

Throws:
RemoteException - if the user or group does not exist
NotPermittedException - if you do have permissions to modify the group and hence add members to it

removeUserFromGroup

public boolean removeUserFromGroup(String username,
                                   String groupname)
                            throws RemoteException
Delete the user with name username from the group with name groupname.

Parameters:
username - is the name of the user that is to be deleted from the group with wih name groupname.
groupname - is the name of the group from which the user with name username is to be deleted.
Throws:
RemoteException - if user/group with the given names does not exist
NotPermittedException - if you do not have permissions to remove the user from the specified group

addGroup

public boolean addGroup(String groupname)
                 throws RemoteException
Adds the specified group. Group will not be created if it already exists.

Throws:
NotPermittedException - if you do not have permissions to add groups.
RemoteException

removeAllPermissionsForGroup

public boolean removeAllPermissionsForGroup(String groupname)
                                     throws RemoteException
Delete all permissions (global and space level) permissions for the group with the given name.

Parameters:
groupname - is the group for which all the permissions has to be deleted
Returns:
true if all permisisons were successfully removed from this group, false otherwise.
Throws:
RemoteException - if group with the given name does not exist
NotPermittedException - if you do not have permissions to remove all permissions from this group

removeGroup

public boolean removeGroup(String groupName,
                           String moveToGroupName)
                    throws RemoteException
Delete group with name groupname. If moveToGroupName group is specified, members of the deleted group will be moved to it.

Parameters:
groupName - is the group that is to be deleted
moveToGroupName - moves members of deleted group to here
Throws:
RemoteException - if either group does not exist
NotPermittedException - if the current logged in user either does not have permission to remove the group, or modify the group to move members to

getGroups

public String[] getGroups()
                   throws RemoteException
Returns all groups. If Settings.isSharedMode() is enabled, this will only return the groups that the currently logged in user can see.

Throws:
RemoteException - if you are not allowed to retrieve all groups

deactivateUser

public boolean deactivateUser(String username)
                       throws NotPermittedException,
                              RemoteException
Deactivates the specified user.

Throws:
NotPermittedException - if you do not have permissions to set permissions on the specified user
RemoteException - if user has already been deactivated.

reactivateUser

public boolean reactivateUser(String username)
                       throws NotPermittedException,
                              RemoteException
Throws:
NotPermittedException
RemoteException

isActiveUser

public boolean isActiveUser(String username)
                     throws NotPermittedException,
                            RemoteException
Throws:
NotPermittedException
RemoteException

getActiveUsers

public String[] getActiveUsers(boolean viewAll)
                        throws RemoteException
Throws:
RemoteException

changeMyPassword

public boolean changeMyPassword(String oldPass,
                                String newPass)
                         throws NotPermittedException,
                                RemoteException
Changes your password.

Parameters:
newPass - must not be null or empty string
Throws:
NotPermittedException
RemoteException - if the new password is null or empty

changeUserPassword

public boolean changeUserPassword(String username,
                                  String newPass)
                           throws NotPermittedException,
                                  RemoteException
Changes the user's password.

Parameters:
newPass - must not be null or empty string
Throws:
NotPermittedException
RemoteException

setUserInformation

public boolean setUserInformation(RemoteUserInformation userInfo)
                           throws RemoteException
Throws:
RemoteException

getUserInformation

public RemoteUserInformation getUserInformation(String username)
                                         throws RemoteException
Throws:
RemoteException

setUserPreferenceBoolean

public boolean setUserPreferenceBoolean(String username,
                                        String key,
                                        boolean value)
                                 throws RemoteException
Throws:
RemoteException

getUserPreferenceBoolean

public boolean getUserPreferenceBoolean(String username,
                                        String key)
                                 throws RemoteException
Throws:
RemoteException

setUserPreferenceLong

public boolean setUserPreferenceLong(String username,
                                     String key,
                                     long value)
                              throws RemoteException
Throws:
RemoteException

getUserPreferenceLong

public long getUserPreferenceLong(String username,
                                  String key)
                           throws RemoteException
Throws:
RemoteException

setUserPreferenceString

public boolean setUserPreferenceString(String username,
                                       String key,
                                       String value)
                                throws RemoteException
Throws:
RemoteException

getUserPreferenceString

public String getUserPreferenceString(String username,
                                      String key)
                               throws RemoteException
Throws:
RemoteException

hasUser

public boolean hasUser(String username)

hasGroup

public boolean hasGroup(String groupname)

getPersonalInformationManager

public PersonalInformationManager getPersonalInformationManager()

setPersonalInformationManager

public void setPersonalInformationManager(PersonalInformationManager personalInformationManager)

addProfilePicture

public boolean addProfilePicture(String userName,
                                 String fileName,
                                 String mimeType,
                                 byte[] pictureData)
                          throws RemoteException
Add a profile picture to a user's profile

Parameters:
userName - The user name of the profile
fileName - File name of the picture
mimeType - Image mime type (must be from image/*)
pictureData - The image data
Returns:
true if successful
Throws:
RemoteException


Copyright © 2003-2012 Atlassian. All Rights Reserved.