Liferay 6.0.5

com.liferay.portal.service
Class UserLocalServiceUtil

java.lang.Object
  extended by com.liferay.portal.service.UserLocalServiceUtil

public class UserLocalServiceUtil
extends Object

The utility for the user local service. This utility wraps UserLocalServiceImpl and is the primary access point for service operations in application layer code running on the local server.

Never modify this class directly. Add custom service methods to UserLocalServiceImpl and rerun ServiceBuilder to regenerate this class.

This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.

See Also:
UserLocalService, UserLocalServiceBaseImpl, UserLocalServiceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Constructor Summary
UserLocalServiceUtil()
           
 
Method Summary
static void addDefaultGroups(long userId)
           
static void addDefaultRoles(long userId)
           
static void addDefaultUserGroups(long userId)
           
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 void addTeamUsers(long teamId, long[] userIds)
           
static User addUser(long creatorUserId, 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 User addUser(User user)
          Adds the user to the database.
static void addUserGroupUsers(long userGroupId, long[] userIds)
           
static int authenticateByEmailAddress(long companyId, String emailAddress, String password, Map<String,String[]> headerMap, Map<String,String[]> parameterMap)
           
static int authenticateByScreenName(long companyId, String screenName, String password, Map<String,String[]> headerMap, Map<String,String[]> parameterMap)
           
static int authenticateByUserId(long companyId, long userId, String password, Map<String,String[]> headerMap, Map<String,String[]> parameterMap)
           
static long authenticateForBasic(long companyId, String authType, String login, String password)
           
static long authenticateForDigest(long companyId, String username, String realm, String nonce, String method, String uri, String response)
           
static boolean authenticateForJAAS(long userId, String encPassword)
           
static void checkLockout(User user)
           
static void checkLoginFailure(User user)
           
static void checkLoginFailureByEmailAddress(long companyId, String emailAddress)
           
static void checkLoginFailureById(long userId)
           
static void checkLoginFailureByScreenName(long companyId, String screenName)
           
static void checkPasswordExpired(User user)
           
static User createUser(long userId)
          Creates a new user with the primary key.
static KeyValuePair decryptUserId(long companyId, String name, String password)
           
static void deletePortrait(long userId)
           
static void deleteRoleUser(long roleId, long userId)
           
static void deleteUser(long userId)
          Deletes the user with the primary key from the database.
static void deleteUser(User user)
          Deletes the user from the database.
static List dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
static List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
static List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
          Performs a dynamic query on the database and returns an ordered range of the matching rows.
static long dynamicQueryCount(DynamicQuery dynamicQuery)
          Counts the number of rows that match the dynamic query.
static String encryptUserId(String name)
           
static List<User> getCompanyUsers(long companyId, int start, int end)
           
static int getCompanyUsersCount(long companyId)
           
static User getDefaultUser(long companyId)
           
static long getDefaultUserId(long companyId)
           
static long[] getGroupUserIds(long groupId)
           
static List<User> getGroupUsers(long groupId)
           
static int getGroupUsersCount(long groupId)
           
static int getGroupUsersCount(long groupId, boolean active)
           
static List<User> getNoAnnouncementsDeliveries(String type)
           
static List<User> getNoContacts()
           
static List<User> getNoGroups()
           
static long[] getOrganizationUserIds(long organizationId)
           
static List<User> getOrganizationUsers(long organizationId)
           
static int getOrganizationUsersCount(long organizationId)
           
static int getOrganizationUsersCount(long organizationId, boolean active)
           
static long[] getRoleUserIds(long roleId)
           
static List<User> getRoleUsers(long roleId)
           
static List<User> getRoleUsers(long roleId, int start, int end)
           
static int getRoleUsersCount(long roleId)
           
static int getRoleUsersCount(long roleId, boolean active)
           
static UserLocalService getService()
           
static List<User> getSocialUsers(long userId, int type, int start, int end, OrderByComparator obc)
           
static List<User> getSocialUsers(long userId, int start, int end, OrderByComparator obc)
           
static List<User> getSocialUsers(long userId1, long userId2, int type, int start, int end, OrderByComparator obc)
           
static List<User> getSocialUsers(long userId1, long userId2, int start, int end, OrderByComparator obc)
           
static int getSocialUsersCount(long userId)
           
static int getSocialUsersCount(long userId, int type)
           
static int getSocialUsersCount(long userId1, long userId2)
           
static int getSocialUsersCount(long userId1, long userId2, int type)
           
static User getUser(long userId)
          Gets the user with the primary key.
static User getUserByContactId(long contactId)
           
static User getUserByEmailAddress(long companyId, String emailAddress)
           
static User getUserByFacebookId(long companyId, long facebookId)
           
static User getUserById(long userId)
           
static User getUserById(long companyId, long userId)
           
static User getUserByOpenId(long companyId, String openId)
           
static User getUserByPortraitId(long portraitId)
           
static User getUserByScreenName(long companyId, String screenName)
           
static User getUserByUuid(String uuid)
           
static List<User> getUserGroupUsers(long userGroupId)
           
static int getUserGroupUsersCount(long userGroupId)
           
static int getUserGroupUsersCount(long userGroupId, boolean active)
           
static long getUserIdByEmailAddress(long companyId, String emailAddress)
           
static long getUserIdByScreenName(long companyId, String screenName)
           
static List<User> getUsers(int start, int end)
          Gets a range of all the users.
static int getUsersCount()
          Gets the number of users.
static boolean hasGroupUser(long groupId, long userId)
           
static boolean hasOrganizationUser(long organizationId, long userId)
           
static boolean hasPasswordPolicyUser(long passwordPolicyId, long userId)
           
static boolean hasRoleUser(long roleId, long userId)
           
static boolean hasRoleUser(long companyId, String name, long userId, boolean inherited)
          Returns true if the user has the role.
static boolean hasTeamUser(long teamId, long userId)
           
static boolean hasUserGroupUser(long userGroupId, long userId)
           
static boolean isPasswordExpired(User user)
           
static boolean isPasswordExpiringSoon(User user)
           
static List<User> search(long companyId, String keywords, Boolean active, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator obc)
           
static Hits search(long companyId, String keywords, Boolean active, LinkedHashMap<String,Object> params, int start, int end, Sort sort)
           
static List<User> search(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, Boolean active, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, OrderByComparator obc)
           
static Hits search(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, Boolean active, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, Sort sort)
           
static int searchCount(long companyId, String keywords, Boolean active, LinkedHashMap<String,Object> params)
           
static int searchCount(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, Boolean active, LinkedHashMap<String,Object> params, boolean andSearch)
           
static void sendPassword(long companyId, String emailAddress, String remoteAddr, String remoteHost, String userAgent, String fromName, String fromAddress, String subject, String body, ServiceContext serviceContext)
           
static void setRoleUsers(long roleId, long[] userIds)
           
 void setService(UserLocalService service)
           
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, List<User> users)
           
