Liferay 6.2-ce-ga5

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

Provides the local service for accessing, adding, deleting, and updating user groups.


Field Summary
 
Fields inherited from class com.liferay.portal.service.base.UserGroupLocalServiceBaseImpl
accountLocalService, accountPersistence, accountService, addressLocalService, addressPersistence, addressService, backgroundTaskLocalService, backgroundTaskPersistence, backgroundTaskService, browserTrackerLocalService, browserTrackerPersistence, classNameLocalService, classNamePersistence, classNameService, clusterGroupLocalService, clusterGroupPersistence, cmisRepositoryLocalService, companyLocalService, companyPersistence, companyService, contactLocalService, contactPersistence, contactService, counterLocalService, countryPersistence, countryService, emailAddressLocalService, emailAddressPersistence, emailAddressService, expandoRowLocalService, expandoRowPersistence, groupFinder, groupLocalService, groupPersistence, groupService, imageLocalService, imagePersistence, imageService, layoutBranchLocalService, layoutBranchPersistence, layoutBranchService, layoutFinder, layoutFriendlyURLLocalService, layoutFriendlyURLPersistence, 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, orgGroupRolePersistence, orgLaborLocalService, orgLaborPersistence, orgLaborService, passwordPolicyFinder, passwordPolicyLocalService, passwordPolicyPersistence, passwordPolicyRelLocalService, passwordPolicyRelPersistence, passwordPolicyService, passwordTrackerLocalService, passwordTrackerPersistence, 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, resourceLocalService, resourcePermissionFinder, resourcePermissionLocalService, resourcePermissionPersistence, resourcePermissionService, resourceTypePermissionFinder, resourceTypePermissionLocalService, resourceTypePermissionPersistence, roleFinder, roleLocalService, rolePersistence, roleService, serviceComponentLocalService, serviceComponentPersistence, shardLocalService, shardPersistence, stagingLocalService, stagingService, subscriptionLocalService, subscriptionPersistence, systemEventLocalService, systemEventPersistence, teamFinder, teamLocalService, teamPersistence, teamService, themeLocalService, themeService, ticketLocalService, ticketPersistence, userFinder, userGroupFinder, userGroupGroupRoleLocalService, userGroupGroupRolePersistence, userGroupGroupRoleService, userGroupLocalService, userGroupPersistence, userGroupRoleFinder, userGroupRoleLocalService, userGroupRolePersistence, userGroupRoleService, userGroupService, userIdMapperLocalService, userIdMapperPersistence, userLocalService, userNotificationDeliveryLocalService, userNotificationDeliveryPersistence, 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)
          Deprecated. As of 6.2.0, replaced by addUserGroup(long, long, String, String, ServiceContext)
 UserGroup addUserGroup(long userId, long companyId, String name, String description, ServiceContext serviceContext)
          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. As of 6.1.0
 void copyUserGroupLayouts(long userGroupId, long userId)
          Deprecated. As of 6.2.0
 void copyUserGroupLayouts(long userGroupId, long[] userIds)
          Deprecated. As of 6.1.0
 UserGroup deleteUserGroup(long userGroupId)
          Deletes the user group.
 UserGroup deleteUserGroup(UserGroup userGroup)
          Deletes the user group.
 void deleteUserGroups(long companyId)
           
