Class GroupImpl
- All Implemented Interfaces:
com.liferay.portal.kernel.model.AttachedModel
,com.liferay.portal.kernel.model.BaseModel<com.liferay.portal.kernel.model.Group>
,com.liferay.portal.kernel.model.change.tracking.CTModel<com.liferay.portal.kernel.model.Group>
,com.liferay.portal.kernel.model.ClassedModel
,com.liferay.portal.kernel.model.ExternalReferenceCodeModel
,com.liferay.portal.kernel.model.Group
,com.liferay.portal.kernel.model.GroupModel
,com.liferay.portal.kernel.model.LocalizedModel
,com.liferay.portal.kernel.model.MVCCModel
,com.liferay.portal.kernel.model.PersistedModel
,com.liferay.portal.kernel.model.ShardedModel
,com.liferay.portal.kernel.model.TreeModel
,com.liferay.portal.kernel.model.TypedModel
,Serializable
,Cloneable
,Comparable<com.liferay.portal.kernel.model.Group>
Groups are most used in Liferay as a resource container for permissioning and content scoping purposes. For instance, an site is group, meaning that it can contain layouts, web content, wiki entries, etc. However, a single layout can also be a group containing its own unique set of resources. An example of this would be a site that has several distinct wikis on different layouts. Each of these layouts would have its own group, and all of the nodes in the wiki for a certain layout would be associated with that layout's group. This allows users to be given different permissions on each of the wikis, even though they are all within the same site. In addition to sites and layouts, users and organizations are also groups.
Groups also have a second, partially conflicting purpose in Liferay. For legacy reasons, groups are also the model used to represent sites (known as communities before Liferay v6.1). Confusion may arise from the fact that a site group is both the resource container and the site itself, whereas a layout or organization would have both a primary model and an associated group.
- Author:
- Brian Wing Shun Chan
- See Also:
-
Field Summary
Fields inherited from class com.liferay.portal.model.impl.GroupModelImpl
ACTIVE_COLUMN_BITMASK, CLASSNAMEID_COLUMN_BITMASK, CLASSPK_COLUMN_BITMASK, COLUMN_BITMASK_ENABLED, COMPANYID_COLUMN_BITMASK, DATA_SOURCE, ENTITY_CACHE_ENABLED, EXTERNALREFERENCECODE_COLUMN_BITMASK, FINDER_CACHE_ENABLED, FINDER_CACHE_ENABLED_GROUPS_ORGS, FINDER_CACHE_ENABLED_GROUPS_ROLES, FINDER_CACHE_ENABLED_GROUPS_USERGROUPS, FINDER_CACHE_ENABLED_USERS_GROUPS, FRIENDLYURL_COLUMN_BITMASK, GROUPID_COLUMN_BITMASK, GROUPKEY_COLUMN_BITMASK, INHERITCONTENT_COLUMN_BITMASK, LIVEGROUPID_COLUMN_BITMASK, LOCK_EXPIRATION_TIME, MAPPING_TABLE_GROUPS_ORGS_COLUMNS, MAPPING_TABLE_GROUPS_ORGS_NAME, MAPPING_TABLE_GROUPS_ORGS_SQL_CREATE, MAPPING_TABLE_GROUPS_ROLES_COLUMNS, MAPPING_TABLE_GROUPS_ROLES_NAME, MAPPING_TABLE_GROUPS_ROLES_SQL_CREATE, MAPPING_TABLE_GROUPS_USERGROUPS_COLUMNS, MAPPING_TABLE_GROUPS_USERGROUPS_NAME, MAPPING_TABLE_GROUPS_USERGROUPS_SQL_CREATE, MAPPING_TABLE_USERS_GROUPS_COLUMNS, MAPPING_TABLE_USERS_GROUPS_NAME, MAPPING_TABLE_USERS_GROUPS_SQL_CREATE, NAME_COLUMN_BITMASK, ORDER_BY_JPQL, ORDER_BY_SQL, PARENTGROUPID_COLUMN_BITMASK, SESSION_FACTORY, SITE_COLUMN_BITMASK, TABLE_COLUMNS, TABLE_COLUMNS_MAP, TABLE_NAME, TABLE_SQL_CREATE, TABLE_SQL_DROP, TREEPATH_COLUMN_BITMASK, TX_MANAGER, TYPE_COLUMN_BITMASK, UUID_COLUMN_BITMASK
Fields inherited from interface com.liferay.portal.kernel.model.Group
GROUP_ID_ACCESSOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
List<com.liferay.portal.kernel.model.Group>
List<com.liferay.portal.kernel.model.Group>
getChildren
(boolean site) List<com.liferay.portal.kernel.model.Group>
getChildrenWithLayouts
(boolean site, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> orderByComparator) int
getChildrenWithLayoutsCount
(boolean site) protected long
getDefaultPlid
(boolean privateLayout) long
long
List<com.liferay.portal.kernel.model.Group>
getDescendants
(boolean site) getDescriptiveName
(Locale locale) getDisplayURL
(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) getDisplayURL
(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, boolean privateLayout) getDisplayURL
(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, boolean privateLayout, boolean controlPanel) getIconURL
(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) getLayoutRootNodeName
(boolean privateLayout, Locale locale) com.liferay.portal.kernel.model.Group
getLogoURL
(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, boolean useDefault) long
com.liferay.portal.kernel.model.Group
com.liferay.portal.kernel.util.UnicodeProperties
getPathFriendlyURL
(boolean privateLayout, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) com.liferay.portal.kernel.model.LayoutSet
int
com.liferay.portal.kernel.model.LayoutSet
int
long
getScopeDescriptiveName
(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) getScopeLabel
(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) getScopeSimpleName
(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) com.liferay.portal.kernel.model.Group
com.liferay.portal.kernel.util.UnicodeProperties
getUnambiguousName
(String name, Locale locale) boolean
hasAncestor
(long groupId) boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isDepot()
boolean
isGuest()
boolean
isInStagingPortlet
(String portletId) boolean
isLayout()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isRoot()
boolean
isShowSite
(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, boolean privateSite) boolean
isStaged()
boolean
isStagedPortlet
(String portletId) boolean
boolean
boolean
isUser()
boolean
boolean
void
setNameMap
(Map<Locale, String> nameMap, Locale defaultLocale) void
setTypeSettings
(String typeSettings) void
setTypeSettingsProperties
(com.liferay.portal.kernel.util.UnicodeProperties typeSettingsUnicodeProperties) Methods inherited from class com.liferay.portal.model.impl.GroupBaseImpl
buildTreePath, persist, updateTreePath
Methods inherited from class com.liferay.portal.model.impl.GroupModelImpl
clone, cloneWithOriginalValues, compareTo, equals, getActive, getAttributeGetterFunctions, getAttributeSetterBiConsumers, getAvailableLanguageIds, getClassName, getClassNameId, getClassPK, getColumnBitmask, getColumnBitmask, getColumnOriginalValue, getColumnValue, getCompanyId, getCreatorUserId, getCreatorUserUuid, getCtCollectionId, getDefaultLanguageId, getDescription, getDescription, getDescription, getDescription, getDescription, getDescriptionCurrentLanguageId, getDescriptionCurrentValue, getDescriptionMap, getExpandoBridge, getExternalReferenceCode, getFriendlyURL, getGroupId, getGroupKey, getInheritContent, getLiveGroupId, getManualMembership, getMembershipRestriction, getModelAttributes, getModelClass, getModelClassName, getModifiedDate, getMvccVersion, getName, getName, getName, getName, getName, getNameCurrentLanguageId, getNameCurrentValue, getNameMap, getOriginalActive, getOriginalClassNameId, getOriginalClassPK, getOriginalCompanyId, getOriginalExternalReferenceCode, getOriginalFriendlyURL, getOriginalGroupId, getOriginalGroupKey, getOriginalInheritContent, getOriginalLiveGroupId, getOriginalName, getOriginalParentGroupId, getOriginalSite, getOriginalTreePath, getOriginalType, getOriginalUuid, getParentGroupId, getPrimaryKey, getPrimaryKeyObj, getRemoteStagingGroupCount, getSite, getTreePath, getType, getUuid, hashCode, hasSetModifiedDate, isActive, isEntityCacheEnabled, isFinderCacheEnabled, isInheritContent, isManualMembership, isSite, prepareLocalizedFieldsForImport, prepareLocalizedFieldsForImport, resetOriginalValues, setActive, setClassName, setClassNameId, setClassPK, setCompanyId, setCreatorUserId, setCreatorUserUuid, setCtCollectionId, setDescription, setDescription, setDescription, setDescriptionCurrentLanguageId, setDescriptionMap, setDescriptionMap, setExpandoBridgeAttributes, setExternalReferenceCode, setFriendlyURL, setGroupId, setGroupKey, setInheritContent, setLiveGroupId, setManualMembership, setMembershipRestriction, setModelAttributes, setModifiedDate, setMvccVersion, setName, setName, setName, setNameCurrentLanguageId, setNameMap, setParentGroupId, setPrimaryKey, setPrimaryKeyObj, setRemoteStagingGroupCount, setSite, setTreePath, setType, setUuid, toCacheModel, toEscapedModel, toString
Methods inherited from class com.liferay.portal.kernel.model.impl.BaseModelImpl
getLocale, isCachedModel, isEscapedModel, isNew, setCachedModel, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setNew, toUnescapedModel
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.liferay.portal.kernel.model.BaseModel
clone, getAttributeGetterFunctions, getAttributeSetterBiConsumers, getExpandoBridge, getModelAttributes, getPrimaryKeyObj, isCachedModel, isEntityCacheEnabled, isEscapedModel, isFinderCacheEnabled, isNew, resetOriginalValues, setCachedModel, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setModelAttributes, setNew, setPrimaryKeyObj, toCacheModel, toEscapedModel, toUnescapedModel
Methods inherited from interface com.liferay.portal.kernel.model.ClassedModel
getModelClass, getModelClassName
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.liferay.portal.kernel.model.GroupModel
cloneWithOriginalValues, getActive, getAvailableLanguageIds, getClassName, getClassNameId, getClassPK, getCompanyId, getCreatorUserId, getCreatorUserUuid, getCtCollectionId, getDefaultLanguageId, getDescription, getDescription, getDescription, getDescription, getDescription, getDescriptionCurrentLanguageId, getDescriptionCurrentValue, getDescriptionMap, getExternalReferenceCode, getFriendlyURL, getGroupId, getGroupKey, getInheritContent, getLiveGroupId, getManualMembership, getMembershipRestriction, getModifiedDate, getMvccVersion, getName, getName, getName, getName, getName, getNameCurrentLanguageId, getNameCurrentValue, getNameMap, getParentGroupId, getPrimaryKey, getRemoteStagingGroupCount, getSite, getTreePath, getType, getUuid, isActive, isInheritContent, isManualMembership, isSite, prepareLocalizedFieldsForImport, prepareLocalizedFieldsForImport, setActive, setClassName, setClassNameId, setClassPK, setCompanyId, setCreatorUserId, setCreatorUserUuid, setCtCollectionId, setDescription, setDescription, setDescription, setDescriptionCurrentLanguageId, setDescriptionMap, setDescriptionMap, setExternalReferenceCode, setFriendlyURL, setGroupId, setGroupKey, setInheritContent, setLiveGroupId, setManualMembership, setMembershipRestriction, setModifiedDate, setMvccVersion, setName, setName, setName, setNameCurrentLanguageId, setNameMap, setParentGroupId, setPrimaryKey, setRemoteStagingGroupCount, setSite, setTreePath, setType, setUuid, toXmlString
Methods inherited from interface com.liferay.portal.kernel.model.TreeModel
getPrimaryKeyObj, getTreePath
-
Constructor Details
-
GroupImpl
public GroupImpl()
-
-
Method Details
-
clearStagingGroup
public void clearStagingGroup() -
getAncestors
-
getChildren
-
getChildrenWithLayouts
public List<com.liferay.portal.kernel.model.Group> getChildrenWithLayouts(boolean site, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Group> orderByComparator) -
getChildrenWithLayoutsCount
public int getChildrenWithLayoutsCount(boolean site) -
getDefaultPrivatePlid
public long getDefaultPrivatePlid() -
getDefaultPublicPlid
public long getDefaultPublicPlid() -
getDescendants
-
getDescriptiveName
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getDescriptiveName
public String getDescriptiveName(Locale locale) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getDescriptiveNameMap
public Map<Locale,String> getDescriptiveNameMap() throws com.liferay.portal.kernel.exception.PortalException- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getDisplayURL
-
getDisplayURL
public String getDisplayURL(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, boolean privateLayout) -
getDisplayURL
public String getDisplayURL(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, boolean privateLayout, boolean controlPanel) -
getIconCssClass
-
getIconURL
-
getLayoutRootNodeName
-
getLiveGroup
public com.liferay.portal.kernel.model.Group getLiveGroup() -
getLiveParentTypeSettingsProperty
-
getLogoURL
public String getLogoURL(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, boolean useDefault) -
getOrganizationId
public long getOrganizationId() -
getParentGroup
public com.liferay.portal.kernel.model.Group getParentGroup() -
getParentLiveGroupTypeSettingsProperties
public com.liferay.portal.kernel.util.UnicodeProperties getParentLiveGroupTypeSettingsProperties() -
getPathFriendlyURL
public String getPathFriendlyURL(boolean privateLayout, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) -
getPrivateLayoutSet
public com.liferay.portal.kernel.model.LayoutSet getPrivateLayoutSet() -
getPrivateLayoutsPageCount
public int getPrivateLayoutsPageCount() -
getPublicLayoutSet
public com.liferay.portal.kernel.model.LayoutSet getPublicLayoutSet() -
getPublicLayoutsPageCount
public int getPublicLayoutsPageCount() -
getRemoteLiveGroupId
public long getRemoteLiveGroupId() -
getScopeDescriptiveName
public String getScopeDescriptiveName(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getScopeLabel
-
getScopeSimpleName
-
getStagingGroup
public com.liferay.portal.kernel.model.Group getStagingGroup() -
getTypeLabel
-
getTypeSettings
- Specified by:
getTypeSettings
in interfacecom.liferay.portal.kernel.model.GroupModel
- Overrides:
getTypeSettings
in classGroupModelImpl
-
getTypeSettingsProperties
public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties() -
getTypeSettingsProperty
-
getUnambiguousName
-
hasAncestor
public boolean hasAncestor(long groupId) -
hasLocalOrRemoteStagingGroup
public boolean hasLocalOrRemoteStagingGroup() -
hasPrivateLayouts
public boolean hasPrivateLayouts() -
hasPublicLayouts
public boolean hasPublicLayouts() -
hasRemoteStagingGroup
public boolean hasRemoteStagingGroup() -
hasStagingGroup
public boolean hasStagingGroup() -
isCompany
public boolean isCompany() -
isCompanyStagingGroup
public boolean isCompanyStagingGroup() -
isContentSharingWithChildrenEnabled
public boolean isContentSharingWithChildrenEnabled() -
isControlPanel
public boolean isControlPanel() -
isDepot
public boolean isDepot() -
isGuest
public boolean isGuest() -
isInStagingPortlet
-
isLayout
public boolean isLayout() -
isLayoutPrototype
public boolean isLayoutPrototype() -
isLayoutSetPrototype
public boolean isLayoutSetPrototype() -
isLimitedToParentSiteMembers
public boolean isLimitedToParentSiteMembers() -
isOrganization
public boolean isOrganization() -
isPrivateLayoutsEnabled
public boolean isPrivateLayoutsEnabled() -
isRegularSite
public boolean isRegularSite() -
isRoot
public boolean isRoot() -
isShowSite
public boolean isShowSite(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, boolean privateSite) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
isStaged
public boolean isStaged() -
isStagedPortlet
-
isStagedRemotely
public boolean isStagedRemotely() -
isStagingGroup
public boolean isStagingGroup() -
isUser
public boolean isUser() -
isUserGroup
public boolean isUserGroup() -
isUserPersonalSite
public boolean isUserPersonalSite() -
setNameMap
- Specified by:
setNameMap
in interfacecom.liferay.portal.kernel.model.GroupModel
- Overrides:
setNameMap
in classGroupModelImpl
-
setTypeSettings
- Specified by:
setTypeSettings
in interfacecom.liferay.portal.kernel.model.GroupModel
- Overrides:
setTypeSettings
in classGroupModelImpl
-
setTypeSettingsProperties
public void setTypeSettingsProperties(com.liferay.portal.kernel.util.UnicodeProperties typeSettingsUnicodeProperties) -
getDefaultPlid
protected long getDefaultPlid(boolean privateLayout)
-