static void unsetRoleUsers(long roleId, long[] userIds)
           
static void unsetTeamUsers(long teamId, long[] userIds)
           
static void unsetUserGroupUsers(long userGroupId, long[] userIds)
           
static User updateActive(long userId, boolean active)
           
static User updateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse)
           
static void updateAsset(long userId, User user, long[] assetCategoryIds, String[] assetTagNames)
           
static User updateCreateDate(long userId, Date createDate)
           
static User updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2)
           
static void updateGroups(long userId, long[] newGroupIds)
           
static User updateLastLogin(long userId, String loginIP)
           
static User updateLockout(User user, boolean lockout)
           
static User updateLockoutByEmailAddress(long companyId, String emailAddress, boolean lockout)
           
static User updateLockoutById(long userId, boolean lockout)
           
static User updateLockoutByScreenName(long companyId, String screenName, boolean lockout)
           
static User updateModifiedDate(long userId, Date modifiedDate)
           
static void updateOpenId(long userId, String openId)
           
static void updateOrganizations(long userId, long[] newOrganizationIds)
           
static User updatePassword(long userId, String password1, String password2, boolean passwordReset)
           
static User updatePassword(long userId, String password1, String password2, boolean passwordReset, boolean silentUpdate)
           
static User updatePasswordManually(long userId, String password, boolean passwordEncrypted, boolean passwordReset, Date passwordModifiedDate)
           