protected  File[] exportLayouts(long userGroupId, Map<String,String[]> parameterMap)
           
 UserGroup fetchUserGroup(long companyId, String name)
           
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.
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)
          Returns an ordered range of all the user groups that match the keywords.
 Hits search(long companyId, String keywords, LinkedHashMap<String,Object> params, int start, int end, Sort sort)
          Returns an ordered range of all the user groups that match the keywords, using the indexer.
 Hits search(long companyId, String name, String description, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, Sort sort)
          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)
          Returns the number of user groups that match the keywords
 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)
          Deprecated. As of 6.2.0, replaced by updateUserGroup(long, long, String, String, ServiceContext)
 UserGroup updateUserGroup(long companyId, long userGroupId, String name, String description, ServiceContext serviceContext)
          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, dynamicQueryCount, fetchUserGroup, fetchUserGroupByUuidAndCompanyId, getAccountLocalService, getAccountPersistence, getAccountService, getAddressLocalService, getAddressPersistence, getAddressService, getBackgroundTaskLocalService, getBackgroundTaskPersistence, getBackgroundTaskService, getBeanIdentifier, getBrowserTrackerLocalService, getBrowserTrackerPersistence, getClassNameLocalService, getClassNamePersistence, getClassNameService, getClusterGroupLocalService, getClusterGroupPersistence, getCMISRepositoryLocalService, getCompanyLocalService, getCompanyPersistence, getCompanyService, getContactLocalService, getContactPersistence, getContactService, getCounterLocalService, getCountryPersistence, getCountryService, getEmailAddressLocalService, getEmailAddressPersistence, getEmailAddressService, getExpandoRowLocalService, getExpandoRowPersistence, getGroupFinder, getGroupLocalService, getGroupPersistence, getGroupService, getGroupUserGroups, getGroupUserGroups, getGroupUserGroups, getGroupUserGroupsCount, getImageLocalService, getImagePersistence, getImageService, getLayoutBranchLocalService, getLayoutBranchPersistence, getLayoutBranchService, getLayoutFinder, getLayoutFriendlyURLLocalService, getLayoutFriendlyURLPersistence, 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, getOrgGroupRolePersistence, getOrgLaborLocalService, getOrgLaborPersistence, getOrgLaborService, getPasswordPolicyFinder, getPasswordPolicyLocalService, getPasswordPolicyPersistence, getPasswordPolicyRelLocalService, getPasswordPolicyRelPersistence, getPasswordPolicyService, getPasswordTrackerLocalService, getPasswordTrackerPersistence, 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, getResourceLocalService, getResourcePermissionFinder, getResourcePermissionLocalService, getResourcePermissionPersistence, getResourcePermissionService, getResourceTypePermissionFinder, getResourceTypePermissionLocalService, getResourceTypePermissionPersistence, getRoleFinder, getRoleLocalService, getRolePersistence, getRoleService, getServiceComponentLocalService, getServiceComponentPersistence, getShardLocalService, getShardPersistence, getStagingLocalService, getStagingService, getSubscriptionLocalService, getSubscriptionPersistence, getSystemEventLocalService, getSystemEventPersistence, getTeamFinder, getTeamLocalService, getTeamPersistence, getTeamService, getTeamUserGroups, getTeamUserGroups, getTeamUserGroups, getTeamUserGroupsCount, getThemeLocalService, getThemeService, getTicketLocalService, getTicketPersistence, getUserFinder, getUserGroup, getUserGroupByUuidAndCompanyId, getUserGroupFinder, getUserGroupGroupRoleLocalService, getUserGroupGroupRolePersistence, getUserGroupGroupRoleService, getUserGroupLocalService, getUserGroupPersistence, getUserGroupRoleFinder, getUserGroupRoleLocalService, getUserGroupRolePersistence, getUserGroupRoleService, getUserGroups, getUserGroupsCount, getUserGroupService, getUserIdMapperLocalService, getUserIdMapperPersistence, getUserLocalService, getUserNotificationDeliveryLocalService, getUserNotificationDeliveryPersistence, getUserNotificationEventLocalService, getUserNotificationEventPersistence, getUserPersistence, getUserService, getUserTrackerLocalService, getUserTrackerPathLocalService, getUserTrackerPathPersistence, getUserTrackerPersistence, getUserUserGroups, getUserUserGroups, getUserUserGroups, getUserUserGroupsCount, getVirtualHostLocalService, getVirtualHostPersistence, getWebDAVPropsLocalService, getWebDAVPropsPersistence, getWebsiteLocalService, getWebsitePersistence, getWebsiteService, getWorkflowDefinitionLinkLocalService, getWorkflowDefinitionLinkPersistence, getWorkflowInstanceLinkLocalService, getWorkflowInstanceLinkPersistence, hasGroupUserGroup, hasGroupUserGroups, hasTeamUserGroup, hasTeamUserGroups, hasUserUserGroup, hasUserUserGroups, runSQL, setAccountLocalService, setAccountPersistence, setAccountService, setAddressLocalService, setAddressPersistence, setAddressService, setBackgroundTaskLocalService, setBackgroundTaskPersistence, setBackgroundTaskService, setBeanIdentifier, setBrowserTrackerLocalService, setBrowserTrackerPersistence, setClassNameLocalService, setClassNamePersistence, setClassNameService, setClusterGroupLocalService, setClusterGroupPersistence, setCMISRepositoryLocalService, setCompanyLocalService, setCompanyPersistence, setCompanyService, setContactLocalService, setContactPersistence, setContactService, setCounterLocalService, setCountryPersistence, setCountryService, setEmailAddressLocalService, setEmailAddressPersistence, setEmailAddressService, setExpandoRowLocalService, setExpandoRowPersistence, setGroupFinder, setGroupLocalService, setGroupPersistence, setGroupService, setGroupUserGroups, setImageLocalService, setImagePersistence, setImageService, setLayoutBranchLocalService, setLayoutBranchPersistence, setLayoutBranchService, setLayoutFinder, setLayoutFriendlyURLLocalService, setLayoutFriendlyURLPersistence, 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, setOrgGroupRolePersistence, setOrgLaborLocalService, setOrgLaborPersistence, setOrgLaborService, setPasswordPolicyFinder, setPasswordPolicyLocalService, setPasswordPolicyPersistence, setPasswordPolicyRelLocalService, setPasswordPolicyRelPersistence, setPasswordPolicyService, setPasswordTrackerLocalService, setPasswordTrackerPersistence, 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, setResourceLocalService, setResourcePermissionFinder, setResourcePermissionLocalService, setResourcePermissionPersistence, setResourcePermissionService, setResourceTypePermissionFinder, setResourceTypePermissionLocalService, setResourceTypePermissionPersistence, setRoleFinder, setRoleLocalService, setRolePersistence, setRoleService, setServiceComponentLocalService, setServiceComponentPersistence, setShardLocalService, setShardPersistence, setStagingLocalService, setStagingService, setSubscriptionLocalService, setSubscriptionPersistence, setSystemEventLocalService, setSystemEventPersistence, setTeamFinder, setTeamLocalService, setTeamPersistence, setTeamService, setTeamUserGroups, setThemeLocalService, setThemeService, setTicketLocalService, setTicketPersistence, setUserFinder, setUserGroupFinder, setUserGroupGroupRoleLocalService, setUserGroupGroupRolePersistence, setUserGroupGroupRoleService, setUserGroupLocalService, setUserGroupPersistence, setUserGroupRoleFinder, setUserGroupRoleLocalService, setUserGroupRolePersistence, setUserGroupRoleService, setUserGroupService, setUserIdMapperLocalService, setUserIdMapperPersistence, setUserLocalService, setUserNotificationDeliveryLocalService, setUserNotificationDeliveryPersistence, setUserNotificationEventLocalService, setUserNotificationEventPersistence, setUserPersistence, setUserService, setUserTrackerLocalService, setUserTrackerPathLocalService, setUserTrackerPathPersistence, setUserTrackerPersistence, setVirtualHostLocalService, setVirtualHostPersistence, setWebDAVPropsLocalService, setWebDAVPropsPersistence, setWebsiteLocalService, setWebsitePersistence, setWebsiteService, setWorkflowDefinitionLinkLocalService, setWorkflowDefinitionLinkPersistence, setWorkflowInstanceLinkLocalService, setWorkflowInstanceLinkPersistence, updateUserGroup
 
