Liferay 7.0-ce-b4

com.liferay.portal.model.impl
Class GroupImpl

java.lang.Object
  extended by com.liferay.portal.model.impl.BaseModelImpl<Group>
      extended by com.liferay.portal.model.impl.GroupModelImpl
          extended by com.liferay.portal.model.impl.GroupBaseImpl
              extended by com.liferay.portal.model.impl.GroupImpl
All Implemented Interfaces:
AttachedModel, BaseModel<Group>, ClassedModel, Group, GroupModel, LocalizedModel, MVCCModel, PersistedModel, ShardedModel, TreeModel, TypedModel, Serializable, Cloneable, Comparable<Group>
Direct Known Subclasses:
StagedGroupImpl

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.

See Also:
Serialized Form

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, 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, TX_MANAGER, TYPE_COLUMN_BITMASK, UUID_COLUMN_BITMASK
 
Fields inherited from interface com.liferay.portal.model.Group
GROUP_ID_ACCESSOR
 
Constructor Summary
GroupImpl()
           
 
Method Summary
 void clearStagingGroup()
           
 List<Group> getAncestors()
           
 List<Group> getChildren(boolean site)
           
 List<Group> getChildrenWithLayouts(boolean site, int start, int end)
          Deprecated. As of 7.0.0, replaced by getChildrenWithLayouts(boolean, int, int, OrderByComparator)
 List<Group> getChildrenWithLayouts(boolean site, int start, int end, OrderByComparator<Group> obc)
           
 int getChildrenWithLayoutsCount(boolean site)
           
protected  long getDefaultPlid(boolean privateLayout)
           
 long getDefaultPrivatePlid()
           
 long getDefaultPublicPlid()
           
 List<Group> getDescendants(boolean site)
           
 String getDescriptiveName()
           
 String getDescriptiveName(Locale locale)
           
 String getDisplayURL(ThemeDisplay themeDisplay)
           
 String getDisplayURL(ThemeDisplay themeDisplay, boolean privateLayout)
           
 String getIconCssClass()
           
 String getIconURL(ThemeDisplay themeDisplay)
           
 String getLayoutRootNodeName(boolean privateLayout, Locale locale)
           
 Group getLiveGroup()
           
 String getLiveParentTypeSettingsProperty(String key)
           
 String getLogoURL(ThemeDisplay themeDisplay, boolean useDefault)
           
 long getOrganizationId()
           
 Group getParentGroup()
           
 UnicodeProperties getParentLiveGroupTypeSettingsProperties()
           
 String getPathFriendlyURL(boolean privateLayout, ThemeDisplay themeDisplay)
           
 LayoutSet getPrivateLayoutSet()
           
 int getPrivateLayoutsPageCount()
           
 LayoutSet getPublicLayoutSet()
           
 int getPublicLayoutsPageCount()
           
 long getRemoteLiveGroupId()
           
 String getScopeDescriptiveName(ThemeDisplay themeDisplay)
           
 String getScopeLabel(ThemeDisplay themeDisplay)
           
 Group getStagingGroup()
           
 String getTypeLabel()
           
 String getTypeSettings()
          Returns the type settings of this group.
 UnicodeProperties getTypeSettingsProperties()
           
 String getTypeSettingsProperty(String key)
           
 String getUnambiguousName(String name, Locale locale)
           
 boolean hasAncestor(long groupId)
           
protected  boolean hasClassName(Class<?> clazz)
           
 boolean hasLocalOrRemoteStagingGroup()
           
 boolean hasPrivateLayouts()
           
 boolean hasPublicLayouts()
           
 boolean hasRemoteStagingGroup()
           
 boolean hasStagingGroup()
           
 boolean isChild(long groupId)
          Deprecated. As of 7.0.0, replaced by hasAncestor(long)
 boolean isCompany()
           
 boolean isCompanyStagingGroup()
           
 boolean isControlPanel()
           
 boolean isGuest()
           
 boolean isInStagingPortlet(String portletId)
           
 boolean isLayout()
           
 boolean isLayoutPrototype()
           
 boolean isLayoutSetPrototype()
           
 boolean isLimitedToParentSiteMembers()
           
 boolean isOrganization()
           
 boolean isRegularSite()
           
 boolean isRoot()
           
 boolean isShowSite(PermissionChecker permissionChecker, boolean privateSite)
           
 boolean isStaged()
           
 boolean isStagedPortlet(String portletId)
           
 boolean isStagedRemotely()
           
 boolean isStagingGroup()
           
 boolean isUser()
           
 boolean isUserGroup()
           
 boolean isUserPersonalSite()
           
 void setTypeSettings(String typeSettings)
          Sets the type settings of this group.
 void setTypeSettingsProperties(UnicodeProperties typeSettingsProperties)
           
 
