Liferay 6.2-ce-ga5

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, PersistedModel, TreeModel, TypedModel, Serializable, Cloneable, Comparable<Group>

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, 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_NAME, TABLE_SQL_CREATE, TABLE_SQL_DROP, TX_MANAGER, TYPE_COLUMN_BITMASK, UUID_COLUMN_BITMASK
 
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 obc)
           
 int getChildrenWithLayoutsCount(boolean site)
           
protected  long getDefaultPlid(boolean privateLayout)
           
 long getDefaultPrivatePlid()
           
 long getDefaultPublicPlid()
           
 String getDescriptiveName()
           
 String getDescriptiveName(Locale locale)
           
 String getIconURL(ThemeDisplay themeDisplay)
           
 String getLayoutRootNodeName(boolean privateLayout, Locale locale)
           
 Group getLiveGroup()
           
 String getLiveParentTypeSettingsProperty(String key)
           
 long getOrganizationId()
           
 Group getParentGroup()
           
 UnicodeProperties getParentLiveGroupTypeSettingsProperties()
           
 String getPathFriendlyURL(boolean privateLayout, ThemeDisplay themeDisplay)
           
 LayoutSet getPrivateLayoutSet()
           
 int getPrivateLayoutsPageCount()
           
 LayoutSet getPublicLayoutSet()
           
 int getPublicLayoutsPageCount()
           
 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)
           
 boolean hasAncestor(long groupId)
           
protected  boolean hasClassName(Class<?> clazz)
           
 boolean hasLocalOrRemoteStagingGroup()
           
 boolean hasPrivateLayouts()
           
 boolean hasPublicLayouts()
           
 boolean hasStagingGroup()
           
 boolean isChild(long groupId)
          Deprecated. As of 7.0.0, replaced by hasAncestor(long)
 boolean isCommunity()
          Deprecated. As of 6.1.0, renamed to isRegularSite()
 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, getClassName, getClassNameId, getClassPK, getColumnBitmask, getCompanyId, getCreatorUserId, getCreatorUserUuid, getDescription, getExpandoBridge, getFriendlyURL, getGroupId, getLiveGroupId, getManualMembership, getMembershipRestriction, getModelAttributes, getModelClass, getModelClassName, getName, getOriginalActive, getOriginalClassNameId, getOriginalClassPK, getOriginalCompanyId, getOriginalFriendlyURL, getOriginalGroupId, getOriginalLiveGroupId, getOriginalName, getOriginalParentGroupId, getOriginalSite, getOriginalType, getOriginalUuid, getParentGroupId, getPrimaryKey, getPrimaryKeyObj, getRemoteStagingGroupCount, getSite, getTreePath, getType, getUuid, hashCode, isActive, isManualMembership, isSite, resetOriginalValues, setActive, setClassName, setClassNameId, setClassPK, setCompanyId, setCreatorUserId, setCreatorUserUuid, setDescription, setExpandoBridgeAttributes, setFriendlyURL, setGroupId, setLiveGroupId, setManualMembership, setMembershipRestriction, setModelAttributes, setName, 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, getClassName, getClassNameId, getClassPK, getCompanyId, getCreatorUserId, getCreatorUserUuid, getDescription, getExpandoBridge, getFriendlyURL, getGroupId, getLiveGroupId, getManualMembership, getMembershipRestriction, getName, getParentGroupId, getPrimaryKey, getPrimaryKeyObj, getRemoteStagingGroupCount, getSite, getTreePath, getType, getUuid, hashCode, isActive, isCachedModel, isEscapedModel, isManualMembership, isNew, isSite, setActive, setCachedModel, setClassName, setClassNameId, setClassPK, setCompanyId, setCreatorUserId, setCreatorUserUuid, setDescription, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setFriendlyURL, setGroupId, setLiveGroupId, setManualMembership, setMembershipRestriction, setName, setNew, setParentGroupId, setPrimaryKey, setPrimaryKeyObj, setRemoteStagingGroupCount, setSite, setTreePath, setType, setUuid, toCacheModel, toEscapedModel, toString, toUnescapedModel, toXmlString
 
Methods inherited from interface com.liferay.portal.model.BaseModel
getModelAttributes, 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,
                                SystemException
Throws:
PortalException
SystemException

getChildren

public List<Group> getChildren(boolean site)
                        throws SystemException
Throws:
SystemException

getChildrenWithLayouts

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

Throws:
SystemException

getChildrenWithLayouts

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

getChildrenWithLayoutsCount

public int getChildrenWithLayoutsCount(boolean site)
                                throws SystemException
Throws:
SystemException

getDefaultPrivatePlid

public long getDefaultPrivatePlid()

getDefaultPublicPlid

public long getDefaultPublicPlid()

getDescriptiveName

public String getDescriptiveName()
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

getDescriptiveName

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

getIconURL

public String getIconURL(ThemeDisplay themeDisplay)

getLayoutRootNodeName

public String getLayoutRootNodeName(boolean privateLayout,
                                    Locale locale)

getLiveGroup

public Group getLiveGroup()

getLiveParentTypeSettingsProperty

public String getLiveParentTypeSettingsProperty(String key)

getOrganizationId

public long getOrganizationId()

getParentGroup

public Group getParentGroup()
                     throws PortalException,
                            SystemException
Throws:
PortalException
SystemException

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

getScopeDescriptiveName

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

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)

hasAncestor

public boolean hasAncestor(long groupId)

hasLocalOrRemoteStagingGroup

public boolean hasLocalOrRemoteStagingGroup()

hasPrivateLayouts

public boolean hasPrivateLayouts()

hasPublicLayouts

public boolean hasPublicLayouts()

hasStagingGroup

public boolean hasStagingGroup()

isChild

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


isCommunity

public boolean isCommunity()
Deprecated. As of 6.1.0, renamed to isRegularSite()


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,
                          SystemException
Throws:
PortalException
SystemException

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 6.2-ce-ga5