com.liferay.portal.service.http
Class UserServiceJSON
java.lang.Object
com.liferay.portal.service.http.UserServiceJSON
public class UserServiceJSON
- extends java.lang.Object
View Source
ServiceBuilder generated this class. Modifications in this class will be
overwritten the next time is generated.
This class provides a JSON utility for the
com.liferay.portal.service.UserServiceUtil
service utility. The static methods of this class calls the same methods of
the service utility. However, the signatures are different because it is
difficult for JSON to support certain types.
ServiceBuilder follows certain rules in translating the methods. For example,
if the method in the service utility returns a java.util.List
,
that is translated to a org.json.JSONArray
. If the method in the
service utility returns a com.liferay.portal.model.User
,
that is translated to a org.json.JSONObject
. Methods that JSON
cannot safely use are skipped. The logic for the translation is encapsulated
in com.liferay.portal.service.http.UserJSONSerializer
.
This allows you to call the the backend services directly from JavaScript.
See portal-web/docroot/html/portlet/tags_admin/unpacked.js
for a
reference of how that portlet uses the generated JavaScript in
portal-web/docroot/html/js/service.js
to call the backend
services directly from JavaScript.
The JSON utility is only generated for remote services.
- Author:
- Brian Wing Shun Chan
- See Also:
UserServiceUtil
,
UserJSONSerializer
Method Summary |
static void |
addGroupUsers(long groupId,
long[] userIds)
|
static void |
addOrganizationUsers(long organizationId,
long[] userIds)
|
static void |
addPasswordPolicyUsers(long passwordPolicyId,
long[] userIds)
|
static void |
addRoleUsers(long roleId,
long[] userIds)
|
static org.json.JSONObject |
addUser(long companyId,
boolean autoPassword,
java.lang.String password1,
java.lang.String password2,
boolean autoScreenName,
java.lang.String screenName,
java.lang.String emailAddress,
java.lang.String locale,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
int prefixId,
int suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
java.lang.String jobTitle,
long[] organizationIds,
boolean sendEmail)
|
static void |
addUserGroupUsers(long userGroupId,
long[] userIds)
|
static void |
deleteRoleUser(long roleId,
long userId)
|
static void |
deleteUser(long userId)
|
static long |
getDefaultUserId(long companyId)
|
static org.json.JSONArray |
getGroupUsers(long groupId)
|
static org.json.JSONArray |
getRoleUsers(long roleId)
|
static org.json.JSONObject |
getUserByEmailAddress(long companyId,
java.lang.String emailAddress)
|
static org.json.JSONObject |
getUserById(long userId)
|
static org.json.JSONObject |
getUserByScreenName(long companyId,
java.lang.String screenName)
|
static long |
getUserIdByEmailAddress(long companyId,
java.lang.String emailAddress)
|
static long |
getUserIdByScreenName(long companyId,
java.lang.String screenName)
|
static boolean |
hasGroupUser(long groupId,
long userId)
|
static boolean |
hasRoleUser(long roleId,
long userId)
|
static void |
setRoleUsers(long roleId,
long[] userIds)
|
static void |
setUserGroupUsers(long userGroupId,
long[] userIds)
|
static void |
unsetGroupUsers(long groupId,
long[] userIds)
|
static void |
unsetOrganizationUsers(long organizationId,
long[] userIds)
|
static void |
unsetPasswordPolicyUsers(long passwordPolicyId,
long[] userIds)
|
static void |
unsetRoleUsers(long roleId,
long[] userIds)
|
static void |
unsetUserGroupUsers(long userGroupId,
long[] userIds)
|
static org.json.JSONObject |
updateActive(long userId,
boolean active)
|
static org.json.JSONObject |
updateAgreedToTermsOfUse(long userId,
boolean agreedToTermsOfUse)
|
static org.json.JSONObject |
updateLockout(long userId,
boolean lockout)
|
static void |
updateOrganizations(long userId,
long[] organizationIds)
|
static org.json.JSONObject |
updatePassword(long userId,
java.lang.String password1,
java.lang.String password2,
boolean passwordReset)
|
static void |
updatePortrait(long userId,
byte[] bytes)
|
static void |
updateScreenName(long userId,
java.lang.String screenName)
|
static org.json.JSONObject |
updateUser(long userId,
java.lang.String oldPassword,
boolean passwordReset,
java.lang.String screenName,
java.lang.String emailAddress,
java.lang.String languageId,
java.lang.String timeZoneId,
java.lang.String greeting,
java.lang.String comments,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
int prefixId,
int suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
java.lang.String smsSn,
java.lang.String aimSn,
java.lang.String icqSn,
java.lang.String jabberSn,
java.lang.String msnSn,
java.lang.String skypeSn,
java.lang.String ymSn,
java.lang.String jobTitle,
long[] organizationIds)
|
static org.json.JSONObject |
updateUser(long userId,
java.lang.String oldPassword,
java.lang.String newPassword1,
java.lang.String newPassword2,
boolean passwordReset,
java.lang.String screenName,
java.lang.String emailAddress,
java.lang.String languageId,
java.lang.String timeZoneId,
java.lang.String greeting,
java.lang.String comments,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
int prefixId,
int suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
java.lang.String smsSn,
java.lang.String aimSn,
java.lang.String icqSn,
java.lang.String jabberSn,
java.lang.String msnSn,
java.lang.String skypeSn,
java.lang.String ymSn,
java.lang.String jobTitle,
long[] organizationIds)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserServiceJSON
public UserServiceJSON()
addGroupUsers
public static void addGroupUsers(long groupId,
long[] userIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
addOrganizationUsers
public static void addOrganizationUsers(long organizationId,
long[] userIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
addPasswordPolicyUsers
public static void addPasswordPolicyUsers(long passwordPolicyId,
long[] userIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
addRoleUsers
public static void addRoleUsers(long roleId,
long[] userIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
addUserGroupUsers
public static void addUserGroupUsers(long userGroupId,
long[] userIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
addUser
public static org.json.JSONObject addUser(long companyId,
boolean autoPassword,
java.lang.String password1,
java.lang.String password2,
boolean autoScreenName,
java.lang.String screenName,
java.lang.String emailAddress,
java.lang.String locale,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
int prefixId,
int suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
java.lang.String jobTitle,
long[] organizationIds,
boolean sendEmail)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
deleteRoleUser
public static void deleteRoleUser(long roleId,
long userId)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
deleteUser
public static void deleteUser(long userId)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
getDefaultUserId
public static long getDefaultUserId(long companyId)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
getGroupUsers
public static org.json.JSONArray getGroupUsers(long groupId)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
getRoleUsers
public static org.json.JSONArray getRoleUsers(long roleId)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
getUserByEmailAddress
public static org.json.JSONObject getUserByEmailAddress(long companyId,
java.lang.String emailAddress)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
getUserById
public static org.json.JSONObject getUserById(long userId)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
getUserByScreenName
public static org.json.JSONObject getUserByScreenName(long companyId,
java.lang.String screenName)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
getUserIdByEmailAddress
public static long getUserIdByEmailAddress(long companyId,
java.lang.String emailAddress)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
getUserIdByScreenName
public static long getUserIdByScreenName(long companyId,
java.lang.String screenName)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
hasGroupUser
public static boolean hasGroupUser(long groupId,
long userId)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
hasRoleUser
public static boolean hasRoleUser(long roleId,
long userId)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
setRoleUsers
public static void setRoleUsers(long roleId,
long[] userIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
setUserGroupUsers
public static void setUserGroupUsers(long userGroupId,
long[] userIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
unsetGroupUsers
public static void unsetGroupUsers(long groupId,
long[] userIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
unsetOrganizationUsers
public static void unsetOrganizationUsers(long organizationId,
long[] userIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
unsetPasswordPolicyUsers
public static void unsetPasswordPolicyUsers(long passwordPolicyId,
long[] userIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
unsetRoleUsers
public static void unsetRoleUsers(long roleId,
long[] userIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
unsetUserGroupUsers
public static void unsetUserGroupUsers(long userGroupId,
long[] userIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
updateActive
public static org.json.JSONObject updateActive(long userId,
boolean active)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
updateAgreedToTermsOfUse
public static org.json.JSONObject updateAgreedToTermsOfUse(long userId,
boolean agreedToTermsOfUse)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
updateLockout
public static org.json.JSONObject updateLockout(long userId,
boolean lockout)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
updateOrganizations
public static void updateOrganizations(long userId,
long[] organizationIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
updatePassword
public static org.json.JSONObject updatePassword(long userId,
java.lang.String password1,
java.lang.String password2,
boolean passwordReset)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
updatePortrait
public static void updatePortrait(long userId,
byte[] bytes)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
updateScreenName
public static void updateScreenName(long userId,
java.lang.String screenName)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
updateUser
public static org.json.JSONObject updateUser(long userId,
java.lang.String oldPassword,
boolean passwordReset,
java.lang.String screenName,
java.lang.String emailAddress,
java.lang.String languageId,
java.lang.String timeZoneId,
java.lang.String greeting,
java.lang.String comments,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
int prefixId,
int suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
java.lang.String smsSn,
java.lang.String aimSn,
java.lang.String icqSn,
java.lang.String jabberSn,
java.lang.String msnSn,
java.lang.String skypeSn,
java.lang.String ymSn,
java.lang.String jobTitle,
long[] organizationIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException
updateUser
public static org.json.JSONObject updateUser(long userId,
java.lang.String oldPassword,
java.lang.String newPassword1,
java.lang.String newPassword2,
boolean passwordReset,
java.lang.String screenName,
java.lang.String emailAddress,
java.lang.String languageId,
java.lang.String timeZoneId,
java.lang.String greeting,
java.lang.String comments,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
int prefixId,
int suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
java.lang.String smsSn,
java.lang.String aimSn,
java.lang.String icqSn,
java.lang.String jabberSn,
java.lang.String msnSn,
java.lang.String skypeSn,
java.lang.String ymSn,
java.lang.String jobTitle,
long[] organizationIds)
throws java.rmi.RemoteException,
com.liferay.portal.SystemException,
com.liferay.portal.PortalException
- Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException