public class GroupLocalServiceImpl extends GroupLocalServiceBaseImpl
Groups are also the entity to which LayoutSets are generally associated. Since LayoutSets are the parent entities of Layouts (i.e. pages), no entity can have associated pages without also having an associated Group. This relationship can be depicted as ... Layout -> LayoutSet -> Group[type] -> [Entity]. Note, the Entity part is optional.
Group has a "type" definition that is typically identified by two fields of
the entity - String className
, and int type
.
The className
field helps create the group's association with
other entities (e.g. Organization, User, Company, UserGroup, etc.). The value
of className
is the full name of the entity's class and the
primary key of the associated entity instance. A site has
className="Group"
and has no associated entity.
The type
field helps distinguish between a group used strictly
for scoping and a group that also has pages (in which case the type is
SITE
). For a list of types, see GroupConstants
.
Here is a listing of how Group is related to some portal entities:
className="Group"
LayoutPrototype
) has 1 Group which uses only
one
of its two LayoutSets to store a single page which can later be used to
derive a single page in any Site
LayoutSetPrototype
) has 1 Group which uses only
one of its two LayoutSets to store many pages which can later be used to
derive
entire Sites or pulled into an existing Site
GroupImpl
Modifier and Type | Field and Description |
---|---|
static String |
ORGANIZATION_NAME_SUFFIX |
static String |
ORGANIZATION_STAGING_SUFFIX |
protected File |
publicLARFile |
accountLocalService, accountPersistence, assetCategoryFinder, assetCategoryLocalService, assetCategoryPersistence, assetEntryFinder, assetEntryLocalService, assetEntryPersistence, assetTagFinder, assetTagLocalService, assetTagPersistence, assetVocabularyFinder, assetVocabularyLocalService, assetVocabularyPersistence, classNameLocalService, classNamePersistence, companyLocalService, companyPersistence, counterLocalService, dlAppLocalService, expandoRowLocalService, expandoRowPersistence, exportImportConfigurationFinder, exportImportConfigurationLocalService, exportImportConfigurationPersistence, exportImportLocalService, groupFinder, groupLocalService, groupPersistence, layoutFinder, layoutLocalService, layoutPersistence, layoutPrototypeLocalService, layoutPrototypePersistence, layoutSetBranchLocalService, layoutSetBranchPersistence, layoutSetLocalService, layoutSetPersistence, layoutSetPrototypeLocalService, layoutSetPrototypePersistence, membershipRequestLocalService, membershipRequestPersistence, organizationFinder, organizationLocalService, organizationPersistence, persistedModelLocalServiceRegistry, portletLocalService, portletPersistence, portletPreferencesFinder, portletPreferencesLocalService, portletPreferencesPersistence, resourceActionLocalService, resourceActionPersistence, resourceBlockFinder, resourceBlockLocalService, resourceBlockPersistence, resourceLocalService, resourcePermissionFinder, resourcePermissionLocalService, resourcePermissionPersistence, resourceTypePermissionFinder, resourceTypePermissionLocalService, resourceTypePermissionPersistence, roleFinder, roleLocalService, rolePersistence, socialActivityFinder, socialActivityLocalService, socialActivityPersistence, socialActivitySettingLocalService, socialActivitySettingPersistence, socialRequestLocalService, socialRequestPersistence, stagingLocalService, subscriptionLocalService, subscriptionPersistence, teamFinder, teamLocalService, teamPersistence, trashEntryLocalService, trashEntryPersistence, userFinder, userGroupFinder, userGroupGroupRoleFinder, userGroupGroupRoleLocalService, userGroupGroupRolePersistence, userGroupLocalService, userGroupPersistence, userGroupRoleFinder, userGroupRoleLocalService, userGroupRolePersistence, userLocalService, userPersistence, workflowDefinitionLinkLocalService, workflowDefinitionLinkPersistence
Constructor and Description |
---|
GroupLocalServiceImpl()
Constructs a group local service.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addControlPanelLayouts(com.liferay.portal.kernel.model.Group group) |
protected void |
addDefaultGuestPublicLayoutByProperties(com.liferay.portal.kernel.model.Group group) |
protected void |
addDefaultGuestPublicLayouts(com.liferay.portal.kernel.model.Group group) |
protected void |
addDefaultGuestPublicLayoutsByLAR(com.liferay.portal.kernel.model.Group group,
File larFile) |
com.liferay.portal.kernel.model.Group |
addGroup(long userId,
long parentGroupId,
String className,
long classPK,
long liveGroupId,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
int type,
boolean manualMembership,
int membershipRestriction,
String friendlyURL,
boolean site,
boolean inheritContent,
boolean active,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
com.liferay.portal.kernel.model.Group |
addGroup(long userId,
long parentGroupId,
String className,
long classPK,
long liveGroupId,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
int type,
boolean manualMembership,
int membershipRestriction,
String friendlyURL,
boolean site,
boolean active,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
com.liferay.portal.kernel.model.Group |
addGroup(long userId,
long parentGroupId,
String className,
long classPK,
long liveGroupId,
String name,
String description,
int type,
boolean manualMembership,
int membershipRestriction,
String friendlyURL,
boolean site,
boolean active,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Deprecated.
|
protected void |
addPortletDefaultData(com.liferay.portal.kernel.model.Group group) |
void |
checkCompanyGroup(long companyId)
Adds a company group if it does not exist.
|
com.liferay.portal.kernel.model.Group |
checkScopeGroup(com.liferay.portal.kernel.model.Layout layout,
long userId) |
void |
checkSystemGroups(long companyId)
Creates systems groups and other related data needed by the system on the
very first startup.
|
com.liferay.portal.kernel.model.Group |
deleteGroup(com.liferay.portal.kernel.model.Group group)
Deletes the group and its associated data.
|
com.liferay.portal.kernel.model.Group |
deleteGroup(long groupId)
Deletes the group and its associated data.
|
protected void |
deletePortletData(com.liferay.portal.kernel.model.Group group) |
void |
disableStaging(long groupId) |
protected Collection<com.liferay.portal.kernel.model.Group> |
doSearch(long companyId,
long[] classNameIds,
long parentGroupId,
String[] names,
String[] descriptions,
LinkedHashMap<String,Object> params,
boolean andOperator) |
void |
enableStaging(long groupId) |
com.liferay.portal.kernel.model.Group |
fetchCompanyGroup(long companyId)
Returns the company's group.
|
com.liferay.portal.kernel.model.Group |
fetchFriendlyURLGroup(long companyId,
String friendlyURL)
Returns the group with the matching friendly URL.
|
com.liferay.portal.kernel.model.Group |
fetchGroup(long groupId) |
com.liferay.portal.kernel.model.Group |
fetchGroup(long companyId,
String groupKey)
Returns the group with the matching group key by first searching the
system groups and then using the finder cache.
|
com.liferay.portal.kernel.model.Group |
fetchStagingGroup(long liveGroupId) |
com.liferay.portal.kernel.model.Group |
fetchUserGroup(long companyId,
long userId) |
com.liferay.portal.kernel.model.Group |
fetchUserPersonalSiteGroup(long companyId)
Returns the default user's personal site group.
|
List<Long> |
getActiveGroupIds(long userId) |
List<com.liferay.portal.kernel.model.Group> |
getActiveGroups(long companyId,
boolean active)
Returns all the active or inactive groups associated with the company.
|
protected long[] |
getClassNameIds() |
com.liferay.portal.kernel.model.Group |
getCompanyGroup(long companyId)
Returns the company group.
|
List<com.liferay.portal.kernel.model.Group> |
getCompanyGroups(long companyId,
int start,
int end)
Returns a range of all the groups associated with the company.
|
int |
getCompanyGroupsCount(long companyId)
Returns the number of groups associated with the company.
|
protected String |
getFriendlyURL(long companyId,
long groupId,
long classNameId,
long classPK,
String friendlyName,
String friendlyURL) |
protected String |
getFriendlyURL(String friendlyURL) |
com.liferay.portal.kernel.model.Group |
getFriendlyURLGroup(long companyId,
String friendlyURL)
Returns the group with the matching friendly URL.
|
com.liferay.portal.kernel.model.Group |
getGroup(long groupId)
Returns the group with the matching primary key.
|
com.liferay.portal.kernel.model.Group |
getGroup(long companyId,
String groupKey)
Returns the group with the matching group key.
|
String |
getGroupDescriptiveName(com.liferay.portal.kernel.model.Group group,
Locale locale)
Deprecated.
As of 7.0.0, replaced by
Group.getDescriptiveName(Locale) |
String |
getGroupDescriptiveName(long groupId,
Locale locale)
Deprecated.
As of 7.0.0, replaced by
Group.getDescriptiveName(Locale) |
List<com.liferay.portal.kernel.model.Group> |
getGroups(long[] groupIds)
Returns the groups with the matching primary keys.
|
List<com.liferay.portal.kernel.model.Group> |
getGroups(long companyId,
long parentGroupId,
boolean site)
Returns all the groups that are direct children of the parent group.
|
List<com.liferay.portal.kernel.model.Group> |
getGroups(long companyId,
long parentGroupId,
boolean site,
boolean inheritContent) |
List<com.liferay.portal.kernel.model.Group> |
getGroups(long companyId,
String treePath,
boolean site) |
List<com.liferay.portal.kernel.model.Group> |
getGroups(long companyId,
String className,
long parentGroupId)
Returns all the groups that are direct children of the parent group with
the matching className.
|
List<com.liferay.portal.kernel.model.Group> |
getGroups(long companyId,
String className,
long parentGroupId,
int start,
int end)
Returns a range of all the groups that are direct children of the parent
group with the matching className.
|
int |
getGroupsCount(long companyId,
long parentGroupId,
boolean site)
Returns the number of groups that are direct children of the parent
group.
|
int |
getGroupsCount(long companyId,
String className,
long parentGroupId)
Returns the number of groups that are direct children of the parent group
with the matching className.
|
com.liferay.portal.kernel.model.Group |
getLayoutGroup(long companyId,
long plid)
Returns the group associated with the layout.
|
com.liferay.portal.kernel.model.Group |
getLayoutPrototypeGroup(long companyId,
long layoutPrototypeId)
Returns the group associated with the layout prototype.
|
com.liferay.portal.kernel.model.Group |
getLayoutSetPrototypeGroup(long companyId,
long layoutSetPrototypeId)
Returns the group associated with the layout set prototype.
|
List<com.liferay.portal.kernel.model.Group> |
getLayoutsGroups(long companyId,
long parentGroupId,
boolean site,
boolean active,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
Returns a range of all groups that are children of the parent group and
that have at least one layout.
|
List<com.liferay.portal.kernel.model.Group> |
getLayoutsGroups(long companyId,
long parentGroupId,
boolean site,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
Returns a range of all groups that are children of the parent group and
that have at least one layout.
|
int |
getLayoutsGroupsCount(long companyId,
long parentGroupId,
boolean site)
Returns the number of groups that are children or the parent group and
that have at least one layout
|
int |
getLayoutsGroupsCount(long companyId,
long parentGroupId,
boolean site,
boolean active)
Returns the number of groups that are children or the parent group and
that have at least one layout
|
List<com.liferay.portal.kernel.model.Group> |
getLiveGroups()
Returns all live groups.
|
List<com.liferay.portal.kernel.model.Group> |
getNoLayoutsGroups(String className,
boolean privateLayout,
int start,
int end)
Returns a range of all non-system groups of a specified type (className)
that have no layouts.
|
List<com.liferay.portal.kernel.model.Group> |
getNullFriendlyURLGroups()
Returns all non-system groups having
null or empty friendly
URLs. |
com.liferay.portal.kernel.model.Group |
getOrganizationGroup(long companyId,
long organizationId)
Returns the specified organization group.
|
List<com.liferay.portal.kernel.model.Group> |
getOrganizationsGroups(List<com.liferay.portal.kernel.model.Organization> organizations)
Returns the specified organization groups.
|
List<com.liferay.portal.kernel.model.Group> |
getOrganizationsRelatedGroups(List<com.liferay.portal.kernel.model.Organization> organizations)
Returns all the groups related to the organizations.
|
protected String |
getOrgGroupName(String name) |
List<com.liferay.portal.kernel.model.Group> |
getParentGroups(long groupId)
Returns the group followed by all its parent groups ordered by closest
ancestor.
|
protected List<com.liferay.exportimport.kernel.lar.PortletDataHandler> |
getPortletDataHandlers(com.liferay.portal.kernel.model.Group group) |
protected String[] |
getSearchNames(long companyId,
String name) |
List<com.liferay.portal.kernel.model.Group> |
getStagedSites() |
com.liferay.portal.kernel.model.Group |
getStagingGroup(long liveGroupId)
Returns the staging group.
|
com.liferay.portal.kernel.model.Group |
getUserGroup(long companyId,
long userId)
Returns the group directly associated with the user.
|
com.liferay.portal.kernel.model.Group |
getUserGroupGroup(long companyId,
long userGroupId)
Returns the specified "user group" group.
|
List<com.liferay.portal.kernel.model.Group> |
getUserGroups(long userId,
boolean inherit)
Returns all the user's site groups and immediate organization groups,
optionally including the user's inherited organization groups and user
groups.
|
List<com.liferay.portal.kernel.model.Group> |
getUserGroups(long userId,
boolean inherit,
int start,
int end)
Returns an ordered range of all the user's site groups and immediate
organization groups, optionally including the user's inherited
organization groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
getUserGroupsGroups(List<com.liferay.portal.kernel.model.UserGroup> userGroups)
Returns the groups associated with the user groups.
|
List<com.liferay.portal.kernel.model.Group> |
getUserGroupsRelatedGroups(List<com.liferay.portal.kernel.model.UserGroup> userGroups)
Returns all the groups related to the user groups.
|
List<com.liferay.portal.kernel.model.Group> |
getUserOrganizationsGroups(long userId,
int start,
int end)
Returns the range of all groups associated with the user's organization
groups, including the ancestors of the organization groups, unless portal
property
organizations.membership.strict is set to
true . |
com.liferay.portal.kernel.model.Group |
getUserPersonalSiteGroup(long companyId)
Returns the default user's personal site group.
|
List<com.liferay.portal.kernel.model.Group> |
getUserSitesGroups(long userId) |
List<com.liferay.portal.kernel.model.Group> |
getUserSitesGroups(long userId,
boolean includeAdministrative) |
boolean |
hasStagingGroup(long liveGroupId)
Returns
true if the live group has a staging group. |
boolean |
hasUserGroup(long userId,
long groupId)
Returns
true if the user is immediately associated with the
group, or associated with the group via the user's organizations,
inherited organizations, or user groups. |
boolean |
hasUserGroup(long userId,
long groupId,
boolean inherit)
Returns
true if the user is immediately associated with the
group, or optionally if the user is associated with the group via the
user's organizations, inherited organizations, or user groups. |
protected void |
initImportLARFile() |
protected void |
initUserPersonalSitePermissions(com.liferay.portal.kernel.model.Group group) |
boolean |
isLiveGroupActive(com.liferay.portal.kernel.model.Group group) |
protected boolean |
isParentGroup(long parentGroupId,
long groupId) |
protected boolean |
isStaging(com.liferay.portal.kernel.service.ServiceContext serviceContext) |
protected boolean |
isUseComplexSQL(long[] classNameIds) |
com.liferay.portal.kernel.model.Group |
loadFetchGroup(long companyId,
String groupKey)
Returns the group with the matching group key by first searching the
system groups and then using the finder cache.
|
com.liferay.portal.kernel.model.Group |
loadGetGroup(long companyId,
String groupKey)
Returns the group with the matching group key.
|
protected boolean |
matches(String s,
String[] keywords) |
void |
rebuildTree(long companyId)
Rebuilds the group tree.
|
protected void |
reindex(long companyId,
long[] userIds) |
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
LinkedHashMap<String,Object> params,
int start,
int end)
Returns an ordered range of all the company's groups, optionally
including the user's inherited organization groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
long[] classNameIds,
long parentGroupId,
String keywords,
LinkedHashMap<String,Object> params,
int start,
int end)
Returns an ordered range of all the groups belonging to the parent group
that match the class name IDs and keywords, optionally including the
user's inherited organization groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
long[] classNameIds,
long parentGroupId,
String keywords,
LinkedHashMap<String,Object> params,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
Returns an ordered range of all the groups belonging to the parent group
that match the class name IDs and keywords, optionally including the
user's inherited organization groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
long[] classNameIds,
long parentGroupId,
String name,
String description,
LinkedHashMap<String,Object> params,
boolean andOperator,
int start,
int end)
Returns an ordered range of all the groups belonging to the parent group
that match the class name IDs, name, and description, optionally
including the user's inherited organization groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
long[] classNameIds,
long parentGroupId,
String name,
String description,
LinkedHashMap<String,Object> params,
boolean andOperator,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
Returns an ordered range of all the groups belonging to the parent group
that match the class name IDs, name, and description, optionally
including the user's inherited organization groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
long[] classNameIds,
String keywords,
LinkedHashMap<String,Object> params,
int start,
int end)
Returns an ordered range of all the groups that match the class name IDs
and keywords, optionally including the user's inherited organization
groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
long[] classNameIds,
String keywords,
LinkedHashMap<String,Object> params,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
Returns an ordered range of all the groups that match the class name IDs
and keywords, optionally including the user's inherited organization
groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
long[] classNameIds,
String name,
String description,
LinkedHashMap<String,Object> params,
boolean andOperator,
int start,
int end)
Returns an ordered range of all the groups that match the class name IDs,
name, and description, optionally including the user's inherited
organization groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
long[] classNameIds,
String name,
String description,
LinkedHashMap<String,Object> params,
boolean andOperator,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
Returns an ordered range of all the groups that match the class name IDs,
name, and description, optionally including the user's inherited
organization groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
long parentGroupId,
String keywords,
LinkedHashMap<String,Object> params,
int start,
int end)
Returns an ordered range of all the groups belonging to the parent group
that match the keywords, optionally including the user's inherited
organization groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
long parentGroupId,
String keywords,
LinkedHashMap<String,Object> params,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
Returns an ordered range of all the groups belonging to the parent group
that match the keywords, optionally including the user's inherited
organization groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
long parentGroupId,
String name,
String description,
LinkedHashMap<String,Object> params,
boolean andOperator,
int start,
int end)
Returns an ordered range of all the site groups belonging to the parent
group and organization groups that match the name and description,
optionally including the user's inherited organization groups and user
groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
long parentGroupId,
String name,
String description,
LinkedHashMap<String,Object> params,
boolean andOperator,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
Returns an ordered range of all the site groups belonging to the parent
group and organization groups that match the name and description,
optionally including the user's inherited organization groups and user
groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
String keywords,
LinkedHashMap<String,Object> params,
int start,
int end)
Returns an ordered range of all the groups that match the keywords,
optionally including the user's inherited organization groups and user
groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
String keywords,
LinkedHashMap<String,Object> params,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
Returns an ordered range of all the groups that match the keywords,
optionally including the user's inherited organization groups and user
groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
String name,
String description,
LinkedHashMap<String,Object> params,
boolean andOperator,
int start,
int end)
Returns an ordered range of all the site groups and organization groups
that match the name and description, optionally including the user's
inherited organization groups and user groups.
|
List<com.liferay.portal.kernel.model.Group> |
search(long companyId,
String name,
String description,
LinkedHashMap<String,Object> params,
boolean andOperator,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
Returns an ordered range of all the site groups and organization groups
that match the name and description, optionally including the user's
inherited organization groups and user groups.
|
int |
searchCount(long companyId,
long[] classNameIds,
long parentGroupId,
String keywords,
LinkedHashMap<String,Object> params)
Returns the number of groups belonging to the parent group that match the
class name IDs, and keywords, optionally including the user's inherited
organization groups and user groups.
|
int |
searchCount(long companyId,
long[] classNameIds,
long parentGroupId,
String name,
String description,
LinkedHashMap<String,Object> params,
boolean andOperator)
Returns the number of groups belonging to the parent group that match the
class name IDs, name, and description, optionally including the user's
inherited organization groups and user groups.
|
int |
searchCount(long companyId,
long[] classNameIds,
String keywords,
LinkedHashMap<String,Object> params)
Returns the number of groups that match the class name IDs, and keywords,
optionally including the user's inherited organization groups and user
groups.
|
int |
searchCount(long companyId,
long[] classNameIds,
String name,
String description,
LinkedHashMap<String,Object> params,
boolean andOperator)
Returns the number of groups that match the class name IDs, name, and
description, optionally including the user's inherited organization
groups and user groups.
|
int |
searchCount(long companyId,
long parentGroupId,
String keywords,
LinkedHashMap<String,Object> params)
Returns the number of groups belonging to the parent group that match the
keywords, optionally including the user's inherited organization groups
and user groups.
|
int |
searchCount(long companyId,
long parentGroupId,
String name,
String description,
LinkedHashMap<String,Object> params,
boolean andOperator)
Returns the number of groups belonging to the parent group and immediate
organization groups that match the name and description, optionally
including the user's inherited organization groups and user groups.
|
int |
searchCount(long companyId,
String keywords,
LinkedHashMap<String,Object> params)
Returns the number of groups that match the keywords, optionally
including the user's inherited organization groups and user groups.
|
int |
searchCount(long companyId,
String name,
String description,
LinkedHashMap<String,Object> params,
boolean andOperator)
Returns the number of groups and immediate organization groups that match
the name and description, optionally including the user's inherited
organization groups and user groups.
|
protected void |
setCompanyPermissions(com.liferay.portal.kernel.model.Role role,
String name,
String[] actionIds) |
protected void |
setRolePermissions(com.liferay.portal.kernel.model.Group group,
com.liferay.portal.kernel.model.Role role,
String name) |
protected void |
setRolePermissions(com.liferay.portal.kernel.model.Group group,
com.liferay.portal.kernel.model.Role role,
String name,
String[] actionIds) |
protected List<com.liferay.portal.kernel.model.Group> |
sort(Collection<com.liferay.portal.kernel.model.Group> groups,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc) |
protected void |
unscheduleStaging(com.liferay.portal.kernel.model.Group group) |
void |
unsetRoleGroups(long roleId,
long[] groupIds)
Removes the groups from the role.
|
void |
unsetUserGroups(long userId,
long[] groupIds)
Removes the user from the groups.
|
void |
updateAsset(long userId,
com.liferay.portal.kernel.model.Group group,
long[] assetCategoryIds,
String[] assetTagNames)
Updates the group's asset replacing categories and tag names.
|
com.liferay.portal.kernel.model.Group |
updateFriendlyURL(long groupId,
String friendlyURL)
Updates the group's friendly URL.
|
com.liferay.portal.kernel.model.Group |
updateGroup(long groupId,
long parentGroupId,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
int type,
boolean manualMembership,
int membershipRestriction,
String friendlyURL,
boolean inheritContent,
boolean active,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
com.liferay.portal.kernel.model.Group |
updateGroup(long groupId,
long parentGroupId,
String name,
String description,
int type,
boolean manualMembership,
int membershipRestriction,
String friendlyURL,
boolean inheritContent,
boolean active,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Deprecated.
As of 7.0.0, replaced by
updateGroup(long, long, Map,
Map, int, boolean, int, String, boolean, boolean,
ServiceContext) |
com.liferay.portal.kernel.model.Group |
updateGroup(long groupId,
String typeSettings)
Updates the group's type settings.
|
com.liferay.portal.kernel.model.Group |
updateSite(long groupId,
boolean site)
Associates the group with a main site if the group is an organization.
|
protected void |
validateFriendlyURL(long companyId,
long groupId,
long classNameId,
long classPK,
String friendlyURL) |
protected void |
validateGroupKey(long groupId,
long companyId,
String groupKey,
boolean site) |
protected void |
validateInheritContent(long parentGroupId,
boolean inheritContent) |
protected void |
validateLanguageIds(String defaultLanguageId,
String languageIds) |
protected void |
validateParentGroup(long groupId,
long parentGroupId) |
addGroup, addOrganizationGroup, addOrganizationGroup, addOrganizationGroups, addOrganizationGroups, addRoleGroup, addRoleGroup, addRoleGroups, addRoleGroups, addUserGroup, addUserGroup, addUserGroupGroup, addUserGroupGroup, addUserGroupGroups, addUserGroupGroups, addUserGroups, addUserGroups, afterPropertiesSet, clearOrganizationGroups, clearRoleGroups, clearUserGroupGroups, clearUserGroups, createGroup, deleteOrganizationGroup, deleteOrganizationGroup, deleteOrganizationGroups, deleteOrganizationGroups, deletePersistedModel, deleteRoleGroup, deleteRoleGroup, deleteRoleGroups, deleteRoleGroups, deleteUserGroup, deleteUserGroup, deleteUserGroupGroup, deleteUserGroupGroup, deleteUserGroupGroups, deleteUserGroupGroups, deleteUserGroups, deleteUserGroups, destroy, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, dynamicQueryCount, fetchGroupByUuidAndCompanyId, getAccountLocalService, getAccountPersistence, getActionableDynamicQuery, getAssetCategoryFinder, getAssetCategoryLocalService, getAssetCategoryPersistence, getAssetEntryFinder, getAssetEntryLocalService, getAssetEntryPersistence, getAssetTagFinder, getAssetTagLocalService, getAssetTagPersistence, getAssetVocabularyFinder, getAssetVocabularyLocalService, getAssetVocabularyPersistence, getClassNameLocalService, getClassNamePersistence, getCompanyLocalService, getCompanyPersistence, getCounterLocalService, getDLAppLocalService, getExpandoRowLocalService, getExpandoRowPersistence, getExportImportConfigurationFinder, getExportImportConfigurationLocalService, getExportImportConfigurationPersistence, getExportImportLocalService, getGroupByUuidAndCompanyId, getGroupFinder, getGroupLocalService, getGroupPersistence, getGroups, getGroupsCount, getIndexableActionableDynamicQuery, getLayoutFinder, getLayoutLocalService, getLayoutPersistence, getLayoutPrototypeLocalService, getLayoutPrototypePersistence, getLayoutSetBranchLocalService, getLayoutSetBranchPersistence, getLayoutSetLocalService, getLayoutSetPersistence, getLayoutSetPrototypeLocalService, getLayoutSetPrototypePersistence, getMembershipRequestLocalService, getMembershipRequestPersistence, getModelClass, getModelClassName, getOrganizationFinder, getOrganizationGroups, getOrganizationGroups, getOrganizationGroups, getOrganizationGroupsCount, getOrganizationLocalService, getOrganizationPersistence, getOrganizationPrimaryKeys, getOSGiServiceIdentifier, getPersistedModel, getPortletLocalService, getPortletPersistence, getPortletPreferencesFinder, getPortletPreferencesLocalService, getPortletPreferencesPersistence, getResourceActionLocalService, getResourceActionPersistence, getResourceBlockFinder, getResourceBlockLocalService, getResourceBlockPersistence, getResourceLocalService, getResourcePermissionFinder, getResourcePermissionLocalService, getResourcePermissionPersistence, getResourceTypePermissionFinder, getResourceTypePermissionLocalService, getResourceTypePermissionPersistence, getRoleFinder, getRoleGroups, getRoleGroups, getRoleGroups, getRoleGroupsCount, getRoleLocalService, getRolePersistence, getRolePrimaryKeys, getSocialActivityFinder, getSocialActivityLocalService, getSocialActivityPersistence, getSocialActivitySettingLocalService, getSocialActivitySettingPersistence, getSocialRequestLocalService, getSocialRequestPersistence, getStagingLocalService, getSubscriptionLocalService, getSubscriptionPersistence, getTeamFinder, getTeamLocalService, getTeamPersistence, getTrashEntryLocalService, getTrashEntryPersistence, getUserFinder, getUserGroupFinder, getUserGroupGroupRoleFinder, getUserGroupGroupRoleLocalService, getUserGroupGroupRolePersistence, getUserGroupGroups, getUserGroupGroups, getUserGroupGroups, getUserGroupGroupsCount, getUserGroupLocalService, getUserGroupPersistence, getUserGroupPrimaryKeys, getUserGroupRoleFinder, getUserGroupRoleLocalService, getUserGroupRolePersistence, getUserGroups, getUserGroups, getUserGroups, getUserGroupsCount, getUserLocalService, getUserPersistence, getUserPrimaryKeys, getWorkflowDefinitionLinkLocalService, getWorkflowDefinitionLinkPersistence, hasOrganizationGroup, hasOrganizationGroups, hasRoleGroup, hasRoleGroups, hasUserGroupGroup, hasUserGroupGroups, hasUserGroups, initActionableDynamicQuery, runSQL, setAccountLocalService, setAccountPersistence, setAssetCategoryFinder, setAssetCategoryLocalService, setAssetCategoryPersistence, setAssetEntryFinder, setAssetEntryLocalService, setAssetEntryPersistence, setAssetTagFinder, setAssetTagLocalService, setAssetTagPersistence, setAssetVocabularyFinder, setAssetVocabularyLocalService, setAssetVocabularyPersistence, setClassNameLocalService, setClassNamePersistence, setCompanyLocalService, setCompanyPersistence, setCounterLocalService, setDLAppLocalService, setExpandoRowLocalService, setExpandoRowPersistence, setExportImportConfigurationFinder, setExportImportConfigurationLocalService, setExportImportConfigurationPersistence, setExportImportLocalService, setGroupFinder, setGroupLocalService, setGroupPersistence, setLayoutFinder, setLayoutLocalService, setLayoutPersistence, setLayoutPrototypeLocalService, setLayoutPrototypePersistence, setLayoutSetBranchLocalService, setLayoutSetBranchPersistence, setLayoutSetLocalService, setLayoutSetPersistence, setLayoutSetPrototypeLocalService, setLayoutSetPrototypePersistence, setMembershipRequestLocalService, setMembershipRequestPersistence, setOrganizationFinder, setOrganizationGroups, setOrganizationLocalService, setOrganizationPersistence, setPortletLocalService, setPortletPersistence, setPortletPreferencesFinder, setPortletPreferencesLocalService, setPortletPreferencesPersistence, setResourceActionLocalService, setResourceActionPersistence, setResourceBlockFinder, setResourceBlockLocalService, setResourceBlockPersistence, setResourceLocalService, setResourcePermissionFinder, setResourcePermissionLocalService, setResourcePermissionPersistence, setResourceTypePermissionFinder, setResourceTypePermissionLocalService, setResourceTypePermissionPersistence, setRoleFinder, setRoleGroups, setRoleLocalService, setRolePersistence, setSocialActivityFinder, setSocialActivityLocalService, setSocialActivityPersistence, setSocialActivitySettingLocalService, setSocialActivitySettingPersistence, setSocialRequestLocalService, setSocialRequestPersistence, setStagingLocalService, setSubscriptionLocalService, setSubscriptionPersistence, setTeamFinder, setTeamLocalService, setTeamPersistence, setTrashEntryLocalService, setTrashEntryPersistence, setUserFinder, setUserGroupFinder, setUserGroupGroupRoleFinder, setUserGroupGroupRoleLocalService, setUserGroupGroupRolePersistence, setUserGroupGroups, setUserGroupLocalService, setUserGroupPersistence, setUserGroupRoleFinder, setUserGroupRoleLocalService, setUserGroupRolePersistence, setUserGroups, setUserLocalService, setUserPersistence, setWorkflowDefinitionLinkLocalService, setWorkflowDefinitionLinkPersistence, updateGroup
public static final String ORGANIZATION_NAME_SUFFIX
public static final String ORGANIZATION_STAGING_SUFFIX
protected File publicLARFile
public GroupLocalServiceImpl()
public com.liferay.portal.kernel.model.Group addGroup(long userId, long parentGroupId, String className, long classPK, long liveGroupId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, int type, boolean manualMembership, int membershipRestriction, String friendlyURL, boolean site, boolean inheritContent, boolean active, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.Group addGroup(long userId, long parentGroupId, String className, long classPK, long liveGroupId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, int type, boolean manualMembership, int membershipRestriction, String friendlyURL, boolean site, boolean active, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
@Deprecated public com.liferay.portal.kernel.model.Group addGroup(long userId, long parentGroupId, String className, long classPK, long liveGroupId, String name, String description, int type, boolean manualMembership, int membershipRestriction, String friendlyURL, boolean site, boolean active, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
addGroup(long, long, String,
long, long, Map, Map, int, boolean, int, String, boolean,
boolean, ServiceContext)
userId
- the primary key of the group's creator/ownerparentGroupId
- the primary key of the parent groupclassName
- the entity's class nameclassPK
- the primary key of the entity's instanceliveGroupId
- the primary key of the live groupname
- the entity's namedescription
- the group's description (optionally
null
)type
- the group's type. For more information see GroupConstants
.manualMembership
- whether manual membership is allowed for the
groupmembershipRestriction
- the group's membership restriction. For
more information see GroupConstants
.friendlyURL
- the group's friendlyURL (optionally
null
)site
- whether the group is to be associated with a main siteactive
- whether the group is activeserviceContext
- the service context to be applied (optionally
null
). Can set asset category IDs and asset tag
names for the group, and whether the group is for staging.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occured@Transactional(propagation=SUPPORTS, readOnly=true) public void checkCompanyGroup(long companyId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companycom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Group checkScopeGroup(com.liferay.portal.kernel.model.Layout layout, long userId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
@Transactional(propagation=SUPPORTS, readOnly=true) public void checkSystemGroups(long companyId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companycom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Group deleteGroup(com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
The group is unstaged and its assets and resources including layouts, membership requests, subscriptions, teams, blogs, bookmarks, events, image gallery, journals, message boards, polls, shopping related entities, and wikis are also deleted.
deleteGroup
in interface com.liferay.portal.kernel.service.GroupLocalService
deleteGroup
in class GroupLocalServiceBaseImpl
group
- the groupcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Group deleteGroup(long groupId) throws com.liferay.portal.kernel.exception.PortalException
The group is unstaged and its assets and resources including layouts, membership requests, subscriptions, teams, blogs, bookmarks, events, image gallery, journals, message boards, polls, shopping related entities, and wikis are also deleted.
deleteGroup
in interface com.liferay.portal.kernel.service.GroupLocalService
deleteGroup
in class GroupLocalServiceBaseImpl
groupId
- the primary key of the groupcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic void disableStaging(long groupId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public void enableStaging(long groupId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.Group fetchCompanyGroup(long companyId)
companyId
- the primary key of the companynull
if a matching group
could not be foundpublic com.liferay.portal.kernel.model.Group fetchFriendlyURLGroup(long companyId, String friendlyURL)
companyId
- the primary key of the companyfriendlyURL
- the friendly URLnull
if a
matching group could not be found@ThreadLocalCachable public com.liferay.portal.kernel.model.Group fetchGroup(long groupId)
fetchGroup
in interface com.liferay.portal.kernel.service.GroupLocalService
fetchGroup
in class GroupLocalServiceBaseImpl
@Skip public com.liferay.portal.kernel.model.Group fetchGroup(long companyId, String groupKey)
companyId
- the primary key of the companygroupKey
- the group keynull
if a matching group could not be foundpublic com.liferay.portal.kernel.model.Group fetchStagingGroup(long liveGroupId)
public com.liferay.portal.kernel.model.Group fetchUserGroup(long companyId, long userId)
public com.liferay.portal.kernel.model.Group fetchUserPersonalSiteGroup(long companyId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companynull
if a
matching group could not be foundcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic List<Long> getActiveGroupIds(long userId)
public List<com.liferay.portal.kernel.model.Group> getActiveGroups(long companyId, boolean active)
companyId
- the primary key of the companyactive
- whether to return only active groups, or only inactive
groupspublic com.liferay.portal.kernel.model.Group getCompanyGroup(long companyId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companycom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic List<com.liferay.portal.kernel.model.Group> getCompanyGroups(long companyId, int start, int end)
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 companystart
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)public int getCompanyGroupsCount(long companyId)
companyId
- the primary key of the companypublic com.liferay.portal.kernel.model.Group getFriendlyURLGroup(long companyId, String friendlyURL) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companyfriendlyURL
- the group's friendlyURLcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurred@ThreadLocalCachable public com.liferay.portal.kernel.model.Group getGroup(long groupId) throws com.liferay.portal.kernel.exception.PortalException
getGroup
in interface com.liferay.portal.kernel.service.GroupLocalService
getGroup
in class GroupLocalServiceBaseImpl
groupId
- the primary key of the groupcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurred@Skip public com.liferay.portal.kernel.model.Group getGroup(long companyId, String groupKey) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companygroupKey
- the group keycom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurred@Deprecated public String getGroupDescriptiveName(com.liferay.portal.kernel.model.Group group, Locale locale) throws com.liferay.portal.kernel.exception.PortalException
Group.getDescriptiveName(Locale)
com.liferay.portal.kernel.exception.PortalException
@Deprecated public String getGroupDescriptiveName(long groupId, Locale locale) throws com.liferay.portal.kernel.exception.PortalException
Group.getDescriptiveName(Locale)
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.Group> getGroups(long companyId, long parentGroupId, boolean site)
companyId
- the primary key of the companyparentGroupId
- the primary key of the parent groupsite
- whether the group is to be associated with a main sitenull
if no matches were
foundpublic List<com.liferay.portal.kernel.model.Group> getGroups(long companyId, long parentGroupId, boolean site, boolean inheritContent)
public List<com.liferay.portal.kernel.model.Group> getGroups(long companyId, String treePath, boolean site)
public List<com.liferay.portal.kernel.model.Group> getGroups(long companyId, String className, long parentGroupId)
companyId
- the primary key of the companyclassName
- the class name of the groupparentGroupId
- the primary key of the parent groupnull
if no matches were
foundpublic List<com.liferay.portal.kernel.model.Group> getGroups(long companyId, String className, long parentGroupId, int start, int end)
companyId
- the primary key of the companyclassName
- the class name of the groupparentGroupId
- the primary key of the parent groupstart
- the lower bound of the range of resultsend
- the upper bound of the range of results (not inclusive)public List<com.liferay.portal.kernel.model.Group> getGroups(long[] groupIds) throws com.liferay.portal.kernel.exception.PortalException
groupIds
- the primary keys of the groupscom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic int getGroupsCount(long companyId, long parentGroupId, boolean site)
companyId
- the primary key of the companyparentGroupId
- the primary key of the parent groupsite
- whether the group is to be associated with a main sitepublic int getGroupsCount(long companyId, String className, long parentGroupId)
companyId
- the primary key of the companyclassName
- the class name of the groupparentGroupId
- the primary key of the parent grouppublic com.liferay.portal.kernel.model.Group getLayoutGroup(long companyId, long plid) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companyplid
- the primary key of the layoutcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Group getLayoutPrototypeGroup(long companyId, long layoutPrototypeId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companylayoutPrototypeId
- the primary key of the layout prototypecom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Group getLayoutSetPrototypeGroup(long companyId, long layoutSetPrototypeId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companylayoutSetPrototypeId
- the primary key of the layout set prototypecom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic List<com.liferay.portal.kernel.model.Group> getLayoutsGroups(long companyId, long parentGroupId, boolean site, boolean active, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
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 companyparentGroupId
- the primary key of the parent groupsite
- whether the group is to be associated with a main siteactive
- whether to return only active groups, or only inactive
groupsstart
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)obc
- the comparator to order the groups (optionally
null
)obc
public List<com.liferay.portal.kernel.model.Group> getLayoutsGroups(long companyId, long parentGroupId, boolean site, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
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 companyparentGroupId
- the primary key of the parent groupsite
- whether the group is to be associated with a main sitestart
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)obc
- the comparator to order the groups (optionally
null
)obc
public int getLayoutsGroupsCount(long companyId, long parentGroupId, boolean site)
companyId
- the primary key of the companyparentGroupId
- the primary key of the parent groupsite
- whether the group is to be associated with a main sitepublic int getLayoutsGroupsCount(long companyId, long parentGroupId, boolean site, boolean active)
companyId
- the primary key of the companyparentGroupId
- the primary key of the parent groupsite
- whether the group is to be associated with a main siteactive
- whether to return only active groups, or only inactive
groupspublic List<com.liferay.portal.kernel.model.Group> getLiveGroups()
public List<com.liferay.portal.kernel.model.Group> getNoLayoutsGroups(String className, boolean privateLayout, int start, int end)
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.
className
- the entity's class nameprivateLayout
- whether to include groups with private layout sets
or non-private layout setsstart
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)public List<com.liferay.portal.kernel.model.Group> getNullFriendlyURLGroups()
null
or empty friendly
URLs.null
or empty friendly
URLspublic com.liferay.portal.kernel.model.Group getOrganizationGroup(long companyId, long organizationId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companyorganizationId
- the primary key of the organizationcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic List<com.liferay.portal.kernel.model.Group> getOrganizationsGroups(List<com.liferay.portal.kernel.model.Organization> organizations)
organizations
- the organizationspublic List<com.liferay.portal.kernel.model.Group> getOrganizationsRelatedGroups(List<com.liferay.portal.kernel.model.Organization> organizations)
organizations
- the organizationspublic List<com.liferay.portal.kernel.model.Group> getParentGroups(long groupId) throws com.liferay.portal.kernel.exception.PortalException
groupId
- the primary key of the groupcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic List<com.liferay.portal.kernel.model.Group> getStagedSites()
public com.liferay.portal.kernel.model.Group getStagingGroup(long liveGroupId) throws com.liferay.portal.kernel.exception.PortalException
liveGroupId
- the primary key of the live groupcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Group getUserGroup(long companyId, long userId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companyuserId
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Group getUserGroupGroup(long companyId, long userGroupId) throws com.liferay.portal.kernel.exception.PortalException
UserGroup
entity.companyId
- the primary key of the companyuserGroupId
- the primary key of the user groupcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic List<com.liferay.portal.kernel.model.Group> getUserGroups(long userId, boolean inherit) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userinherit
- whether to include the user's inherited organization
groups and user groupscom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic List<com.liferay.portal.kernel.model.Group> getUserGroups(long userId, boolean inherit, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
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.
userId
- the primary key of the userinherit
- whether to include the user's inherited organization
groups and user groupsstart
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic List<com.liferay.portal.kernel.model.Group> getUserGroupsGroups(List<com.liferay.portal.kernel.model.UserGroup> userGroups) throws com.liferay.portal.kernel.exception.PortalException
userGroups
- the user groupscom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic List<com.liferay.portal.kernel.model.Group> getUserGroupsRelatedGroups(List<com.liferay.portal.kernel.model.UserGroup> userGroups)
userGroups
- the user groupspublic List<com.liferay.portal.kernel.model.Group> getUserOrganizationsGroups(long userId, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
organizations.membership.strict
is set to
true
.
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.
userId
- the primary key of the userstart
- the lower bound of the range of groups to considerend
- the upper bound of the range of groups to consider (not
inclusive)com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Group getUserPersonalSiteGroup(long companyId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companycom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic List<com.liferay.portal.kernel.model.Group> getUserSitesGroups(long userId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.Group> getUserSitesGroups(long userId, boolean includeAdministrative) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public boolean hasStagingGroup(long liveGroupId)
true
if the live group has a staging group.liveGroupId
- the primary key of the live grouptrue
if the live group has a staging group;
false
otherwisepublic boolean hasUserGroup(long userId, long groupId)
true
if the user is immediately associated with the
group, or associated with the group via the user's organizations,
inherited organizations, or user groups.hasUserGroup
in interface com.liferay.portal.kernel.service.GroupLocalService
hasUserGroup
in class GroupLocalServiceBaseImpl
userId
- the primary key of the usergroupId
- the primary key of the grouptrue
if the user is associated with the group;
false
otherwisepublic boolean hasUserGroup(long userId, long groupId, boolean inherit)
true
if the user is immediately associated with the
group, or optionally if the user is associated with the group via the
user's organizations, inherited organizations, or user groups.userId
- the primary key of the usergroupId
- the primary key of the groupinherit
- whether to include organization groups and user groups to
which the user belongs in the determinationtrue
if the user is associated with the group;
false
otherwise@Skip public boolean isLiveGroupActive(com.liferay.portal.kernel.model.Group group)
public com.liferay.portal.kernel.model.Group loadFetchGroup(long companyId, String groupKey)
companyId
- the primary key of the companygroupKey
- the group keynull
if a matching group could not be foundpublic com.liferay.portal.kernel.model.Group loadGetGroup(long companyId, String groupKey) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companygroupKey
- the group keycom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic void rebuildTree(long companyId) throws com.liferay.portal.kernel.exception.PortalException
Only call this method if the tree has become stale through operations other than normal CRUD. Under normal circumstances the tree is automatically rebuilt whenever necessary.
companyId
- the primary key of the group's companycom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic List<com.liferay.portal.kernel.model.Group> search(long companyId, LinkedHashMap<String,Object> params, int start, int end)
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 companyparams
- the finder params (optionally null
). To
include a user's organizations, inherited organizations, and user
groups in the search, add an entry with key
"usersGroups" mapped to the user's ID and an entry with
key "inherit" mapped to a non-null
object.
For more information see GroupFinder
.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)public List<com.liferay.portal.kernel.model.Group> search(long companyId, long parentGroupId, String keywords, LinkedHashMap<String,Object> params, int start, int end)
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 companyparentGroupId
- the primary key of the parent groupkeywords
- the keywords (space separated), which may occur in the
sites's name, or description (optionally null
)params
- the finder params (optionally null
). To
include the user's inherited organizations and user groups in the
search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)public List<com.liferay.portal.kernel.model.Group> search(long companyId, long parentGroupId, String keywords, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
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 companyparentGroupId
- the primary key of the parent groupkeywords
- the keywords (space separated), which may occur in the
sites's name, or description (optionally null
)params
- the finder params (optionally null
). To
include the user's inherited organizations and user groups in the
search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)obc
- the comparator to order the groups (optionally
null
)obc
public List<com.liferay.portal.kernel.model.Group> search(long companyId, long parentGroupId, String name, String description, LinkedHashMap<String,Object> params, boolean andOperator, int start, int end)
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 companyparentGroupId
- the primary key of the parent groupname
- the group's name (optionally null
)description
- the group's description (optionally
null
)params
- the finder params (optionally null
). To
include the user's inherited organizations and user groups in the
search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.andOperator
- whether every field must match its keywords, or just
one field.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)public List<com.liferay.portal.kernel.model.Group> search(long companyId, long parentGroupId, String name, String description, LinkedHashMap<String,Object> params, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
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 companyparentGroupId
- the primary key of the parent groupname
- the group's name (optionally null
)description
- the group's description (optionally
null
)params
- the finder params (optionally null
). To
include the user's inherited organizations and user groups in the
search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.andOperator
- whether every field must match its keywords, or just
one field.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)obc
- the comparator to order the groups (optionally
null
)obc
public List<com.liferay.portal.kernel.model.Group> search(long companyId, long[] classNameIds, long parentGroupId, String keywords, LinkedHashMap<String,Object> params, int start, int end)
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 companyclassNameIds
- the primary keys of the class names of the entities
the groups are related to (optionally null
)parentGroupId
- the primary key of the parent groupkeywords
- the keywords (space separated), which may occur in the
sites's name, or description (optionally null
)params
- the finder params (optionally null
). To
include a user's organizations, inherited organizations, and user
groups in the search, add an entry with key
"usersGroups" mapped to the user's ID and an entry with
key "inherit" mapped to a non-null
object.
For more information see GroupFinder
.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)public List<com.liferay.portal.kernel.model.Group> search(long companyId, long[] classNameIds, long parentGroupId, String keywords, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
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 companyclassNameIds
- the primary keys of the class names of the entities
the groups are related to (optionally null
)parentGroupId
- the primary key of the parent groupkeywords
- the keywords (space separated), which may occur in the
sites's name, or description (optionally null
)params
- the finder params (optionally null
). To
include a user's organizations, inherited organizations, and user
groups in the search, add an entry with key
"usersGroups" mapped to the user's ID and an entry with
key "inherit" mapped to a non-null
object.
For more information see GroupFinder
.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)obc
- the comparator to order the groups (optionally
null
)obc
public List<com.liferay.portal.kernel.model.Group> search(long companyId, long[] classNameIds, long parentGroupId, String name, String description, LinkedHashMap<String,Object> params, boolean andOperator, int start, int end)
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 companyclassNameIds
- the primary keys of the class names of the entities
the groups are related to (optionally null
)parentGroupId
- the primary key of the parent groupname
- the group's name (optionally null
)description
- the group's description (optionally
null
)params
- the finder params (optionally null
). To
include a user's organizations, inherited organizations, and user
groups in the search, add an entry with key
"usersGroups" mapped to the user's ID and an entry with
key "inherit" mapped to a non-null
object.
For more information see GroupFinder
.andOperator
- whether every field must match its keywords, or just
one field.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)public List<com.liferay.portal.kernel.model.Group> search(long companyId, long[] classNameIds, long parentGroupId, String name, String description, LinkedHashMap<String,Object> params, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
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 companyclassNameIds
- the primary keys of the class names of the entities
the groups are related to (optionally null
)parentGroupId
- the primary key of the parent groupname
- the group's name (optionally null
)description
- the group's description (optionally
null
)params
- the finder params (optionally null
). To
include a user's organizations, inherited organizations, and user
groups in the search, add an entry with key
"usersGroups" mapped to the user's ID and an entry with
key "inherit" mapped to a non-null
object.
For more information see GroupFinder
.andOperator
- whether every field must match its keywords, or just
one field.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)obc
- the comparator to order the groups (optionally
null
)obc
public List<com.liferay.portal.kernel.model.Group> search(long companyId, long[] classNameIds, String keywords, LinkedHashMap<String,Object> params, int start, int end)
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 companyclassNameIds
- the primary keys of the class names of the entities
the groups are related to (optionally null
)keywords
- the keywords (space separated), which may occur in the
sites's name, or description (optionally null
)params
- the finder params (optionally null
). To
include a user's organizations, inherited organizations, and user
groups in the search, add an entry with key
"usersGroups" mapped to the user's ID and an entry with
key "inherit" mapped to a non-null
object.
For more information see GroupFinder
.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)public List<com.liferay.portal.kernel.model.Group> search(long companyId, long[] classNameIds, String keywords, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
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 companyclassNameIds
- the primary keys of the class names of the entities
the groups are related to (optionally null
)keywords
- the keywords (space separated), which may occur in the
sites's name, or description (optionally null
)params
- the finder params (optionally null
). To
include a user's organizations, inherited organizations, and user
groups in the search, add an entry with key
"usersGroups" mapped to the user's ID and an entry with
key "inherit" mapped to a non-null
object.
For more information see GroupFinder
.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)obc
- the comparator to order the groups (optionally
null
)obc
public List<com.liferay.portal.kernel.model.Group> search(long companyId, long[] classNameIds, String name, String description, LinkedHashMap<String,Object> params, boolean andOperator, int start, int end)
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 companyclassNameIds
- the primary keys of the class names of the entities
the groups are related to (optionally null
)name
- the group's name (optionally null
)description
- the group's description (optionally
null
)params
- the finder params (optionally null
). To
include a user's organizations, inherited organizations, and user
groups in the search, add an entry with key
"usersGroups" mapped to the user's ID and an entry with
key "inherit" mapped to a non-null
object.
For more information see GroupFinder
.andOperator
- whether every field must match its keywords, or just
one field.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)public List<com.liferay.portal.kernel.model.Group> search(long companyId, long[] classNameIds, String name, String description, LinkedHashMap<String,Object> params, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
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 companyclassNameIds
- the primary keys of the class names of the entities
the groups are related to (optionally null
)name
- the group's name (optionally null
)description
- the group's description (optionally
null
)params
- the finder params (optionally null
). To
include a user's organizations, inherited organizations, and user
groups in the search, add an entry with key
"usersGroups" mapped to the user's ID and an entry with
key "inherit" mapped to a non-null
object.
For more information see GroupFinder
.andOperator
- whether every field must match its keywords, or just
one field.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)obc
- the comparator to order the groups (optionally
null
)obc
@ThreadLocalCachable public List<com.liferay.portal.kernel.model.Group> search(long companyId, String keywords, LinkedHashMap<String,Object> params, int start, int end)
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 companykeywords
- the keywords (space separated), which may occur in the
sites's name, or description (optionally null
)params
- the finder params (optionally null
). To
include the user's inherited organizations and user groups in the
search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)public List<com.liferay.portal.kernel.model.Group> search(long companyId, String keywords, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
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 companykeywords
- the keywords (space separated), which may occur in the
sites's name, or description (optionally null
)params
- the finder params (optionally null
). To
include the user's inherited organizations and user groups in the
search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)obc
- the comparator to order the groups (optionally
null
)obc
public List<com.liferay.portal.kernel.model.Group> search(long companyId, String name, String description, LinkedHashMap<String,Object> params, boolean andOperator, int start, int end)
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 companyname
- the group's name (optionally null
)description
- the group's description (optionally
null
)params
- the finder params (optionally null
). To
include the user's inherited organizations and user groups in the
search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.andOperator
- whether every field must match its keywords, or just
one field.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)public List<com.liferay.portal.kernel.model.Group> search(long companyId, String name, String description, LinkedHashMap<String,Object> params, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
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 companyname
- the group's name (optionally null
)description
- the group's description (optionally
null
)params
- the finder params (optionally null
). To
include the user's inherited organizations and user groups in the
search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.andOperator
- whether every field must match its keywords, or just
one field.start
- the lower bound of the range of groups to returnend
- the upper bound of the range of groups to return (not
inclusive)obc
- the comparator to order the groups (optionally
null
)obc
@ThreadLocalCachable public int searchCount(long companyId, long parentGroupId, String keywords, LinkedHashMap<String,Object> params)
companyId
- the primary key of the companyparentGroupId
- the primary key of the parent groupkeywords
- the keywords (space separated), which may occur in the
sites's name, or description (optionally null
)params
- the finder params (optionally null
). To
include the user's inherited organization groups and user groups
in the search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.@ThreadLocalCachable public int searchCount(long companyId, long parentGroupId, String name, String description, LinkedHashMap<String,Object> params, boolean andOperator)
companyId
- the primary key of the companyparentGroupId
- the primary key of the parent groupname
- the group's name (optionally null
)description
- the group's description (optionally
null
)params
- the finder params (optionally null
). To
include the user's inherited organization groups and user groups
in the search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.andOperator
- whether every field must match its keywords, or just
one field.@ThreadLocalCachable public int searchCount(long companyId, long[] classNameIds, long parentGroupId, String keywords, LinkedHashMap<String,Object> params)
companyId
- the primary key of the companyclassNameIds
- the primary keys of the class names of the entities
the groups are related to (optionally null
)parentGroupId
- the primary key of the parent groupkeywords
- the keywords (space separated), which may occur in the
sites's name, or description (optionally null
)params
- the finder params (optionally null
). To
include the user's inherited organization groups and user groups
in the search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.@ThreadLocalCachable public int searchCount(long companyId, long[] classNameIds, long parentGroupId, String name, String description, LinkedHashMap<String,Object> params, boolean andOperator)
companyId
- the primary key of the companyclassNameIds
- the primary keys of the class names of the entities
the groups are related to (optionally null
)parentGroupId
- the primary key of the parent groupname
- the group's name (optionally null
)description
- the group's description (optionally
null
)params
- the finder params (optionally null
). To
include the user's inherited organization groups and user groups
in the search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.andOperator
- whether every field must match its keywords, or just
one field.@ThreadLocalCachable public int searchCount(long companyId, long[] classNameIds, String keywords, LinkedHashMap<String,Object> params)
companyId
- the primary key of the companyclassNameIds
- the primary keys of the class names of the entities
the groups are related to (optionally null
)keywords
- the keywords (space separated), which may occur in the
sites's name, or description (optionally null
)params
- the finder params (optionally null
). To
include the user's inherited organization groups and user groups
in the search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.@ThreadLocalCachable public int searchCount(long companyId, long[] classNameIds, String name, String description, LinkedHashMap<String,Object> params, boolean andOperator)
companyId
- the primary key of the companyclassNameIds
- the primary keys of the class names of the entities
the groups are related to (optionally null
)name
- the group's name (optionally null
)description
- the group's description (optionally
null
)params
- the finder params (optionally null
). To
include the user's inherited organization groups and user groups
in the search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.andOperator
- whether every field must match its keywords, or just
one field.@ThreadLocalCachable public int searchCount(long companyId, String keywords, LinkedHashMap<String,Object> params)
companyId
- the primary key of the companykeywords
- the keywords (space separated), which may occur in the
sites's name, or description (optionally null
)params
- the finder params (optionally null
). To
include the user's inherited organization groups and user groups
in the search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.@ThreadLocalCachable public int searchCount(long companyId, String name, String description, LinkedHashMap<String,Object> params, boolean andOperator)
companyId
- the primary key of the companyname
- the group's name (optionally null
)description
- the group's description (optionally
null
)params
- the finder params (optionally null
). To
include the user's inherited organization groups and user groups
in the search, add entries having "usersGroups" and
"inherit" as keys mapped to the the user's ID. For more
information see GroupFinder
.andOperator
- whether every field must match its keywords, or just
one field.public void unsetRoleGroups(long roleId, long[] groupIds)
roleId
- the primary key of the rolegroupIds
- the primary keys of the groupspublic void unsetUserGroups(long userId, long[] groupIds)
userId
- the primary key of the usergroupIds
- the primary keys of the groupspublic void updateAsset(long userId, com.liferay.portal.kernel.model.Group group, long[] assetCategoryIds, String[] assetTagNames) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the usergroup
- the groupassetCategoryIds
- the primary keys of the asset categories
(optionally null
)assetTagNames
- the asset tag names (optionally null
)com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Group updateFriendlyURL(long groupId, String friendlyURL) throws com.liferay.portal.kernel.exception.PortalException
groupId
- the primary key of the groupfriendlyURL
- the group's new friendlyURL (optionally
null
)com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Group updateGroup(long groupId, long parentGroupId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, int type, boolean manualMembership, int membershipRestriction, String friendlyURL, boolean inheritContent, boolean active, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
@Deprecated public com.liferay.portal.kernel.model.Group updateGroup(long groupId, long parentGroupId, String name, String description, int type, boolean manualMembership, int membershipRestriction, String friendlyURL, boolean inheritContent, boolean active, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
updateGroup(long, long, Map,
Map, int, boolean, int, String, boolean, boolean,
ServiceContext)
groupId
- the primary key of the groupparentGroupId
- the primary key of the parent groupname
- the name's keydescription
- the group's new description (optionally
null
)type
- the group's new type. For more information see GroupConstants
.manualMembership
- whether manual membership is allowed for the
groupmembershipRestriction
- the group's membership restriction. For
more information see GroupConstants
.friendlyURL
- the group's new friendlyURL (optionally
null
)inheritContent
- whether to inherit content from the parent
groupactive
- whether the group is activeserviceContext
- the service context to be applied (optionally
null
). Can set asset category IDs and asset tag
names for the group.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Group updateGroup(long groupId, String typeSettings) throws com.liferay.portal.kernel.exception.PortalException
groupId
- the primary key of the grouptypeSettings
- the group's new type settings (optionally
null
)com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Group updateSite(long groupId, boolean site) throws com.liferay.portal.kernel.exception.PortalException
groupId
- the primary key of the groupsite
- whether the group is to be associated with a main sitecom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredprotected void addControlPanelLayouts(com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void addDefaultGuestPublicLayoutByProperties(com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void addDefaultGuestPublicLayouts(com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void addDefaultGuestPublicLayoutsByLAR(com.liferay.portal.kernel.model.Group group, File larFile) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void addPortletDefaultData(com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void deletePortletData(com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected Collection<com.liferay.portal.kernel.model.Group> doSearch(long companyId, long[] classNameIds, long parentGroupId, String[] names, String[] descriptions, LinkedHashMap<String,Object> params, boolean andOperator)
protected long[] getClassNameIds()
protected String getFriendlyURL(long companyId, long groupId, long classNameId, long classPK, String friendlyName, String friendlyURL) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected String getFriendlyURL(String friendlyURL)
protected String getOrgGroupName(String name)
protected List<com.liferay.exportimport.kernel.lar.PortletDataHandler> getPortletDataHandlers(com.liferay.portal.kernel.model.Group group)
protected String[] getSearchNames(long companyId, String name)
protected void initImportLARFile()
protected void initUserPersonalSitePermissions(com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected boolean isParentGroup(long parentGroupId, long groupId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected boolean isStaging(com.liferay.portal.kernel.service.ServiceContext serviceContext)
protected boolean isUseComplexSQL(long[] classNameIds)
protected boolean matches(String s, String[] keywords)
protected void reindex(long companyId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void setCompanyPermissions(com.liferay.portal.kernel.model.Role role, String name, String[] actionIds) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void setRolePermissions(com.liferay.portal.kernel.model.Group group, com.liferay.portal.kernel.model.Role role, String name) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void setRolePermissions(com.liferay.portal.kernel.model.Group group, com.liferay.portal.kernel.model.Role role, String name, String[] actionIds) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected List<com.liferay.portal.kernel.model.Group> sort(Collection<com.liferay.portal.kernel.model.Group> groups, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> obc)
protected void unscheduleStaging(com.liferay.portal.kernel.model.Group group)
protected void validateFriendlyURL(long companyId, long groupId, long classNameId, long classPK, String friendlyURL) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validateGroupKey(long groupId, long companyId, String groupKey, boolean site) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validateInheritContent(long parentGroupId, boolean inheritContent) throws com.liferay.portal.kernel.exception.GroupInheritContentException
com.liferay.portal.kernel.exception.GroupInheritContentException
protected void validateLanguageIds(String defaultLanguageId, String languageIds) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validateParentGroup(long groupId, long parentGroupId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException