Liferay 6.0.5

com.liferay.portal.service.http
Class UserServiceHttp

java.lang.Object
  extended by com.liferay.portal.service.http.UserServiceHttp

public class UserServiceHttp
extends Object

This class provides a HTTP utility for the UserServiceUtil service utility. The static methods of this class calls the same methods of the service utility. However, the signatures are different because it requires an additional HttpPrincipal parameter.

The benefits of using the HTTP utility is that it is fast and allows for tunneling without the cost of serializing to text. The drawback is that it only works with Java.

Set the property tunnel.servlet.hosts.allowed in portal.properties to configure security.

The HTTP utility is only generated for remote services.

See Also:
UserServiceSoap, HttpPrincipal, UserServiceUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Constructor Summary
UserServiceHttp()
           
 
Method Summary
static void addGroupUsers(HttpPrincipal httpPrincipal, long groupId, long[] userIds)
           
static void addOrganizationUsers(HttpPrincipal httpPrincipal, long organizationId, long[] userIds)
           
static void addPasswordPolicyUsers(HttpPrincipal httpPrincipal, long passwordPolicyId, long[] userIds)
           
static void addRoleUsers(HttpPrincipal httpPrincipal, long roleId, long[] userIds)
           
static void addTeamUsers(HttpPrincipal httpPrincipal, long teamId, long[] userIds)
           
static User addUser(HttpPrincipal httpPrincipal, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, int prefixId, int suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, List<AnnouncementsDelivery> announcementsDelivers, ServiceContext serviceContext)
           
static User addUser(HttpPrincipal httpPrincipal, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, int prefixId, int suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, ServiceContext serviceContext)
           
static void addUserGroupUsers(HttpPrincipal httpPrincipal, long userGroupId, long[] userIds)
           
static void deletePortrait(HttpPrincipal httpPrincipal, long userId)
           
static void deleteRoleUser(HttpPrincipal httpPrincipal, long roleId, long userId)
           
static void deleteUser(HttpPrincipal httpPrincipal, long userId)
           
static long getDefaultUserId(HttpPrincipal httpPrincipal, long companyId)
           
static long[] getGroupUserIds(HttpPrincipal httpPrincipal, long groupId)
           
static long[] getOrganizationUserIds(HttpPrincipal httpPrincipal, long organizationId)
           
static long[] getRoleUserIds(HttpPrincipal httpPrincipal, long roleId)
           
static User getUserByEmailAddress(HttpPrincipal httpPrincipal, long companyId, String emailAddress)
           
static User getUserById(HttpPrincipal httpPrincipal, long userId)
           
static User getUserByScreenName(HttpPrincipal httpPrincipal, long companyId, String screenName)
           
static long getUserIdByEmailAddress(HttpPrincipal httpPrincipal, long companyId, String emailAddress)
           
static long getUserIdByScreenName(HttpPrincipal httpPrincipal, long companyId, String screenName)
           
static boolean hasGroupUser(HttpPrincipal httpPrincipal, long groupId, long userId)
           
static boolean hasRoleUser(HttpPrincipal httpPrincipal, long roleId, long userId)
           
static boolean hasRoleUser(HttpPrincipal httpPrincipal, long companyId, String name, long userId, boolean inherited)
           
static void setRoleUsers(HttpPrincipal httpPrincipal, long roleId, long[] userIds)
           
static void setUserGroupUsers(HttpPrincipal httpPrincipal, long userGroupId, long[] userIds)
           
static void unsetGroupUsers(HttpPrincipal httpPrincipal, long groupId, long[] userIds)
           
static void unsetOrganizationUsers(HttpPrincipal httpPrincipal, long organizationId, long[] userIds)
           
static void unsetPasswordPolicyUsers(HttpPrincipal httpPrincipal, long passwordPolicyId, long[] userIds)
           
static void unsetRoleUsers(HttpPrincipal httpPrincipal, long roleId, long[] userIds)
           
static void unsetTeamUsers(HttpPrincipal httpPrincipal, long teamId, long[] userIds)
           
static void unsetUserGroupUsers(HttpPrincipal httpPrincipal, long userGroupId, long[] userIds)
           
static User updateActive(HttpPrincipal httpPrincipal, long userId, boolean active)
           
