|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.liferay.portal.service.base.UserGroupLocalServiceBaseImpl
com.liferay.portal.service.impl.UserGroupLocalServiceImpl
public class UserGroupLocalServiceImpl
The implementation of the user group local service.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
UserGroupLocalServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
addGroupUserGroups(long groupId,
long[] userGroupIds)
Adds the user groups to the group. |
void |
addTeamUserGroups(long teamId,
long[] userGroupIds)
Adds the user groups to the team. |
com.liferay.portal.model.UserGroup |
addUserGroup(long userId,
long companyId,
java.lang.String name,
java.lang.String description)
Adds a user group. |
void |
clearUserUserGroups(long userId)
Clears all associations between the user and its user groups and clears the permissions cache. |
void |
copyUserGroupLayouts(long[] userGroupIds,
long userId)
Deprecated. |
void |
copyUserGroupLayouts(long userGroupId,
long userId)
Deprecated. |
void |
copyUserGroupLayouts(long userGroupId,
long[] userIds)
Deprecated. |
void |
deleteUserGroup(long userGroupId)
Deletes the user group. |
void |
deleteUserGroup(com.liferay.portal.model.UserGroup userGroup)
Deletes the user group. |
protected java.io.File[] |
exportLayouts(long userGroupId,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap)
|
protected java.util.Map<java.lang.String,java.lang.String[]> |
getLayoutTemplatesParameters()
|
com.liferay.portal.model.UserGroup |
getUserGroup(long userGroupId)
Returns the user group with the primary key. |
com.liferay.portal.model.UserGroup |
getUserGroup(long companyId,
java.lang.String name)
Returns the user group with the name. |
java.util.List<com.liferay.portal.model.UserGroup> |
getUserGroups(long companyId)
Returns all the user groups belonging to the company. |
java.util.List<com.liferay.portal.model.UserGroup> |
getUserGroups(long[] userGroupIds)
Returns all the user groups with the primary keys. |
java.util.List<com.liferay.portal.model.UserGroup> |
getUserUserGroups(long userId)
Returns all the user groups to which the user belongs. |
boolean |
hasGroupUserGroup(long groupId,
long userGroupId)
Returns true if the user group is associated with the group. |
boolean |
hasTeamUserGroup(long teamId,
long userGroupId)
Returns true if the user group belongs to the team. |
protected void |
importLayouts(long userId,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.io.File privateLayoutsFile,
java.io.File publicLayoutsFile)
|
java.util.List<com.liferay.portal.model.UserGroup> |
search(long companyId,
java.lang.String name,
java.lang.String description,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
Returns an ordered range of all the user groups that match the name and description. |
int |
searchCount(long companyId,
java.lang.String name,
java.lang.String description,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params)
Returns the number of user groups that match the name and description. |
void |
setUserUserGroups(long userId,
long[] userGroupIds)
Sets the user groups associated with the user copying the user group layouts and removing and adding user group associations for the user as necessary. |
void |
unsetGroupUserGroups(long groupId,
long[] userGroupIds)
Removes the user groups from the group. |
void |
unsetTeamUserGroups(long teamId,
long[] userGroupIds)
Removes the user groups from the team. |
com.liferay.portal.model.UserGroup |
updateUserGroup(long companyId,
long userGroupId,
java.lang.String name,
java.lang.String description)
Updates the user group. |
protected void |
validate(long userGroupId,
long companyId,
java.lang.String name)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserGroupLocalServiceImpl()
| Method Detail |
|---|
public void addGroupUserGroups(long groupId,
long[] userGroupIds)
throws com.liferay.portal.kernel.exception.SystemException
groupId - the primary key of the groupuserGroupIds - the primary keys of the user groups
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public void addTeamUserGroups(long teamId,
long[] userGroupIds)
throws com.liferay.portal.kernel.exception.SystemException
teamId - the primary key of the teamuserGroupIds - the primary keys of the user groups
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public com.liferay.portal.model.UserGroup addUserGroup(long userId,
long companyId,
java.lang.String name,
java.lang.String description)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
This method handles the creation and bookkeeping of the user group, including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to setup default groups and resources for the user group.
userId - the primary key of the usercompanyId - the primary key of the user group's companyname - the user group's namedescription - the user group's description
com.liferay.portal.kernel.exception.PortalException - if the user group's information was invalid
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public void clearUserUserGroups(long userId)
throws com.liferay.portal.kernel.exception.SystemException
This method is called from deleteUserGroup(UserGroup).
userId - the primary key of the user
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public void copyUserGroupLayouts(long userGroupId,
long[] userIds)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
userGroupId - the primary key of the user groupuserIds - the primary keys of the users
com.liferay.portal.kernel.exception.PortalException - if any one of the users could not be found or
if a portal exception occurred
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public void copyUserGroupLayouts(long[] userGroupIds,
long userId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
userGroupIds - the primary keys of the user groupsuserId - the primary key of the user
com.liferay.portal.kernel.exception.PortalException - if a user with the primary key could not be
found or if a portal exception occurred
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public void copyUserGroupLayouts(long userGroupId,
long userId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
userGroupId - the primary key of the user groupuserId - the primary key of the user
com.liferay.portal.kernel.exception.PortalException - if a user with the primary key could not be
found or if a portal exception occurred
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public void deleteUserGroup(long userGroupId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
deleteUserGroup in interface com.liferay.portal.service.UserGroupLocalServicedeleteUserGroup in class UserGroupLocalServiceBaseImpluserGroupId - the primary key of the user group
com.liferay.portal.kernel.exception.PortalException - if a user group with the primary key could not be
found or if the user group had a workflow in approved status
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public void deleteUserGroup(com.liferay.portal.model.UserGroup userGroup)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
deleteUserGroup in interface com.liferay.portal.service.UserGroupLocalServicedeleteUserGroup in class UserGroupLocalServiceBaseImpluserGroup - the user group
com.liferay.portal.kernel.exception.PortalException - if the organization had a workflow in approved
status
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public com.liferay.portal.model.UserGroup getUserGroup(long userGroupId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
getUserGroup in interface com.liferay.portal.service.UserGroupLocalServicegetUserGroup in class UserGroupLocalServiceBaseImpluserGroupId - the primary key of the user group
com.liferay.portal.kernel.exception.PortalException - if a user group with the primary key could not be
found
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public com.liferay.portal.model.UserGroup getUserGroup(long companyId,
java.lang.String name)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
companyId - the primary key of the user group's companyname - the user group's name
com.liferay.portal.kernel.exception.PortalException - if a user group with the name could not be found
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(long companyId)
throws com.liferay.portal.kernel.exception.SystemException
companyId - the primary key of the user groups' company
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(long[] userGroupIds)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
userGroupIds - the primary keys of the user groups
com.liferay.portal.kernel.exception.PortalException - if any one of the user groups could not be found
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(long userId)
throws com.liferay.portal.kernel.exception.SystemException
userId - the primary key of the user
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public boolean hasGroupUserGroup(long groupId,
long userGroupId)
throws com.liferay.portal.kernel.exception.SystemException
true if the user group is associated with the group.
groupId - the primary key of the groupuserGroupId - the primary key of the user group
true if the user group belongs to the group;
false otherwise
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public boolean hasTeamUserGroup(long teamId,
long userGroupId)
throws com.liferay.portal.kernel.exception.SystemException
true if the user group belongs to the team.
teamId - the primary key of the teamuserGroupId - the primary key of the user group
true if the user group belongs to the team;
false otherwise
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public java.util.List<com.liferay.portal.model.UserGroup> search(long companyId,
java.lang.String name,
java.lang.String description,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.kernel.exception.SystemException
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.
companyId - the primary key of the user group's companyname - the user group's name (optionally null)description - the user group's description (optionally
null)params - the finder params (optionally null). For more
information see UserGroupFinderstart - the lower bound of the range of user groups to returnend - the upper bound of the range of user groups to return (not
inclusive)obc - the comparator to order the user groups (optionally
null)
obc
com.liferay.portal.kernel.exception.SystemException - if a system exception occurredUserGroupFinder
public int searchCount(long companyId,
java.lang.String name,
java.lang.String description,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params)
throws com.liferay.portal.kernel.exception.SystemException
companyId - the primary key of the user group's companyname - the user group's name (optionally null)description - the user group's description (optionally
null)params - the finder params (optionally null). For more
information see UserGroupFinder
com.liferay.portal.kernel.exception.SystemException - if a system exception occurredUserGroupFinder
public void setUserUserGroups(long userId,
long[] userGroupIds)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
userId - the primary key of the useruserGroupIds - the primary keys of the user groups
com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public void unsetGroupUserGroups(long groupId,
long[] userGroupIds)
throws com.liferay.portal.kernel.exception.SystemException
groupId - the primary key of the groupuserGroupIds - the primary keys of the user groups
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public void unsetTeamUserGroups(long teamId,
long[] userGroupIds)
throws com.liferay.portal.kernel.exception.SystemException
teamId - the primary key of the teamuserGroupIds - the primary keys of the user groups
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
public com.liferay.portal.model.UserGroup updateUserGroup(long companyId,
long userGroupId,
java.lang.String name,
java.lang.String description)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
companyId - the primary key of the user group's companyuserGroupId - the primary key of the user groupname - the user group's namedescription - the user group's description
com.liferay.portal.kernel.exception.PortalException - if a user group with the primary key could not be
found or if the new information was invalid
com.liferay.portal.kernel.exception.SystemException - if a system exception occurred
protected java.io.File[] exportLayouts(long userGroupId,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemExceptionprotected java.util.Map<java.lang.String,java.lang.String[]> getLayoutTemplatesParameters()
protected void importLayouts(long userId,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.io.File privateLayoutsFile,
java.io.File publicLayoutsFile)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
protected void validate(long userGroupId,
long companyId,
java.lang.String name)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||