Package org.dspace.content
Class Community
- java.lang.Object
-
- org.dspace.content.DSpaceObject
-
- org.dspace.content.Community
-
- All Implemented Interfaces:
Serializable,DSpaceObjectLegacySupport,ReloadableEntity<UUID>
@Entity public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
Class representing a communityThe community's metadata (name, introductory text etc.) is loaded into' memory. Changes to this metadata are only reflected in the database after
updateis called.- Version:
- $Revision$
- Author:
- Robert Tansley
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CommunityServicecommunityServicestatic StringCOPYRIGHT_TEXTstatic StringINTRODUCTORY_TEXTstatic StringSHORT_DESCRIPTIONstatic StringSIDEBAR_TEXT-
Fields inherited from class org.dspace.content.DSpaceObject
id
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCommunity()Protected constructor, create object using:CommunityService.create(Community, Context)orCommunityService.create(Community, Context, String)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)Returntrueifotheris the same Community as this object,falseotherwiseGroupgetAdministrators()Get the default group of administrators, if there is one.List<Collection>getCollections()Get the collections in this community.IntegergetLegacyId()BitstreamgetLogo()Get the logo for the community.StringgetName()List<Community>getParentCommunities()Return the parent community of this community, or null if the community is top-levelList<Community>getSubcommunities()Get the immediate sub-communities of this community.intgetType()return type found in ConstantsinthashCode()voidremoveParentCommunity(Community parentCommunity)voidremoveSubCommunity(Community subCommunity)-
Methods inherited from class org.dspace.content.DSpaceObject
addDetails, addHandle, addMetadata, clearDetails, clearModified, getDetails, getHandle, getHandles, getID, getMetadata, getResourcePolicies, isMetadataModified, isModified, removeMetadata, removeMetadata, setMetadata, setMetadataModified, setModified
-
-
-
-
Field Detail
-
COPYRIGHT_TEXT
public static final String COPYRIGHT_TEXT
- See Also:
- Constant Field Values
-
INTRODUCTORY_TEXT
public static final String INTRODUCTORY_TEXT
- See Also:
- Constant Field Values
-
SHORT_DESCRIPTION
public static final String SHORT_DESCRIPTION
- See Also:
- Constant Field Values
-
SIDEBAR_TEXT
public static final String SIDEBAR_TEXT
- See Also:
- Constant Field Values
-
communityService
protected transient CommunityService communityService
-
-
Constructor Detail
-
Community
protected Community()
Protected constructor, create object using:CommunityService.create(Community, Context)orCommunityService.create(Community, Context, String)
-
-
Method Detail
-
removeSubCommunity
public void removeSubCommunity(Community subCommunity)
-
getLogo
public Bitstream getLogo()
Get the logo for the community.nullis return if the community does not have a logo.- Returns:
- the logo of the community, or
null
-
getAdministrators
public Group getAdministrators()
Get the default group of administrators, if there is one. Note that the authorization system may allow others to be administrators for the community.The default group of administrators for community 100 is the one called
community_100_admin.- Returns:
- group of administrators, or
nullif there is no default group.
-
getCollections
public List<Collection> getCollections()
Get the collections in this community. Throws an SQLException because creating a community object won't load in all collections.- Returns:
- array of Collection objects
-
getSubcommunities
public List<Community> getSubcommunities()
Get the immediate sub-communities of this community. Throws an SQLException because creating a community object won't load in all collections.- Returns:
- array of Community objects
-
getParentCommunities
public List<Community> getParentCommunities()
Return the parent community of this community, or null if the community is top-level- Returns:
- the immediate parent community, or null if top-level
-
removeParentCommunity
public void removeParentCommunity(Community parentCommunity)
-
equals
public boolean equals(Object other)
Returntrueifotheris the same Community as this object,falseotherwise
-
getType
public int getType()
return type found in Constants- Specified by:
getTypein classDSpaceObject- Returns:
- Community type
-
getName
public String getName()
- Specified by:
getNamein classDSpaceObject
-
getLegacyId
public Integer getLegacyId()
- Specified by:
getLegacyIdin interfaceDSpaceObjectLegacySupport- Returns:
- the old integer based legacy identifier
-
-