static User updateAgreedToTermsOfUse(HttpPrincipal httpPrincipal, long userId, boolean agreedToTermsOfUse)
           
static void updateEmailAddress(HttpPrincipal httpPrincipal, long userId, String password, String emailAddress1, String emailAddress2)
           
static User updateLockout(HttpPrincipal httpPrincipal, long userId, boolean lockout)
           
static void updateOpenId(HttpPrincipal httpPrincipal, long userId, String openId)
           
static void updateOrganizations(HttpPrincipal httpPrincipal, long userId, long[] organizationIds)
           
static User updatePassword(HttpPrincipal httpPrincipal, long userId, String password1, String password2, boolean passwordReset)
           
static void updatePortrait(HttpPrincipal httpPrincipal, long userId, byte[] bytes)
           
static void updateReminderQuery(HttpPrincipal httpPrincipal, long userId, String question, String answer)
           
static void updateScreenName(HttpPrincipal httpPrincipal, long userId, String screenName)
           
static User updateUser(HttpPrincipal httpPrincipal, long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, long facebookId, String openId, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, int prefixId, int suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String aimSn, String facebookSn, String icqSn, String jabberSn, String msnSn, String mySpaceSn, String skypeSn, String twitterSn, String ymSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<UserGroupRole> userGroupRoles, long[] userGroupIds, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, List<AnnouncementsDelivery> announcementsDelivers, ServiceContext serviceContext)
           
