Class GroupImpl

Object
com.liferay.portal.kernel.model.impl.BaseModelImpl<com.liferay.portal.kernel.model.Group>
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>

@JSON(strict=true) public class GroupImpl extends GroupBaseImpl
Represents either a site or a generic resource container.

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:
  • Constructor Details

    • GroupImpl

      public GroupImpl()
  • Method Details

    • clearStagingGroup

      public void clearStagingGroup()
    • getAncestors

      public List<com.liferay.portal.kernel.model.Group> getAncestors()
    • getChildren

      public List<com.liferay.portal.kernel.model.Group> getChildren(boolean site)
    • 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

      public List<com.liferay.portal.kernel.model.Group> getDescendants(boolean site)
    • getDescriptiveName

      @JSON public String getDescriptiveName() throws com.liferay.portal.kernel.exception.PortalException
      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

      public String getDisplayURL(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
    • 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

      public String getIconCssClass()
    • getIconURL

      public String getIconURL(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
    • getLayoutRootNodeName

      public String getLayoutRootNodeName(boolean privateLayout, Locale locale)
    • getLiveGroup

      public com.liferay.portal.kernel.model.Group getLiveGroup()
    • getLiveParentTypeSettingsProperty

      public String getLiveParentTypeSettingsProperty(String key)
    • 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

      public String getScopeLabel(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
    • getScopeSimpleName

      public String getScopeSimpleName(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
    • getStagingGroup

      public com.liferay.portal.kernel.model.Group getStagingGroup()
    • getTypeLabel

      public String getTypeLabel()
    • getTypeSettings

      public String getTypeSettings()
      Specified by:
      getTypeSettings in interface com.liferay.portal.kernel.model.GroupModel
      Overrides:
      getTypeSettings in class GroupModelImpl
    • getTypeSettingsProperties

      public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties()
    • getTypeSettingsProperty

      public String getTypeSettingsProperty(String key)
    • getUnambiguousName

      public String getUnambiguousName(String name, Locale locale)
    • 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

      public boolean isInStagingPortlet(String portletId)
    • 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

      public boolean isStagedPortlet(String portletId)
    • isStagedRemotely

      public boolean isStagedRemotely()
    • isStagingGroup

      public boolean isStagingGroup()
    • isUser

      public boolean isUser()
    • isUserGroup

      public boolean isUserGroup()
    • isUserPersonalSite

      public boolean isUserPersonalSite()
    • setNameMap

      public void setNameMap(Map<Locale,String> nameMap, Locale defaultLocale)
      Specified by:
      setNameMap in interface com.liferay.portal.kernel.model.GroupModel
      Overrides:
      setNameMap in class GroupModelImpl
    • setTypeSettings

      public void setTypeSettings(String typeSettings)
      Specified by:
      setTypeSettings in interface com.liferay.portal.kernel.model.GroupModel
      Overrides:
      setTypeSettings in class GroupModelImpl
    • setTypeSettingsProperties

      public void setTypeSettingsProperties(com.liferay.portal.kernel.util.UnicodeProperties typeSettingsUnicodeProperties)
    • getDefaultPlid

      protected long getDefaultPlid(boolean privateLayout)