Methods inherited from class com.liferay.portal.service.BaseLocalServiceImpl
getClassLoader, getLayoutURL, getLayoutURL
 
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
Deprecated. As of 6.2.0, replaced by addUserGroup(long, long, String, String, ServiceContext)

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

addUserGroup

public UserGroup addUserGroup(long userId,
                              long companyId,
                              String name,
                              String description,
                              ServiceContext serviceContext)
                       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
serviceContext - the service context to be applied (optionally null). Can set expando bridge attributes for the user group.
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. As of 6.2.0

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. As of 6.1.0

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. As of 6.1.0

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

@SystemEvent(action=1,
             type=1)
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

deleteUserGroups

public void deleteUserGroups(long companyId)
                      throws PortalException,
                             SystemException
Throws:
PortalException
SystemException

fetchUserGroup

public UserGroup fetchUserGroup(long companyId,
                                String name)
                         throws SystemException
Throws:
SystemException

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

search

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

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
keywords - the keywords (space separated), which may occur in the user group's name or 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

search

public Hits search(long companyId,
                   String keywords,
                   LinkedHashMap<String,Object> params,
                   int start,
                   int end,
                   Sort sort)
            throws SystemException
Returns an ordered range of all the user groups that match the keywords, using the indexer. It is preferable to use this method instead of the non-indexed version whenever possible for performance reasons.

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
keywords - the keywords (space separated), which may occur in the user group's name or description (optionally null)
params - the finder params (optionally null). For more information see UserGroupIndexer
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)
sort - the field and direction by which to sort (optionally null)
Returns:
the matching user groups ordered by sort
Throws:
SystemException - if a system exception occurred
See Also:
UserGroupIndexer

search

public Hits search(long companyId,
                   String name,
                   String description,
                   LinkedHashMap<String,Object> params,
                   boolean andSearch,
                   int start,
                   int end,
                   Sort sort)
            throws SystemException
Returns an ordered range of all the user groups that match the name and description. It is preferable to use this method instead of the non-indexed version whenever possible for performance reasons.

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 UserGroupIndexer
andSearch - whether every field must match its keywords or just one field
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)
sort - the field and direction by which to sort (optionally null)
Returns:
the matching user groups ordered by sort
Throws:
SystemException - if a system exception occurred
See Also:
UserGroupFinder

searchCount

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

Parameters:
companyId - the primary key of the user group's company
keywords - the keywords (space separated), which may occur in the user group's name or 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
Deprecated. As of 6.2.0, replaced by updateUserGroup(long, long, String, String, ServiceContext)

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

updateUserGroup

public UserGroup updateUserGroup(long companyId,
                                 long userGroupId,
                                 String name,
                                 String description,
                                 ServiceContext serviceContext)
                          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
serviceContext - the service context to be applied (optionally null). Can set expando bridge attributes for the user group.
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.2-ce-ga5