Liferay 6.1.2-ce-ga3

com.liferay.portal.service.impl
Class UserGroupLocalServiceImpl

java.lang.Object
  extended by com.liferay.portal.service.BaseLocalServiceImpl
      extended by com.liferay.portal.service.base.UserGroupLocalServiceBaseImpl
          extended by com.liferay.portal.service.impl.UserGroupLocalServiceImpl
All Implemented Interfaces:
IdentifiableBean, BaseLocalService, PersistedModelLocalService, UserGroupLocalService

public class UserGroupLocalServiceImpl
extends UserGroupLocalServiceBaseImpl

The implementation of the user group local service.


Field Summary
 
Fields inherited from class com.liferay.portal.service.base.UserGroupLocalServiceBaseImpl
accountLocalService, accountPersistence, accountService, addressLocalService, addressPersistence, addressService, browserTrackerLocalService, browserTrackerPersistence, classNameLocalService, classNamePersistence, classNameService, clusterGroupLocalService, clusterGroupPersistence, cmisRepositoryLocalService, companyLocalService, companyPersistence, companyService, contactLocalService, contactPersistence, contactService, counterLocalService, countryPersistence, countryService, emailAddressLocalService, emailAddressPersistence, emailAddressService, groupFinder, groupLocalService, groupPersistence, groupService, imageLocalService, imagePersistence, imageService, layoutBranchLocalService, layoutBranchPersistence, layoutBranchService, layoutFinder, layoutLocalService, layoutPersistence, layoutPrototypeLocalService, layoutPrototypePersistence, layoutPrototypeService, layoutRevisionLocalService, layoutRevisionPersistence, layoutRevisionService, layoutService, layoutSetBranchLocalService, layoutSetBranchPersistence, layoutSetBranchService, layoutSetLocalService, layoutSetPersistence, layoutSetPrototypeLocalService, layoutSetPrototypePersistence, layoutSetPrototypeService, layoutSetService, layoutTemplateLocalService, listTypePersistence, listTypeService, lockFinder, lockLocalService, lockPersistence, membershipRequestLocalService, membershipRequestPersistence, membershipRequestService, organizationFinder, organizationLocalService, organizationPersistence, organizationService, orgGroupPermissionFinder, orgGroupPermissionPersistence, orgGroupRolePersistence, orgLaborLocalService, orgLaborPersistence, orgLaborService, passwordPolicyFinder, passwordPolicyLocalService, passwordPolicyPersistence, passwordPolicyRelLocalService, passwordPolicyRelPersistence, passwordPolicyService, passwordTrackerLocalService, passwordTrackerPersistence, permissionFinder, permissionLocalService, permissionPersistence, permissionService, persistedModelLocalServiceRegistry, phoneLocalService, phonePersistence, phoneService, pluginSettingLocalService, pluginSettingPersistence, pluginSettingService, portalLocalService, portalPreferencesLocalService, portalPreferencesPersistence, portalService, portletItemLocalService, portletItemPersistence, portletLocalService, portletPersistence, portletPreferencesFinder, portletPreferencesLocalService, portletPreferencesPersistence, portletPreferencesService, portletService, quartzLocalService, regionPersistence, regionService, releaseLocalService, releasePersistence, repositoryEntryLocalService, repositoryEntryPersistence, repositoryLocalService, repositoryPersistence, repositoryService, resourceActionLocalService, resourceActionPersistence, resourceBlockFinder, resourceBlockLocalService, resourceBlockPermissionLocalService, resourceBlockPermissionPersistence, resourceBlockPersistence, resourceBlockService, resourceCodeLocalService, resourceCodePersistence, resourceFinder, resourceLocalService, resourcePermissionFinder, resourcePermissionLocalService, resourcePermissionPersistence, resourcePermissionService, resourcePersistence, resourceService, resourceTypePermissionFinder, resourceTypePermissionLocalService, resourceTypePermissionPersistence, roleFinder, roleLocalService, rolePersistence, roleService, serviceComponentLocalService, serviceComponentPersistence, shardLocalService, shardPersistence, subscriptionLocalService, subscriptionPersistence, teamFinder, teamLocalService, teamPersistence, teamService, themeLocalService, themeService, ticketLocalService, ticketPersistence, userFinder, userGroupFinder, userGroupGroupRoleLocalService, userGroupGroupRolePersistence, userGroupGroupRoleService, userGroupLocalService, userGroupPersistence, userGroupRoleFinder, userGroupRoleLocalService, userGroupRolePersistence, userGroupRoleService, userGroupService, userIdMapperLocalService, userIdMapperPersistence, userLocalService, userNotificationEventLocalService, userNotificationEventPersistence, userPersistence, userService, userTrackerLocalService, userTrackerPathLocalService, userTrackerPathPersistence, userTrackerPersistence, virtualHostLocalService, virtualHostPersistence, webDAVPropsLocalService, webDAVPropsPersistence, websiteLocalService, websitePersistence, websiteService, workflowDefinitionLinkLocalService, workflowDefinitionLinkPersistence, workflowInstanceLinkLocalService, workflowInstanceLinkPersistence
 
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.
 UserGroup addUserGroup(long userId, long companyId, String name, 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.  
 UserGroup deleteUserGroup(long userGroupId)
          Deletes the user group.
 UserGroup deleteUserGroup(UserGroup userGroup)
          Deletes the user group.
protected  File[] exportLayouts(long userGroupId, Map<String,String[]> parameterMap)
           
protected  Map<String,String[]> getLayoutTemplatesParameters()
           
 UserGroup getUserGroup(long companyId, String name)
          Returns the user group with the name.
 List<UserGroup> getUserGroups(long companyId)
          Returns all the user groups belonging to the company.
 List<UserGroup> getUserGroups(long[] userGroupIds)
          Returns all the user groups with the primary keys.
 List<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, Map<String,String[]> parameterMap, File privateLayoutsFile, File publicLayoutsFile)
           
 List<UserGroup> search(long companyId, String keywords, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator obc)
           
 List<UserGroup> search(long companyId, String name, String description, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator obc)
          Returns an ordered range of all the user groups that match the name and description.
 int searchCount(long companyId, String keywords, LinkedHashMap<String,Object> params)
           
 int searchCount(long companyId, String name, String description, LinkedHashMap<String,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.
 UserGroup updateUserGroup(long companyId, long userGroupId, String name, String description)
          Updates the user group.
protected  void validate(long userGroupId, long companyId, String name)
           
 
Methods inherited from class com.liferay.portal.service.base.UserGroupLocalServiceBaseImpl
addGroupUserGroup, addGroupUserGroup, addGroupUserGroups, addTeamUserGroup, addTeamUserGroup, addTeamUserGroups, addUserGroup, addUserUserGroup, addUserUserGroup, addUserUserGroups, addUserUserGroups, afterPropertiesSet, clearGroupUserGroups, clearTeamUserGroups, createUserGroup, deleteGroupUserGroup, deleteGroupUserGroup, deleteGroupUserGroups, deleteGroupUserGroups, deleteTeamUserGroup, deleteTeamUserGroup, deleteTeamUserGroups, deleteTeamUserGroups, deleteUserUserGroup, deleteUserUserGroup, deleteUserUserGroups, deleteUserUserGroups, destroy, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, fetchUserGroup, getAccountLocalService, getAccountPersistence, getAccountService, getAddressLocalService, getAddressPersistence, getAddressService, getBeanIdentifier, getBrowserTrackerLocalService, getBrowserTrackerPersistence, getClassNameLocalService, getClassNamePersistence, getClassNameService, getClusterGroupLocalService, getClusterGroupPersistence, getCMISRepositoryLocalService, getCompanyLocalService, getCompanyPersistence, getCompanyService, getContactLocalService, getContactPersistence, getContactService, getCounterLocalService, getCountryPersistence, getCountryService, getEmailAddressLocalService, getEmailAddressPersistence, getEmailAddressService, getGroupFinder, getGroupLocalService, getGroupPersistence, getGroupService, getGroupUserGroups, getGroupUserGroups, getGroupUserGroups, getGroupUserGroupsCount, getImageLocalService, getImagePersistence, getImageService, getLayoutBranchLocalService, getLayoutBranchPersistence, getLayoutBranchService, getLayoutFinder, getLayoutLocalService, getLayoutPersistence, getLayoutPrototypeLocalService, getLayoutPrototypePersistence, getLayoutPrototypeService, getLayoutRevisionLocalService, getLayoutRevisionPersistence, getLayoutRevisionService, getLayoutService, getLayoutSetBranchLocalService, getLayoutSetBranchPersistence, getLayoutSetBranchService, getLayoutSetLocalService, getLayoutSetPersistence, getLayoutSetPrototypeLocalService, getLayoutSetPrototypePersistence, getLayoutSetPrototypeService, getLayoutSetService, getLayoutTemplateLocalService, getListTypePersistence, getListTypeService, getLockFinder, getLockLocalService, getLockPersistence, getMembershipRequestLocalService, getMembershipRequestPersistence, getMembershipRequestService, getModelClass, getModelClassName, getOrganizationFinder, getOrganizationLocalService, getOrganizationPersistence, getOrganizationService, getOrgGroupPermissionFinder, getOrgGroupPermissionPersistence, getOrgGroupRolePersistence, getOrgLaborLocalService, getOrgLaborPersistence, getOrgLaborService, getPasswordPolicyFinder, getPasswordPolicyLocalService, getPasswordPolicyPersistence, getPasswordPolicyRelLocalService, getPasswordPolicyRelPersistence, getPasswordPolicyService, getPasswordTrackerLocalService, getPasswordTrackerPersistence, getPermissionFinder, getPermissionLocalService, getPermissionPersistence, getPermissionService, getPersistedModel, getPhoneLocalService, getPhonePersistence, getPhoneService, getPluginSettingLocalService, getPluginSettingPersistence, getPluginSettingService, getPortalLocalService, getPortalPreferencesLocalService, getPortalPreferencesPersistence, getPortalService, getPortletItemLocalService, getPortletItemPersistence, getPortletLocalService, getPortletPersistence, getPortletPreferencesFinder, getPortletPreferencesLocalService, getPortletPreferencesPersistence, getPortletPreferencesService, getPortletService, getQuartzLocalService, getRegionPersistence, getRegionService, getReleaseLocalService, getReleasePersistence, getRepositoryEntryLocalService, getRepositoryEntryPersistence, getRepositoryLocalService, getRepositoryPersistence, getRepositoryService, getResourceActionLocalService, getResourceActionPersistence, getResourceBlockFinder, getResourceBlockLocalService, getResourceBlockPermissionLocalService, getResourceBlockPermissionPersistence, getResourceBlockPersistence, getResourceBlockService, getResourceCodeLocalService, getResourceCodePersistence, getResourceFinder, getResourceLocalService, getResourcePermissionFinder, getResourcePermissionLocalService, getResourcePermissionPersistence, getResourcePermissionService, getResourcePersistence, getResourceService, getResourceTypePermissionFinder, getResourceTypePermissionLocalService, getResourceTypePermissionPersistence, getRoleFinder, getRoleLocalService, getRolePersistence, getRoleService, getServiceComponentLocalService, getServiceComponentPersistence, getShardLocalService, getShardPersistence, getSubscriptionLocalService, getSubscriptionPersistence, getTeamFinder, getTeamLocalService, getTeamPersistence, getTeamService, getTeamUserGroups, getTeamUserGroups, getTeamUserGroups, getTeamUserGroupsCount, getThemeLocalService, getThemeService, getTicketLocalService, getTicketPersistence, getUserFinder, getUserGroup, getUserGroupFinder, getUserGroupGroupRoleLocalService, getUserGroupGroupRolePersistence, getUserGroupGroupRoleService, getUserGroupLocalService, getUserGroupPersistence, getUserGroupRoleFinder, getUserGroupRoleLocalService, getUserGroupRolePersistence, getUserGroupRoleService, getUserGroups, getUserGroupsCount, getUserGroupService, getUserIdMapperLocalService, getUserIdMapperPersistence, getUserLocalService, getUserNotificationEventLocalService, getUserNotificationEventPersistence, getUserPersistence, getUserService, getUserTrackerLocalService, getUserTrackerPathLocalService, getUserTrackerPathPersistence, getUserTrackerPersistence, getUserUserGroups, getUserUserGroups, getUserUserGroupsCount, getVirtualHostLocalService, getVirtualHostPersistence, getWebDAVPropsLocalService, getWebDAVPropsPersistence, getWebsiteLocalService, getWebsitePersistence, getWebsiteService, getWorkflowDefinitionLinkLocalService, getWorkflowDefinitionLinkPersistence, getWorkflowInstanceLinkLocalService, getWorkflowInstanceLinkPersistence, hasGroupUserGroups, hasTeamUserGroups, hasUserUserGroup, hasUserUserGroups, runSQL, setAccountLocalService, setAccountPersistence, setAccountService, setAddressLocalService, setAddressPersistence, setAddressService, setBeanIdentifier, setBrowserTrackerLocalService, setBrowserTrackerPersistence, setClassNameLocalService, setClassNamePersistence, setClassNameService, setClusterGroupLocalService, setClusterGroupPersistence, setCMISRepositoryLocalService, setCompanyLocalService, setCompanyPersistence, setCompanyService, setContactLocalService, setContactPersistence, setContactService, setCounterLocalService, setCountryPersistence, setCountryService, setEmailAddressLocalService, setEmailAddressPersistence, setEmailAddressService, setGroupFinder, setGroupLocalService, setGroupPersistence, setGroupService, setGroupUserGroups, setImageLocalService, setImagePersistence, setImageService, setLayoutBranchLocalService, setLayoutBranchPersistence, setLayoutBranchService, setLayoutFinder, setLayoutLocalService, setLayoutPersistence, setLayoutPrototypeLocalService, setLayoutPrototypePersistence, setLayoutPrototypeService, setLayoutRevisionLocalService, setLayoutRevisionPersistence, setLayoutRevisionService, setLayoutService, setLayoutSetBranchLocalService, setLayoutSetBranchPersistence, setLayoutSetBranchService, setLayoutSetLocalService, setLayoutSetPersistence, setLayoutSetPrototypeLocalService, setLayoutSetPrototypePersistence, setLayoutSetPrototypeService, setLayoutSetService, setLayoutTemplateLocalService, setListTypePersistence, setListTypeService, setLockFinder, setLockLocalService, setLockPersistence, setMembershipRequestLocalService, setMembershipRequestPersistence, setMembershipRequestService, setOrganizationFinder, setOrganizationLocalService, setOrganizationPersistence, setOrganizationService, setOrgGroupPermissionFinder, setOrgGroupPermissionPersistence, setOrgGroupRolePersistence, setOrgLaborLocalService, setOrgLaborPersistence, setOrgLaborService, setPasswordPolicyFinder, setPasswordPolicyLocalService, setPasswordPolicyPersistence, setPasswordPolicyRelLocalService, setPasswordPolicyRelPersistence, setPasswordPolicyService, setPasswordTrackerLocalService, setPasswordTrackerPersistence, setPermissionFinder, setPermissionLocalService, setPermissionPersistence, setPermissionService, setPhoneLocalService, setPhonePersistence, setPhoneService, setPluginSettingLocalService, setPluginSettingPersistence, setPluginSettingService, setPortalLocalService, setPortalPreferencesLocalService, setPortalPreferencesPersistence, setPortalService, setPortletItemLocalService, setPortletItemPersistence, setPortletLocalService, setPortletPersistence, setPortletPreferencesFinder, setPortletPreferencesLocalService, setPortletPreferencesPersistence, setPortletPreferencesService, setPortletService, setQuartzLocalService, setRegionPersistence, setRegionService, setReleaseLocalService, setReleasePersistence, setRepositoryEntryLocalService, setRepositoryEntryPersistence, setRepositoryLocalService, setRepositoryPersistence, setRepositoryService, setResourceActionLocalService, setResourceActionPersistence, setResourceBlockFinder, setResourceBlockLocalService, setResourceBlockPermissionLocalService, setResourceBlockPermissionPersistence, setResourceBlockPersistence, setResourceBlockService, setResourceCodeLocalService, setResourceCodePersistence, setResourceFinder, setResourceLocalService, setResourcePermissionFinder, setResourcePermissionLocalService, setResourcePermissionPersistence, setResourcePermissionService, setResourcePersistence, setResourceService, setResourceTypePermissionFinder, setResourceTypePermissionLocalService, setResourceTypePermissionPersistence, setRoleFinder, setRoleLocalService, setRolePersistence, setRoleService, setServiceComponentLocalService, setServiceComponentPersistence, setShardLocalService, setShardPersistence, setSubscriptionLocalService, setSubscriptionPersistence, setTeamFinder, setTeamLocalService, setTeamPersistence, setTeamService, setTeamUserGroups, setThemeLocalService, setThemeService, setTicketLocalService, setTicketPersistence, setUserFinder, setUserGroupFinder, setUserGroupGroupRoleLocalService, setUserGroupGroupRolePersistence, setUserGroupGroupRoleService, setUserGroupLocalService, setUserGroupPersistence, setUserGroupRoleFinder, setUserGroupRoleLocalService, setUserGroupRolePersistence, setUserGroupRoleService, setUserGroupService, setUserIdMapperLocalService, setUserIdMapperPersistence, setUserLocalService, setUserNotificationEventLocalService, setUserNotificationEventPersistence, setUserPersistence, setUserService, setUserTrackerLocalService, setUserTrackerPathLocalService, setUserTrackerPathPersistence, setUserTrackerPersistence, setVirtualHostLocalService, setVirtualHostPersistence, setWebDAVPropsLocalService, setWebDAVPropsPersistence, setWebsiteLocalService, setWebsitePersistence, setWebsiteService, setWorkflowDefinitionLinkLocalService, setWorkflowDefinitionLinkPersistence, setWorkflowInstanceLinkLocalService, setWorkflowInstanceLinkPersistence, updateUserGroup, updateUserGroup
 
Methods inherited from class com.liferay.portal.service.BaseLocalServiceImpl
getClassLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserGroupLocalServiceImpl

public UserGroupLocalServiceImpl()
Method Detail

addGroupUserGroups

public void addGroupUserGroups(long groupId,
                               long[] userGroupIds)
                        throws SystemException
Adds the user groups to the group.

Specified by:
addGroupUserGroups in interface UserGroupLocalService
Overrides:
addGroupUserGroups in class UserGroupLocalServiceBaseImpl
Parameters:
groupId - the primary key of the group
userGroupIds - the primary keys of the user groups
Throws:
SystemException - if a system exception occurred

addTeamUserGroups

public void addTeamUserGroups(long teamId,
                              long[] userGroupIds)
                       throws SystemException
Adds the user groups to the team.

Specified by:
addTeamUserGroups in interface UserGroupLocalService
Overrides:
addTeamUserGroups in class UserGroupLocalServiceBaseImpl
Parameters:
teamId - the primary key of the team
userGroupIds - the primary keys of the user groups
Throws:
SystemException - if a system exception occurred

addUserGroup

public UserGroup addUserGroup(long userId,
                              long companyId,
                              String name,
                              String description)
                       throws PortalException,
                              SystemException
Adds a user group.

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.

Parameters:
userId - the primary key of the user
companyId - the primary key of the user group's company
name - the user group's name
description - the user group's description
Returns:
the user group
Throws:
PortalException - if the user group's information was invalid
SystemException - if a system exception occurred

clearUserUserGroups

public void clearUserUserGroups(long userId)
                         throws SystemException
Clears all associations between the user and its user groups and clears the permissions cache.

This method is called from deleteUserGroup(UserGroup).

Specified by:
clearUserUserGroups in interface UserGroupLocalService
Overrides:
clearUserUserGroups in class UserGroupLocalServiceBaseImpl
Parameters:
userId - the primary key of the user
Throws:
SystemException - if a system exception occurred

copyUserGroupLayouts

public void copyUserGroupLayouts(long userGroupId,
                                 long userId)
                          throws PortalException,
                                 SystemException
Deprecated. 

Copies the user group's layout to the user.

Parameters:
userGroupId - the primary key of the user group
userId - the primary key of the user
Throws:
PortalException - if a user with the primary key could not be found or if a portal exception occurred
SystemException - if a system exception occurred

copyUserGroupLayouts

public void copyUserGroupLayouts(long userGroupId,
                                 long[] userIds)
                          throws PortalException,
                                 SystemException
Deprecated. 

Copies the user group's layouts to the users who are not already members of the user group.

Parameters:
userGroupId - the primary key of the user group
userIds - the primary keys of the users
Throws:
PortalException - if any one of the users could not be found or if a portal exception occurred
SystemException - if a system exception occurred

copyUserGroupLayouts

public void copyUserGroupLayouts(long[] userGroupIds,
                                 long userId)
                          throws PortalException,
                                 SystemException
Deprecated. 

Copies the user groups' layouts to the user.

Parameters:
userGroupIds - the primary keys of the user groups
userId - the primary key of the user
Throws:
PortalException - if a user with the primary key could not be found or if a portal exception occurred
SystemException - if a system exception occurred

deleteUserGroup

public UserGroup deleteUserGroup(long userGroupId)
                          throws PortalException,
                                 SystemException
Deletes the user group.

Specified by:
deleteUserGroup in interface UserGroupLocalService
Overrides:
deleteUserGroup in class UserGroupLocalServiceBaseImpl
Parameters:
userGroupId - the primary key of the user group
Returns:
the deleted user group
Throws:
PortalException - if a user group with the primary key could not be found or if the user group had a workflow in approved status
SystemException - if a system exception occurred

deleteUserGroup

public UserGroup deleteUserGroup(UserGroup userGroup)
                          throws PortalException,
                                 SystemException
Deletes the user group.

Specified by:
deleteUserGroup in interface UserGroupLocalService
Overrides:
deleteUserGroup in class UserGroupLocalServiceBaseImpl
Parameters:
userGroup - the user group
Returns:
the deleted user group
Throws:
PortalException - if the organization had a workflow in approved status
SystemException - if a system exception occurred

getUserGroup

public UserGroup getUserGroup(long companyId,
                              String name)
                       throws PortalException,
                              SystemException
Returns the user group with the name.

Parameters:
companyId - the primary key of the user group's company
name - the user group's name
Returns:
Returns the user group with the name
Throws:
PortalException - if a user group with the name could not be found
SystemException - if a system exception occurred

getUserGroups

public List<UserGroup> getUserGroups(long companyId)
                              throws SystemException
Returns all the user groups belonging to the company.

Parameters:
companyId - the primary key of the user groups' company
Returns:
the user groups belonging to the company
Throws:
SystemException - if a system exception occurred

getUserGroups

public List<UserGroup> getUserGroups(long[] userGroupIds)
                              throws PortalException,
                                     SystemException
Returns all the user groups with the primary keys.

Parameters:
userGroupIds - the primary keys of the user groups
Returns:
the user groups with the primary keys
Throws:
PortalException - if any one of the user groups could not be found
SystemException - if a system exception occurred

getUserUserGroups

public List<UserGroup> getUserUserGroups(long userId)
                                  throws SystemException
Returns all the user groups to which the user belongs.

Specified by:
getUserUserGroups in interface UserGroupLocalService
Overrides:
getUserUserGroups in class UserGroupLocalServiceBaseImpl
Parameters:
userId - the primary key of the user
Returns:
the user groups to which the user belongs
Throws:
SystemException - if a system exception occurred

hasGroupUserGroup

public boolean hasGroupUserGroup(long groupId,
                                 long userGroupId)
                          throws SystemException
Returns true if the user group is associated with the group.

Specified by:
hasGroupUserGroup in interface UserGroupLocalService
Overrides:
hasGroupUserGroup in class UserGroupLocalServiceBaseImpl
Parameters:
groupId - the primary key of the group
userGroupId - the primary key of the user group
Returns:
true if the user group belongs to the group; false otherwise
Throws:
SystemException - if a system exception occurred

hasTeamUserGroup

public boolean hasTeamUserGroup(long teamId,
                                long userGroupId)
                         throws SystemException
Returns true if the user group belongs to the team.

Specified by:
hasTeamUserGroup in interface UserGroupLocalService
Overrides:
hasTeamUserGroup in class UserGroupLocalServiceBaseImpl
Parameters:
teamId - the primary key of the team
userGroupId - the primary key of the user group
Returns:
true if the user group belongs to the team; false otherwise
Throws:
SystemException - if a system exception occurred

search

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

search

public List<UserGroup> search(long companyId,
                              String name,
                              String description,
                              LinkedHashMap<String,Object> params,
                              int start,
                              int end,
                              OrderByComparator obc)
                       throws SystemException
Returns an ordered range of all the user groups that match the name and description.

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:
companyId - the primary key of the user group's company
name - 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
start - the lower bound of the range of user groups to return
end - the upper bound of the range of user groups to return (not inclusive)
obc - the comparator to order the user groups (optionally null)
Returns:
the matching user groups ordered by comparator obc
Throws:
SystemException - if a system exception occurred
See Also:
UserGroupFinder

searchCount

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

searchCount

public int searchCount(long companyId,
                       String name,
                       String description,
                       LinkedHashMap<String,Object> params)
                throws SystemException
Returns the number of user groups that match the name and description.

Parameters:
companyId - the primary key of the user group's company
name - 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
Returns:
the number of matching user groups
Throws:
SystemException - if a system exception occurred
See Also:
UserGroupFinder

setUserUserGroups

public void setUserUserGroups(long userId,
                              long[] userGroupIds)
                       throws PortalException,
                              SystemException
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.

Specified by:
setUserUserGroups in interface UserGroupLocalService
Overrides:
setUserUserGroups in class UserGroupLocalServiceBaseImpl
Parameters:
userId - the primary key of the user
userGroupIds - the primary keys of the user groups
Throws:
PortalException - if a portal exception occurred
SystemException - if a system exception occurred

unsetGroupUserGroups

public void unsetGroupUserGroups(long groupId,
                                 long[] userGroupIds)
                          throws SystemException
Removes the user groups from the group.

Parameters:
groupId - the primary key of the group
userGroupIds - the primary keys of the user groups
Throws:
SystemException - if a system exception occurred

unsetTeamUserGroups

public void unsetTeamUserGroups(long teamId,
                                long[] userGroupIds)
                         throws SystemException
Removes the user groups from the team.

Parameters:
teamId - the primary key of the team
userGroupIds - the primary keys of the user groups
Throws:
SystemException - if a system exception occurred

updateUserGroup

public UserGroup updateUserGroup(long companyId,
                                 long userGroupId,
                                 String name,
                                 String description)
                          throws PortalException,
                                 SystemException
Updates the user group.

Parameters:
companyId - the primary key of the user group's company
userGroupId - the primary key of the user group
name - the user group's name
description - the user group's description
Returns:
the user group
Throws:
PortalException - if a user group with the primary key could not be found or if the new information was invalid
SystemException - if a system exception occurred

exportLayouts

protected File[] exportLayouts(long userGroupId,
                               Map<String,String[]> parameterMap)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

getLayoutTemplatesParameters

protected Map<String,String[]> getLayoutTemplatesParameters()

importLayouts

protected void importLayouts(long userId,
                             Map<String,String[]> parameterMap,
                             File privateLayoutsFile,
                             File publicLayoutsFile)
                      throws PortalException,
                             SystemException
Throws:
PortalException
SystemException

validate

protected void validate(long userGroupId,
                        long companyId,
                        String name)
                 throws PortalException,
                        SystemException
Throws:
PortalException
SystemException

Liferay 6.1.2-ce-ga3