static void updatePasswordReset(long userId, boolean passwordReset)
           
static void updatePortrait(long userId, byte[] bytes)
           
static void updateReminderQuery(long userId, String question, String answer)
           
static void updateScreenName(long userId, String screenName)
           
static User updateUser(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)
           
static User updateUser(User user)
          Updates the user in the database.
static User updateUser(User user, boolean merge)
          Updates the user in the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserLocalServiceUtil

public UserLocalServiceUtil()
Method Detail

addUser

public static User addUser(User user)
                    throws SystemException
Adds the user to the database. Also notifies the appropriate model listeners.

Parameters:
user - the user to add
Returns:
the user that was added
Throws:
SystemException - if a system exception occurred

createUser

public static User createUser(long userId)
Creates a new user with the primary key. Does not add the user to the database.

Parameters:
userId - the primary key for the new user
Returns:
the new user

deleteUser

public static void deleteUser(long userId)
                       throws PortalException,
                              SystemException
Deletes the user with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
userId - the primary key of the user to delete
Throws:
PortalException - if a user with the primary key could not be found
SystemException - if a system exception occurred

deleteUser

public static void deleteUser(User user)
                       throws SystemException
Deletes the user from the database. Also notifies the appropriate model listeners.

Parameters:
user - the user to delete
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery)
                         throws SystemException
Performs a dynamic query on the database and returns the matching rows.

Parameters:
dynamicQuery - the dynamic query to search with
Returns:
the matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery,
                                int start,
                                int end)
                         throws SystemException
Performs a dynamic query on the database and returns a range of the matching rows.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
dynamicQuery - the dynamic query to search with
start - the lower bound of the range of model instances to return
end - the upper bound of the range of model instances to return (not inclusive)
Returns:
the range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery,
                                int start,
                                int end,
                                OrderByComparator orderByComparator)
                         throws SystemException
Performs a dynamic query on the database and returns an ordered range of the matching rows.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
dynamicQuery - the dynamic query to search with
start - the lower bound of the range of model instances to return
end - the upper bound of the range of model instances to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery)
                              throws SystemException
Counts the number of rows that match the dynamic query.

Parameters:
dynamicQuery - the dynamic query to search with
Returns:
the number of rows that match the dynamic query
Throws:
SystemException - if a system exception occurred

getUser

public static User getUser(long userId)
                    throws PortalException,
                           SystemException
Gets the user with the primary key.

Parameters:
userId - the primary key of the user to get
Returns:
the user
Throws:
PortalException - if a user with the primary key could not be found
SystemException - if a system exception occurred

getUsers

public static List<User> getUsers(int start,
                                  int end)
                           throws SystemException
Gets a range of all the users.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
Returns:
the range of users
Throws:
SystemException - if a system exception occurred

getUsersCount

public static int getUsersCount()
                         throws SystemException
Gets the number of users.

Returns:
the number of users
Throws:
SystemException - if a system exception occurred

updateUser

public static User updateUser(User user)
                       throws SystemException
Updates the user in the database. Also notifies the appropriate model listeners.

Parameters:
user - the user to update
Returns:
the user that was updated
Throws:
SystemException - if a system exception occurred

updateUser

public static User updateUser(User user,
                              boolean merge)
                       throws SystemException
Updates the user in the database. Also notifies the appropriate model listeners.

Parameters:
user - the user to update
merge - whether to merge the user with the current session. See BatchSession.update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean) for an explanation.
Returns:
the user that was updated
Throws:
SystemException - if a system exception occurred

addDefaultGroups

public static void addDefaultGroups(long userId)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

addDefaultRoles