static User updateUser(HttpPrincipal httpPrincipal, long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, long facebookId, String openId, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, int prefixId, int suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String aimSn, String facebookSn, String icqSn, String jabberSn, String msnSn, String mySpaceSn, String skypeSn, String twitterSn, String ymSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<UserGroupRole> userGroupRoles, long[] userGroupIds, ServiceContext serviceContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserServiceHttp

public UserServiceHttp()
Method Detail

addGroupUsers

public static void addGroupUsers(HttpPrincipal httpPrincipal,
                                 long groupId,
                                 long[] userIds)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

addOrganizationUsers

public static void addOrganizationUsers(HttpPrincipal httpPrincipal,
                                        long organizationId,
                                        long[] userIds)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

addPasswordPolicyUsers

public static void addPasswordPolicyUsers(HttpPrincipal httpPrincipal,
                                          long passwordPolicyId,
                                          long[] userIds)
                                   throws PortalException,
                                          SystemException
Throws:
PortalException
SystemException

addRoleUsers

public static void addRoleUsers(HttpPrincipal httpPrincipal,
                                long roleId,
                                long[] userIds)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

addTeamUsers

public static void addTeamUsers(HttpPrincipal httpPrincipal,
                                long teamId,
                                long[] userIds)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

addUserGroupUsers

public static void addUserGroupUsers(HttpPrincipal httpPrincipal,
                                     long userGroupId,
                                     long[] userIds)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

addUser

public static User addUser(HttpPrincipal httpPrincipal,
                           long companyId,
                           boolean autoPassword,
                           String password1,
                           String password2,
                           boolean autoScreenName,
                           String screenName,
                           String emailAddress,
                           long facebookId,
                           String openId,
                           Locale locale,
                           String firstName,
                           String middleName,
                           String lastName,
                           int prefixId,
                           int suffixId,
                           boolean male,
                           int birthdayMonth,
                           int birthdayDay,
                           int birthdayYear,
                           String jobTitle,
                           long[] groupIds,
                           long[] organizationIds,
                           long[] roleIds,
                           long[] userGroupIds,
                           boolean sendEmail,
                           ServiceContext serviceContext)
                    throws PortalException,
                           SystemException
Throws:
PortalException
SystemException

addUser

public static User addUser(HttpPrincipal httpPrincipal,
                           long companyId,
                           boolean autoPassword,
                           String password1,
                           String password2,
                           boolean autoScreenName,
                           String screenName,
                           String emailAddress,
                           long facebookId,
                           String openId,
                           Locale locale,
                           String firstName,
                           String middleName,
                           String lastName,
                           int prefixId,
                           int suffixId,
                           boolean male,
                           int birthdayMonth,
                           int birthdayDay,
                           int birthdayYear,
                           String jobTitle,
                           long[] groupIds,
                           long[] organizationIds,
                           long[] roleIds,
                           long[] userGroupIds,
                           boolean sendEmail,
                           List<Address> addresses,
                           List<EmailAddress> emailAddresses,
                           List<Phone> phones,
                           List<Website> websites,
                           List<AnnouncementsDelivery> announcementsDelivers,
                           ServiceContext serviceContext)
                    throws PortalException,
                           SystemException
Throws:
PortalException
SystemException

deletePortrait

public static void deletePortrait(HttpPrincipal httpPrincipal,
                                  long userId)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

deleteRoleUser

public static void deleteRoleUser(HttpPrincipal httpPrincipal,
                                  long roleId,
                                  long userId)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

deleteUser

public static void deleteUser(HttpPrincipal httpPrincipal,
                              long userId)
                       throws PortalException,
                              SystemException
Throws:
PortalException
SystemException

getDefaultUserId

public static long getDefaultUserId(HttpPrincipal httpPrincipal,
                                    long companyId)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

getGroupUserIds

public static long[] getGroupUserIds(HttpPrincipal httpPrincipal,
                                     long groupId)
                              throws SystemException
Throws:
SystemException

getOrganizationUserIds

public static long[] getOrganizationUserIds(HttpPrincipal httpPrincipal,
                                            long organizationId)
                                     throws SystemException
Throws:
SystemException

getRoleUserIds

public static long[] getRoleUserIds(HttpPrincipal httpPrincipal,
                                    long roleId)
                             throws SystemException
Throws:
SystemException

getUserByEmailAddress

public static User getUserByEmailAddress(HttpPrincipal httpPrincipal,
                                         long companyId,
                                         String emailAddress)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException

getUserById

public static User getUserById(HttpPrincipal httpPrincipal,
                               long userId)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

getUserByScreenName

public static User getUserByScreenName(HttpPrincipal httpPrincipal,
                                       long companyId,
                                       String screenName)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

getUserIdByEmailAddress

public static long getUserIdByEmailAddress(HttpPrincipal httpPrincipal,
                                           long companyId,
                                           String emailAddress)
                                    throws PortalException,
                                           SystemException
Throws:
PortalException
SystemException

getUserIdByScreenName

public static long getUserIdByScreenName(HttpPrincipal httpPrincipal,
                                         long companyId,
                                         String screenName)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException

hasGroupUser

public static boolean hasGroupUser(HttpPrincipal httpPrincipal,
                                   long groupId,
                                   long userId)
                            throws SystemException
Throws:
SystemException

hasRoleUser

public static boolean hasRoleUser(HttpPrincipal httpPrincipal,
                                  long roleId,
                                  long userId)
                           throws SystemException
Throws:
SystemException

hasRoleUser

public static boolean hasRoleUser(HttpPrincipal httpPrincipal,
                                  long companyId,
                                  String name,
                                  long userId,
                                  boolean inherited)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

setRoleUsers

public static void setRoleUsers(HttpPrincipal httpPrincipal,
                                long roleId,
                                long[] userIds)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

setUserGroupUsers

public static void setUserGroupUsers(HttpPrincipal httpPrincipal,
                                     long userGroupId,
                                     long[] userIds)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

unsetGroupUsers

public static void unsetGroupUsers(HttpPrincipal httpPrincipal,
                                   long groupId,
                                   long[] userIds)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

unsetOrganizationUsers

public static void unsetOrganizationUsers(HttpPrincipal httpPrincipal,
                                          long organizationId,
                                          long[] userIds)
                                   throws PortalException,
                                          SystemException
Throws:
PortalException
SystemException

unsetPasswordPolicyUsers

public static void unsetPasswordPolicyUsers(HttpPrincipal httpPrincipal,
                                            long passwordPolicyId,
                                            long[] userIds)
                                     throws PortalException,
                                            SystemException
Throws:
PortalException
SystemException

unsetRoleUsers

public static void unsetRoleUsers(HttpPrincipal httpPrincipal,
                                  long roleId,
                                  long[] userIds)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

unsetTeamUsers

public static void unsetTeamUsers(HttpPrincipal httpPrincipal,
                                  long teamId,
                                  long[] userIds)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

unsetUserGroupUsers

public static void unsetUserGroupUsers(HttpPrincipal httpPrincipal,
                                       long userGroupId,
                                       long[] userIds)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

updateActive

public static User updateActive(HttpPrincipal httpPrincipal,
                                long userId,
                                boolean active)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

updateAgreedToTermsOfUse

public static User updateAgreedToTermsOfUse(HttpPrincipal httpPrincipal,
                                            long userId,
                                            boolean agreedToTermsOfUse)
                                     throws PortalException,
                                            SystemException
Throws:
PortalException
SystemException

updateEmailAddress

public static void updateEmailAddress(HttpPrincipal httpPrincipal,
                                      long userId,
                                      String password,
                                      String emailAddress1,
                                      String emailAddress2)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

updateLockout

public static User updateLockout(HttpPrincipal httpPrincipal,
                                 long userId,
                                 boolean lockout)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

updateOpenId

public static void updateOpenId(HttpPrincipal httpPrincipal,
                                long userId,
                                String openId)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

updateOrganizations

public static void updateOrganizations(HttpPrincipal httpPrincipal,
                                       long userId,
                                       long[] organizationIds)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

updatePassword

public static User updatePassword(HttpPrincipal httpPrincipal,
                                  long userId,
                                  String password1,
                                  String password2,
                                  boolean passwordReset)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

updatePortrait

public static void updatePortrait(HttpPrincipal httpPrincipal,
                                  long userId,
                                  byte[] bytes)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

updateReminderQuery

public static void updateReminderQuery(HttpPrincipal httpPrincipal,
                                       long userId,
                                       String question,
                                       String answer)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

updateScreenName

public static void updateScreenName(HttpPrincipal httpPrincipal,
                                    long userId,
                                    String screenName)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

updateUser

public static User updateUser(HttpPrincipal httpPrincipal,
                              long userId,
                              String oldPassword,
                              String newPassword1,
                              String newPassword2,
                              boolean passwordReset,
                              String reminderQueryQuestion,
                              String reminderQueryAnswer,
                              String screenName,
                              String emailAddress,
                              long facebookId,
                              String openId,
                              String languageId,
                              String timeZoneId,
                              String greeting,
                              String comments,
                              String firstName,
                              String middleName,
                              String lastName,
                              int prefixId,
                              int suffixId,
                              boolean male,
                              int birthdayMonth,
                              int birthdayDay,
                              int birthdayYear,
                              String smsSn,
                              String aimSn,
                              String facebookSn,
                              String icqSn,
                              String jabberSn,
                              String msnSn,
                              String mySpaceSn,
                              String skypeSn,
                              String twitterSn,
                              String ymSn,
                              String jobTitle,
                              long[] groupIds,
                              long[] organizationIds,
                              long[] roleIds,
                              List<UserGroupRole> userGroupRoles,
                              long[] userGroupIds,
                              ServiceContext serviceContext)
                       throws PortalException,
                              SystemException
Throws:
PortalException
SystemException

updateUser

public static User updateUser(HttpPrincipal httpPrincipal,
                              long userId,
                              String oldPassword,
                              String newPassword1,
                              String newPassword2,
                              boolean passwordReset,
                              String reminderQueryQuestion,
                              String reminderQueryAnswer,
                              String screenName,
                              String emailAddress,
                              long facebookId,
                              String openId,
                              String languageId,
                              String timeZoneId,
                              String greeting,
                              String comments,
                              String firstName,
                              String middleName,
                              String lastName,
                              int prefixId,
                              int suffixId,
                              boolean male,
                              int birthdayMonth,
                              int birthdayDay,
                              int birthdayYear,
                              String smsSn,
                              String aimSn,
                              String facebookSn,
                              String icqSn,
                              String jabberSn,
                              String msnSn,
                              String mySpaceSn,
                              String skypeSn,
                              String twitterSn,
                              String ymSn,
                              String jobTitle,
                              long[] groupIds,
                              long[] organizationIds,
                              long[] roleIds,
                              List<UserGroupRole> userGroupRoles,
                              long[] userGroupIds,
                              List<Address> addresses,
                              List<EmailAddress> emailAddresses,
                              List<Phone> phones,
                              List<Website> websites,
                              List<AnnouncementsDelivery> announcementsDelivers,
                              ServiceContext serviceContext)
                       throws PortalException,
                              SystemException
Throws:
PortalException
SystemException

Liferay 6.0.5