|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.ejb.UserUtil
com.dotmarketing.cms.factories.PublicUserFactory
public class PublicUserFactory
| Field Summary |
|---|
| Fields inherited from class com.liferay.portal.ejb.UserUtil |
|---|
LISTENER, PERSISTENCE |
| Constructor Summary | |
|---|---|
PublicUserFactory()
|
|
| Method Summary | |
|---|---|
static com.liferay.portal.model.User |
findUserByEmail(java.lang.String email)
This method finds a User by email, if the user was not found it returns a null instance. |
static com.liferay.portal.model.User |
findUserByUserId(java.lang.String userId)
This method finds a User by userId, if the user was not found it returns a null instance. |
static java.util.List<com.liferay.portal.model.User> |
getAllUsers()
This metho return a list of all the existing users in the cms |
static com.liferay.portal.model.User |
getAnonymousUser()
This method return an anonymous user, created to manage the submitContent macro with no user logged in |
static long |
getCountUsersByNameOrEmail(java.lang.String filter)
This Method return the number of user that have a firstname, lastname or email like the filter string. |
static com.liferay.portal.model.User |
getDefaultUser()
This method return the default user of the system |
static com.liferay.portal.model.User |
getInstance()
Get a new empty instance of the user class |
static com.liferay.portal.model.User |
getInstance(java.lang.String email)
|
static com.liferay.portal.model.User |
getInstanceByUserId(java.lang.String userId)
Returns a fresh new user with a given userId. |
static com.liferay.portal.model.User |
getSystemUser()
|
static com.liferay.portal.model.User |
getUserByEmail(java.lang.String email)
This method finds a User by email, if the user was not found it returns a new user instance ready to be filled and stored. |
static com.liferay.portal.model.User |
getUserByUserId(java.lang.String userId)
This method finds a User by userId, if the user was not found it returns a new user instance ready to be filled and stored. |
static int |
getUserCountByName(java.lang.String filter)
This method return number of uses whose names are like the filter passed in. |
static java.lang.String |
getUserPictureURL(java.lang.String userId)
this method returns the user portrait image file path when it's exists |
static java.util.Map<java.lang.String,java.lang.Object> |
getUsersAnRolesByName(java.lang.String filter,
int start,
int limit)
Deprecated. |
static java.util.List<com.liferay.portal.model.User> |
getUsersByName(java.lang.String filter,
int start,
int limit)
This method return a list of users whose names are like the filter passed in. |
static java.util.List<com.liferay.portal.model.User> |
getUsersByNameOrEmail(java.lang.String filter,
int page,
int pageSize)
This metho return a a paginated list of user that have a firstname, lastname or email like the compare string passed |
static java.util.List<java.lang.String> |
getUsersTitle()
This method return all the posible title setted by the users. |
static boolean |
isACMSAdmin(com.liferay.portal.model.User user)
This method return true if the user parameter have CMS_ADMINISTRATOR_ROLE role associated |
static boolean |
isACMSPowerUser(com.liferay.portal.model.User user)
This method return true if the user parameter have CMS_ADMINISTRATOR_ROLE role associated |
static void |
save(com.liferay.portal.model.User u)
Save or update in db the user object |
static void |
saveUserPicture(com.liferay.portal.model.User user,
UserProxy userProxy,
Host host,
java.io.File uploadedFile)
creates/updates the user portrait, saving the image file on dotCMS especific asset folder, associating the uploaded image file to liferay portrais as well |
static java.util.HashMap<java.lang.String,java.lang.Object> |
searchUsersAndUsersProxy(java.lang.String firstName,
java.lang.String lastName,
java.lang.String title,
java.util.List<com.liferay.portal.model.Group> groups,
boolean showUserGroups,
java.util.List<com.liferay.portal.model.Role> roles,
boolean showUserRoles,
java.lang.String orderBy,
int page,
int pageSize)
This method return a paginated list of the info of user and user proxy that have a firstname, lastname, user proxy title, groups and roles. |
static boolean |
userExists(java.lang.String email)
Verify is exists a user with the specified email address |
| Methods inherited from class com.liferay.portal.ejb.UserUtil |
|---|
addGroup, addGroup, addGroups, addGroups, addRole, addRole, addRoles, addRoles, clearGroups, clearRoles, containsGroup, containsGroup, containsRole, containsRole, countByC_EA, countByC_P, countByC_U, countByCompanyId, create, findAll, findByC_EA, findByC_P_First, findByC_P_Last, findByC_P_PrevAndNext, findByC_P, findByC_P, findByC_P, findByC_U, findByCompanyId_First, findByCompanyId_Last, findByCompanyId_PrevAndNext, findByCompanyId, findByCompanyId, findByCompanyId, findByPrimaryKey, getGroups, getGroups, getGroups, getGroupsSize, getRoles, getRoles, getRoles, getRolesSize, remove, removeByC_EA, removeByC_P, removeByC_U, removeByCompanyId, removeGroup, removeGroup, removeGroups, removeGroups, removeRole, removeRole, removeRoles, removeRoles, setGroups, setGroups, setRoles, setRoles, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PublicUserFactory()
| Method Detail |
|---|
public static com.liferay.portal.model.User getInstance()
public static com.liferay.portal.model.User getInstance(java.lang.String email)
public static com.liferay.portal.model.User getInstanceByUserId(java.lang.String userId)
throws com.liferay.portal.PortalException
userId -
com.liferay.portal.PortalExceptionpublic static boolean userExists(java.lang.String email)
email - user email
public static com.liferay.portal.model.User getUserByEmail(java.lang.String email)
email -
public static com.liferay.portal.model.User getUserByUserId(java.lang.String userId)
email -
public static com.liferay.portal.model.User findUserByUserId(java.lang.String userId)
email -
public static com.liferay.portal.model.User findUserByEmail(java.lang.String email)
email -
public static void save(com.liferay.portal.model.User u)
u - teh user objectpublic static com.liferay.portal.model.User getDefaultUser()
public static com.liferay.portal.model.User getSystemUser()
throws DotDataException
DotDataExceptionpublic static java.util.List<com.liferay.portal.model.User> getAllUsers()
public static boolean isACMSAdmin(com.liferay.portal.model.User user)
user -
public static boolean isACMSPowerUser(com.liferay.portal.model.User user)
user -
public static long getCountUsersByNameOrEmail(java.lang.String filter)
filter - Compare string
public static java.util.List<com.liferay.portal.model.User> getUsersByNameOrEmail(java.lang.String filter,
int page,
int pageSize)
filter - compare stringpage - page to displaypageSize - number of element to show in the page
public static java.util.Map<java.lang.String,java.lang.Object> getUsersAnRolesByName(java.lang.String filter,
int start,
int limit)
throws DotRuntimeException
filter - compare stringstart - first element to displaylimit - max number of elements to show
DotRuntimeException
public static java.util.List<com.liferay.portal.model.User> getUsersByName(java.lang.String filter,
int start,
int limit)
throws DotRuntimeException
filter - compare string.start - is the first element to display.limit - is the maximum number of elements to get.
DotRuntimeException
public static int getUserCountByName(java.lang.String filter)
throws DotRuntimeException
filter - compare string.
DotRuntimeException
public static void saveUserPicture(com.liferay.portal.model.User user,
UserProxy userProxy,
Host host,
java.io.File uploadedFile)
throws java.lang.Exception
user - user to create/update portraituserProxy - user proxy object of the user parameterhost - host where resides the dotCMS asset folderuploadedFile - image file
java.lang.Exceptionpublic static java.lang.String getUserPictureURL(java.lang.String userId)
userId - user id of the user
public static java.util.HashMap<java.lang.String,java.lang.Object> searchUsersAndUsersProxy(java.lang.String firstName,
java.lang.String lastName,
java.lang.String title,
java.util.List<com.liferay.portal.model.Group> groups,
boolean showUserGroups,
java.util.List<com.liferay.portal.model.Role> roles,
boolean showUserRoles,
java.lang.String orderBy,
int page,
int pageSize)
firstName - compare stringlastName - compare stringtitle - compare stringgroups - list of groupsshowUserGroups - boolean. If true then a list of group names will returned in the result. This value will be automatically set to true if the parameter group list is greater than 0 or the order by parameter is ordered by group name.roles - list of rolesshowUserRoles - boolean. If true then a list of role names will returned in the result. This value will be automatically set to true if the parameter role list is greater than 0 or the order by parameter is ordered by role name.orderBy - how will be ordered the resultpage - page to displaypageSize - number of element to show in the page
public static java.util.List<java.lang.String> getUsersTitle()
public static com.liferay.portal.model.User getAnonymousUser()
throws DotDataException
DotDataException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||