public static void addDefaultRoles(long userId)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

addDefaultUserGroups

public static void addDefaultUserGroups(long userId)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

addGroupUsers

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

addOrganizationUsers

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

addPasswordPolicyUsers

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

addRoleUsers

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

addTeamUsers

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

addUser

public static User addUser(long creatorUserId,
                           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

addUserGroupUsers

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

authenticateByEmailAddress

public static int authenticateByEmailAddress(long companyId,
                                             String emailAddress,
                                             String password,
                                             Map<String,String[]> headerMap,
                                             Map<String,String[]> parameterMap)
                                      throws PortalException,
                                             SystemException
Throws:
PortalException
SystemException

authenticateByScreenName

public static int authenticateByScreenName(long companyId,
                                           String screenName,
                                           String password,
                                           Map<String,String[]> headerMap,
                                           Map<String,String[]> parameterMap)
                                    throws PortalException,
                                           SystemException
Throws:
PortalException
SystemException

authenticateByUserId

public static int authenticateByUserId(long companyId,
                                       long userId,
                                       String password,
                                       Map<String,String[]> headerMap,
                                       Map<String,String[]> parameterMap)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

authenticateForBasic

public static long authenticateForBasic(long companyId,
                                        String authType,
                                        String login,
                                        String password)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

authenticateForDigest

public static long authenticateForDigest(long companyId,
                                         String username,
                                         String realm,
                                         String nonce,
                                         String method,
                                         String uri,
                                         String response)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException

authenticateForJAAS

public static boolean authenticateForJAAS(long userId,
                                          String encPassword)

checkLockout

public static void checkLockout(User user)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

checkLoginFailure

public static void checkLoginFailure(User user)
                              throws SystemException
Throws:
SystemException

checkLoginFailureByEmailAddress

public static void checkLoginFailureByEmailAddress(long companyId,
                                                   String emailAddress)
                                            throws PortalException,
                                                   SystemException
Throws:
PortalException
SystemException

checkLoginFailureById

public static void checkLoginFailureById(long userId)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException

checkLoginFailureByScreenName

public static void checkLoginFailureByScreenName(long companyId,
                                                 String screenName)
                                          throws PortalException,
                                                 SystemException
Throws:
PortalException
SystemException

checkPasswordExpired

public static void checkPasswordExpired(User user)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

decryptUserId

public static KeyValuePair decryptUserId(long companyId,
                                         String name,
                                         String password)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException

deletePortrait

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

deleteRoleUser

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

encryptUserId

public static String encryptUserId(String name)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

getCompanyUsers

public static List<User> getCompanyUsers(long companyId,
                                         int start,
                                         int end)
                                  throws SystemException
Throws:
SystemException

getCompanyUsersCount

public static int getCompanyUsersCount(long companyId)
                                throws SystemException
Throws:
SystemException

getDefaultUser

public static User getDefaultUser(long companyId)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

getDefaultUserId

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

getGroupUserIds

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

getGroupUsers

public static List<User> getGroupUsers(long groupId)
                                throws SystemException
Throws:
SystemException

getGroupUsersCount

public static int getGroupUsersCount(long groupId)
                              throws SystemException
Throws:
SystemException

getGroupUsersCount

public static int getGroupUsersCount(long groupId,
                                     boolean active)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

getNoAnnouncementsDeliveries

public static List<User> getNoAnnouncementsDeliveries(String type)
                                               throws SystemException
Throws:
SystemException

getNoContacts

public static List<User> getNoContacts()
                                throws SystemException
Throws:
SystemException

getNoGroups

public static List<User> getNoGroups()
                              throws SystemException
Throws:
SystemException

getOrganizationUserIds

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

getOrganizationUsers

public static List<User> getOrganizationUsers(long organizationId)
                                       throws SystemException
Throws:
SystemException

getOrganizationUsersCount

public static int getOrganizationUsersCount(long organizationId)
                                     throws SystemException
Throws:
SystemException

getOrganizationUsersCount

public static int getOrganizationUsersCount(long organizationId,
                                            boolean active)
                                     throws PortalException,
                                            SystemException
Throws:
PortalException
SystemException

getRoleUserIds

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

getRoleUsers

public static List<User> getRoleUsers(long roleId)
                               throws SystemException
Throws:
SystemException

getRoleUsers

public static List<User> getRoleUsers(long roleId,
                                      int start,
                                      int end)
                               throws SystemException
Throws:
SystemException

getRoleUsersCount

public static int getRoleUsersCount(long roleId)
                             throws SystemException
Throws:
SystemException

getRoleUsersCount

public static int getRoleUsersCount(long roleId,
                                    boolean active)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

getSocialUsers

public static List<User> getSocialUsers(long userId,
                                        int type,
                                        int start,
                                        int end,
                                        OrderByComparator obc)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getSocialUsers

public static List<User> getSocialUsers(long userId,
                                        int start,
                                        int end,
                                        OrderByComparator obc)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getSocialUsers

public static List<User> getSocialUsers(long userId1,
                                        long userId2,
                                        int type,
                                        int start,
                                        int end,
                                        OrderByComparator obc)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getSocialUsers

public static List<User> getSocialUsers(long userId1,
                                        long userId2,
                                        int start,
                                        int end,
                                        OrderByComparator obc)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getSocialUsersCount

public static int getSocialUsersCount(long userId)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

getSocialUsersCount

public static int getSocialUsersCount(long userId,
                                      int type)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

getSocialUsersCount

public static int getSocialUsersCount(long userId1,
                                      long userId2)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

getSocialUsersCount

public static int getSocialUsersCount(long userId1,
                                      long userId2,
                                      int type)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

getUserByContactId

public static User getUserByContactId(long contactId)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

getUserByEmailAddress

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

getUserByFacebookId

public static User getUserByFacebookId(long companyId,
                                       long facebookId)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

getUserById

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

getUserById

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

getUserByOpenId

public static User getUserByOpenId(long companyId,
                                   String openId)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

getUserByPortraitId

public static User getUserByPortraitId(long portraitId)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

getUserByScreenName

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

getUserByUuid

public static User getUserByUuid(String uuid)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

getUserGroupUsers

public static List<User> getUserGroupUsers(long userGroupId)
                                    throws SystemException
Throws:
SystemException

getUserGroupUsersCount

public static int getUserGroupUsersCount(long userGroupId)
                                  throws SystemException
Throws:
SystemException

getUserGroupUsersCount

public static int getUserGroupUsersCount(long userGroupId,
                                         boolean active)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException

getUserIdByEmailAddress

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

getUserIdByScreenName

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

hasGroupUser

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

hasOrganizationUser

public static boolean hasOrganizationUser(long organizationId,
                                          long userId)
                                   throws SystemException
Throws:
SystemException

hasPasswordPolicyUser

public static boolean hasPasswordPolicyUser(long passwordPolicyId,
                                            long userId)
                                     throws SystemException
Throws:
SystemException

hasRoleUser

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

hasRoleUser

public static boolean hasRoleUser(long companyId,
                                  String name,
                                  long userId,
                                  boolean inherited)
                           throws PortalException,
                                  SystemException
Returns true if the user has the role.

Returns:
true if the user has the role
Throws:
PortalException
SystemException

hasTeamUser

public static boolean hasTeamUser(long teamId,
                                  long userId)
                           throws SystemException
Throws:
SystemException

hasUserGroupUser

public static boolean hasUserGroupUser(long userGroupId,
                                       long userId)
                                throws SystemException
Throws:
SystemException

isPasswordExpired

public static boolean isPasswordExpired(User user)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

isPasswordExpiringSoon

public static boolean isPasswordExpiringSoon(User user)
                                      throws PortalException,
                                             SystemException
Throws:
PortalException
SystemException

search

public static List<User> search(long companyId,
                                String keywords,
                                Boolean active,
                                LinkedHashMap<String,Object> params,
                                int start,
                                int end,
                                OrderByComparator obc)
                         throws SystemException
Throws:
SystemException

search

public static Hits search(long companyId,
                          String keywords,
                          Boolean active,
                          LinkedHashMap<String,Object> params,
                          int start,
                          int end,
                          Sort sort)
                   throws SystemException
Throws:
SystemException

search

public static List<User> search(long companyId,
                                String firstName,
                                String middleName,
                                String lastName,
                                String screenName,
                                String emailAddress,
                                Boolean active,
                                LinkedHashMap<String,Object> params,
                                boolean andSearch,
                                int start,
                                int end,
                                OrderByComparator obc)
                         throws SystemException
Throws:
SystemException

search

public static Hits search(long companyId,
                          String firstName,
                          String middleName,
                          String lastName,
                          String screenName,
                          String emailAddress,
                          Boolean active,
                          LinkedHashMap<String,Object> params,
                          boolean andSearch,
                          int start,
                          int end,
                          Sort sort)
                   throws SystemException
Throws:
SystemException

searchCount

public static int searchCount(long companyId,
                              String keywords,
                              Boolean active,
                              LinkedHashMap<String,Object> params)
                       throws SystemException
Throws:
SystemException

searchCount

public static int searchCount(long companyId,
                              String firstName,
                              String middleName,
                              String lastName,
                              String screenName,
                              String emailAddress,
                              Boolean active,
                              LinkedHashMap<String,Object> params,
                              boolean andSearch)
                       throws SystemException
Throws:
SystemException

sendPassword

public static void sendPassword(long companyId,
                                String emailAddress,
                                String remoteAddr,
                                String remoteHost,
                                String userAgent,
                                String fromName,
                                String fromAddress,
                                String subject,
                                String body,
                                ServiceContext serviceContext)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

setRoleUsers

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

setUserGroupUsers

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

unsetGroupUsers

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

unsetOrganizationUsers

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

unsetPasswordPolicyUsers

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

unsetRoleUsers

public static void unsetRoleUsers(long roleId,
                                  List<User> users)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

unsetRoleUsers

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

unsetTeamUsers

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

unsetUserGroupUsers

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

updateActive

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

updateAgreedToTermsOfUse

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

updateAsset

public static void updateAsset(long userId,
                               User user,
                               long[] assetCategoryIds,
                               String[] assetTagNames)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

updateCreateDate

public static User updateCreateDate(long userId,
                                    Date createDate)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

updateEmailAddress

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

updateGroups

public static void updateGroups(long userId,
                                long[] newGroupIds)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

updateLastLogin

public static User updateLastLogin(long userId,
                                   String loginIP)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

updateLockout

public static User updateLockout(User user,
                                 boolean lockout)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

updateLockoutByEmailAddress

public static User updateLockoutByEmailAddress(long companyId,
                                               String emailAddress,
                                               boolean lockout)
                                        throws PortalException,
                                               SystemException
Throws:
PortalException
SystemException

updateLockoutById

public static User updateLockoutById(long userId,
                                     boolean lockout)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

updateLockoutByScreenName

public static User updateLockoutByScreenName(long companyId,
                                             String screenName,
                                             boolean lockout)
                                      throws PortalException,
                                             SystemException
Throws:
PortalException
SystemException

updateModifiedDate

public static User updateModifiedDate(long userId,
                                      Date modifiedDate)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

updateOpenId

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

updateOrganizations

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

updatePassword

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

updatePassword

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

updatePasswordManually

public static User updatePasswordManually(long userId,
                                          String password,
                                          boolean passwordEncrypted,
                                          boolean passwordReset,
                                          Date passwordModifiedDate)
                                   throws PortalException,
                                          SystemException
Throws:
PortalException
SystemException

updatePasswordReset

public static void updatePasswordReset(long userId,
                                       boolean passwordReset)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

updatePortrait

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

updateReminderQuery

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

updateScreenName

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

updateUser

public static User updateUser(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

getService

public static UserLocalService getService()

setService

public void setService(UserLocalService service)

Liferay 6.0.5