Methods inherited from class com.liferay.portal.model.impl.GroupBaseImpl
buildTreePath, persist, updateTreePath
 
Methods inherited from class com.liferay.portal.model.impl.GroupModelImpl
clone, compareTo, equals, getActive, getAvailableLanguageIds, getClassName, getClassNameId, getClassPK, getColumnBitmask, getCompanyId, getCreatorUserId, getCreatorUserUuid, getDefaultLanguageId, getDescription, getDescription, getDescription, getDescription, getDescription, getDescriptionCurrentLanguageId, getDescriptionCurrentValue, getDescriptionMap, getExpandoBridge, getFriendlyURL, getGroupId, getGroupKey, getInheritContent, getLiveGroupId, getManualMembership, getMembershipRestriction, getModelAttributes, getModelClass, getModelClassName, getMvccVersion, getName, getName, getName, getName, getName, getNameCurrentLanguageId, getNameCurrentValue, getNameMap, getOriginalActive, getOriginalClassNameId, getOriginalClassPK, getOriginalCompanyId, getOriginalFriendlyURL, getOriginalGroupId, getOriginalGroupKey, getOriginalInheritContent, getOriginalLiveGroupId, getOriginalParentGroupId, getOriginalSite, getOriginalType, getOriginalUuid, getParentGroupId, getPrimaryKey, getPrimaryKeyObj, getRemoteStagingGroupCount, getSite, getTreePath, getType, getUuid, hashCode, isActive, isEntityCacheEnabled, isFinderCacheEnabled, isInheritContent, isManualMembership, isSite, prepareLocalizedFieldsForImport, prepareLocalizedFieldsForImport, resetOriginalValues, setActive, setClassName, setClassNameId, setClassPK, setCompanyId, setCreatorUserId, setCreatorUserUuid, setDescription, setDescription, setDescription, setDescriptionCurrentLanguageId, setDescriptionMap, setDescriptionMap, setExpandoBridgeAttributes, setFriendlyURL, setGroupId, setGroupKey, setInheritContent, setLiveGroupId, setManualMembership, setMembershipRestriction, setModelAttributes, setMvccVersion, setName, setName, setName, setNameCurrentLanguageId, setNameMap, setNameMap, setParentGroupId, setPrimaryKey, setPrimaryKeyObj, setRemoteStagingGroupCount, setSite, setTreePath, setType, setUuid, toCacheModel, toEscapedModel, toModel, toModels, toString, toXmlString
 
Methods inherited from class com.liferay.portal.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.model.GroupModel
clone, compareTo, getActive, getAvailableLanguageIds, getClassName, getClassNameId, getClassPK, getCompanyId, getCreatorUserId, getCreatorUserUuid, getDefaultLanguageId, getDescription, getDescription, getDescription, getDescription, getDescription, getDescriptionCurrentLanguageId, getDescriptionCurrentValue, getDescriptionMap, getExpandoBridge, getFriendlyURL, getGroupId, getGroupKey, getInheritContent, getLiveGroupId, getManualMembership, getMembershipRestriction, getMvccVersion, getName, getName, getName, getName, getName, getNameCurrentLanguageId, getNameCurrentValue, getNameMap, getParentGroupId, getPrimaryKey, getPrimaryKeyObj, getRemoteStagingGroupCount, getSite, getTreePath, getType, getUuid, hashCode, isActive, isCachedModel, isEscapedModel, isInheritContent, isManualMembership, isNew, isSite, prepareLocalizedFieldsForImport, prepareLocalizedFieldsForImport, setActive, setCachedModel, setClassName, setClassNameId, setClassPK, setCompanyId, setCreatorUserId, setCreatorUserUuid, setDescription, setDescription, setDescription, setDescriptionCurrentLanguageId, setDescriptionMap, setDescriptionMap, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setFriendlyURL, setGroupId, setGroupKey, setInheritContent, setLiveGroupId, setManualMembership, setMembershipRestriction, setMvccVersion, setName, setName, setName, setNameCurrentLanguageId, setNameMap, setNameMap, setNew, setParentGroupId, setPrimaryKey, setPrimaryKeyObj, setRemoteStagingGroupCount, setSite, setTreePath, setType, setUuid, toCacheModel, toEscapedModel, toString, toUnescapedModel, toXmlString
 
Methods inherited from interface com.liferay.portal.model.BaseModel
getModelAttributes, isEntityCacheEnabled, isFinderCacheEnabled, resetOriginalValues, setModelAttributes
 
Methods inherited from interface com.liferay.portal.model.ClassedModel
getModelClass, getModelClassName
 
