Package org.dspace.content
Class Community
java.lang.Object
org.dspace.content.DSpaceObject
org.dspace.content.CacheableDSpaceObject
org.dspace.content.Community
- All Implemented Interfaces:
Serializable,DSpaceObjectLegacySupport,ReloadableEntity<UUID>
Class representing a community
The community's metadata (name, introductory text etc.) is loaded into'
memory. Changes to this metadata are only reflected in the database after
update is called.
- Author:
- Robert Tansley
- See Also:
-
Field Summary
FieldsFields inherited from class org.dspace.content.DSpaceObject
id, predefinedUUID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected constructor, create object using:CommunityService.create(Community, Context)orCommunityService.create(Community, Context, String)protectedTakes a pre-determined UUID to be passed to the object to allow for the restoration of previously defined UUID's. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturntrueifotheris the same Community as this object,falseotherwiseGet the default group of administrators, if there is one.Get the collections in this community.getLogo()Get the logo for the community.getName()Return the parent community of this community, or null if the community is top-levelGet 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, getPredefinedUUID, getResourcePolicies, isMetadataModified, isModified, removeMetadata, removeMetadata, setMetadata, setMetadataModified, setModified
-
Field Details
-
communityService
-
-
Constructor Details
-
Community
protected Community()Protected constructor, create object using:CommunityService.create(Community, Context)orCommunityService.create(Community, Context, String) -
Community
Takes a pre-determined UUID to be passed to the object to allow for the restoration of previously defined UUID's.- Parameters:
uuid- Takes a uuid to be passed to the Pre-Defined UUID Generator
-
-
Method Details
-
removeSubCommunity
-
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
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
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
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
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
-
equals
Returntrueifotheris the same Community as this object,falseotherwise -
hashCode
public int hashCode() -
getType
public int getType()return type found in Constants- Specified by:
getTypein classDSpaceObject- Returns:
- Community type
-
getName
- Specified by:
getNamein classDSpaceObject
-
getLegacyId
- Specified by:
getLegacyIdin interfaceDSpaceObjectLegacySupport- Returns:
- the old integer based legacy identifier
-