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

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

public class UsersSoapService
extends java.lang.Object


Constructor Summary
UsersSoapService()
           
 
Method Summary
 boolean addGroup(java.lang.String groupname)
          Adds the specified group.
 boolean addProfilePicture(java.lang.String userName, java.lang.String fileName, java.lang.String mimeType, byte[] pictureData)
          Add a profile picture to a user's profile
 boolean addUser(RemoteUser user, java.lang.String password, boolean notifyUser)
          Adds user.
 boolean addUserToGroup(java.lang.String username, java.lang.String groupname)
          Add user to the specified group.
 boolean changeMyPassword(java.lang.String oldPass, java.lang.String newPass)
          Changes your password.
 boolean changeUserPassword(java.lang.String username, java.lang.String newPass)
          Changes the user's password.
 boolean deactivateUser(java.lang.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.
 java.lang.String[] getActiveUsers(boolean viewAll)
           
 java.lang.String[] getGroups()
          Returns all groups.
 PersonalInformationManager getPersonalInformationManager()
           
 RemoteUser getUser(java.lang.String username)
          Deprecated. since 5.2. Use getUserByName(String) instead.
 RemoteConfluenceUser getUserByKey(java.lang.String userKey)
           
 RemoteConfluenceUser getUserByName(java.lang.String username)
           
 java.lang.String[] getUserGroups(java.lang.String username)
          Fetches the groups that the specified user belongs to.
 RemoteUserInformation getUserInformation(java.lang.String username)
           
 boolean getUserPreferenceBoolean(java.lang.String username, java.lang.String key)
           
 long getUserPreferenceLong(java.lang.String username, java.lang.String key)
           
 java.lang.String getUserPreferenceString(java.lang.String username, java.lang.String key)
           
 boolean hasGroup(java.lang.String groupname)
           
 boolean hasUser(java.lang.String username)
           
 boolean isActiveUser(java.lang.String username)
           
 boolean reactivateUser(java.lang.String username)
           
 boolean removeAllPermissionsForGroup(java.lang.String groupname)
          Delete all permissions (global and space level) permissions for the group with the given name.
 boolean removeGroup(java.lang.String groupName, java.lang.String moveToGroupName)
          Delete group with name groupname.
 boolean removeUser(java.lang.String username)
          Delete the given user from the Confluence System.
 boolean removeUserFromGroup(java.lang.String username, java.lang.String groupname)
          Delete the user with name username from the group with name groupname.
 boolean renameUser(java.lang.String oldUsername, java.lang.String newUsername)
           
 java.lang.String[] renameUsers(java.util.Map<java.lang.String,java.lang.String> oldUsernamesToNewUsernames)
          Renames multiple users at the same time.
 void setAttachmentManager(AttachmentManager attachmentManager)
           
 void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
           
 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(java.lang.String username, java.lang.String key, boolean value)
           
 boolean setUserPreferenceLong(java.lang.String username, java.lang.String key, long value)
           
 boolean setUserPreferenceString(java.lang.String username, java.lang.String key, java.lang.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)

setEventPublisher

public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)

getUser

@Deprecated
public RemoteUser getUser(java.lang.String username)
                   throws RemoteException
Deprecated. since 5.2. Use getUserByName(String) instead.

Throws:
RemoteException

getUserByName

public RemoteConfluenceUser getUserByName(java.lang.String username)
                                   throws RemoteException
Throws:
RemoteException
Since:
5.2

getUserByKey

public RemoteConfluenceUser getUserByKey(java.lang.String userKey)
                                  throws RemoteException
Throws:
RemoteException
Since:
5.2

addUser

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

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

removeUser

public boolean removeUser(java.lang.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 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 java.lang.String[] getUserGroups(java.lang.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(java.lang.String username,
                              java.lang.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(java.lang.String username,
                                   java.lang.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(java.lang.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(java.lang.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(java.lang.String groupName,
                           java.lang.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 java.lang.String[] getGroups()
                             throws RemoteException
Returns all groups.

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

deactivateUser

public boolean deactivateUser(java.lang.String username)
                       throws 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(java.lang.String username)
                       throws RemoteException
Throws:
RemoteException

isActiveUser

public boolean isActiveUser(java.lang.String username)
                     throws RemoteException
Throws:
RemoteException

getActiveUsers

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

changeMyPassword

public boolean changeMyPassword(java.lang.String oldPass,
                                java.lang.String newPass)
                         throws 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(java.lang.String username,
                                  java.lang.String newPass)
                           throws 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(java.lang.String username)
                                         throws RemoteException
Throws:
RemoteException

setUserPreferenceBoolean

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

getUserPreferenceBoolean

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

setUserPreferenceLong

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

getUserPreferenceLong

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

setUserPreferenceString

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

getUserPreferenceString

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

hasUser

public boolean hasUser(java.lang.String username)

hasGroup

public boolean hasGroup(java.lang.String groupname)

getPersonalInformationManager

public PersonalInformationManager getPersonalInformationManager()

setPersonalInformationManager

public void setPersonalInformationManager(PersonalInformationManager personalInformationManager)

addProfilePicture

public boolean addProfilePicture(java.lang.String userName,
                                 java.lang.String fileName,
                                 java.lang.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

renameUser

public boolean renameUser(java.lang.String oldUsername,
                          java.lang.String newUsername)
                   throws RemoteException
Throws:
RemoteException

renameUsers

public java.lang.String[] renameUsers(java.util.Map<java.lang.String,java.lang.String> oldUsernamesToNewUsernames)
Renames multiple users at the same time.

Parameters:
oldUsernamesToNewUsernames - key value pairs where old username is the key and new username is the value
Returns:
usernames of users that could not be renamed


Copyright © 2003-2014 Atlassian. All Rights Reserved.