Methods inherited from interface com.liferay.portal.model.TreeModel
getPrimaryKeyObj, getTreePath
 

Constructor Detail

GroupImpl

public GroupImpl()
Method Detail

clearStagingGroup

public void clearStagingGroup()

getAncestors

public List<Group> getAncestors()
                         throws PortalException
Throws:
PortalException

getChildren

public List<Group> getChildren(boolean site)

getChildrenWithLayouts

@Deprecated
public List<Group> getChildrenWithLayouts(boolean site,
                                                     int start,
                                                     int end)
Deprecated. As of 7.0.0, replaced by getChildrenWithLayouts(boolean, int, int, OrderByComparator)


getChildrenWithLayouts

public List<Group> getChildrenWithLayouts(boolean site,
                                          int start,
                                          int end,
                                          OrderByComparator<Group> obc)

getChildrenWithLayoutsCount

public int getChildrenWithLayoutsCount(boolean site)

getDefaultPrivatePlid

public long getDefaultPrivatePlid()

getDefaultPublicPlid

public long getDefaultPublicPlid()

getDescendants

public List<Group> getDescendants(boolean site)

getDescriptiveName

public String getDescriptiveName()
                          throws PortalException
Throws:
PortalException

getDescriptiveName

public String getDescriptiveName(Locale locale)
                          throws PortalException
Throws:
PortalException

getDisplayURL

public String getDisplayURL(ThemeDisplay themeDisplay)

getDisplayURL

public String getDisplayURL(ThemeDisplay themeDisplay,
                            boolean privateLayout)

getIconCssClass

public String getIconCssClass()

getIconURL

public String getIconURL(ThemeDisplay themeDisplay)

getLayoutRootNodeName

public String getLayoutRootNodeName(boolean privateLayout,
                                    Locale locale)

getLiveGroup

public Group getLiveGroup()

getLiveParentTypeSettingsProperty

public String getLiveParentTypeSettingsProperty(String key)

getLogoURL

public String getLogoURL(ThemeDisplay themeDisplay,
                         boolean useDefault)

getOrganizationId

public long getOrganizationId()

getParentGroup

public Group getParentGroup()
                     throws PortalException
Throws:
PortalException

getParentLiveGroupTypeSettingsProperties

public UnicodeProperties getParentLiveGroupTypeSettingsProperties()

getPathFriendlyURL

public String getPathFriendlyURL(boolean privateLayout,
                                 ThemeDisplay themeDisplay)

getPrivateLayoutSet

public LayoutSet getPrivateLayoutSet()

getPrivateLayoutsPageCount

public int getPrivateLayoutsPageCount()

getPublicLayoutSet

public LayoutSet getPublicLayoutSet()

getPublicLayoutsPageCount

public int getPublicLayoutsPageCount()

getRemoteLiveGroupId

public long getRemoteLiveGroupId()

getScopeDescriptiveName

public String getScopeDescriptiveName(ThemeDisplay themeDisplay)
                               throws PortalException
Throws:
PortalException

getScopeLabel

public String getScopeLabel(ThemeDisplay themeDisplay)

getStagingGroup

public Group getStagingGroup()

getTypeLabel

public String getTypeLabel()

getTypeSettings

public String getTypeSettings()
Description copied from interface: GroupModel
Returns the type settings of this group.

Specified by:
getTypeSettings in interface GroupModel
Overrides:
getTypeSettings in class GroupModelImpl
Returns:
the type settings of this group

getTypeSettingsProperties

public 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()

isChild

@Deprecated
public boolean isChild(long groupId)
Deprecated. As of 7.0.0, replaced by hasAncestor(long)


isCompany

public boolean isCompany()

isCompanyStagingGroup

public boolean isCompanyStagingGroup()

isControlPanel

public boolean isControlPanel()

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()

isRegularSite

public boolean isRegularSite()

isRoot

public boolean isRoot()

isShowSite

public boolean isShowSite(PermissionChecker permissionChecker,
                          boolean privateSite)
                   throws PortalException
Throws:
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()

setTypeSettings

public void setTypeSettings(String typeSettings)
Description copied from interface: GroupModel
Sets the type settings of this group.

Specified by:
setTypeSettings in interface GroupModel
Overrides:
setTypeSettings in class GroupModelImpl
Parameters:
typeSettings - the type settings of this group

setTypeSettingsProperties

public void setTypeSettingsProperties(UnicodeProperties typeSettingsProperties)

getDefaultPlid

protected long getDefaultPlid(boolean privateLayout)

hasClassName

protected boolean hasClassName(Class<?> clazz)

Liferay 7.0-ce-b4