| java.lang.Object org.dspace.content.DSpaceObject org.dspace.content.Community
Community | public class Community extends DSpaceObject (Code) | | 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 version: $Revision: 2339 $ |
Community | Community(Context context, TableRow row) throws SQLException(Code) | | Construct a community object from a database row.
Parameters: context - the context this object exists in Parameters: row - the corresponding row in the table |
canEditBoolean | public boolean canEditBoolean() throws java.sql.SQLException(Code) | | return TRUE if context's user can edit community, false otherwise
boolean true = current user can edit community |
countItems | public int countItems() throws SQLException(Code) | | counts items in this community
total items |
createCollection | public Collection createCollection() throws SQLException, AuthorizeException(Code) | | Create a new collection within this community. The collection is created
without any workflow groups or default submitter group.
the new collection |
equals | public boolean equals(Object other)(Code) | | Return true if other is the same Community
as this object, false otherwise
Parameters: other - object to compare to true if object passed in represents the samecommunity as this object |
find | public static Community find(Context context, int id) throws SQLException(Code) | | Get a community from the database. Loads in the metadata
Parameters: context - DSpace context object Parameters: id - ID of the community the community, or null if the ID is invalid. |
findAll | public static Community[] findAll(Context context) throws SQLException(Code) | | Get a list of all communities in the system. These are alphabetically
sorted by community name.
Parameters: context - DSpace context object the communities in the system |
findAllTop | public static Community[] findAllTop(Context context) throws SQLException(Code) | | Get a list of all top-level communities in the system. These are
alphabetically sorted by community name. A top-level community is one
without a parent community.
Parameters: context - DSpace context object the top-level communities in the system |
getAllParents | public Community[] getAllParents() throws SQLException(Code) | | Return an array of parent communities of this community, in ascending
order. If community is top-level, return an empty array.
an array of parent communities, empty if top-level |
getCollections | public Collection[] getCollections() throws SQLException(Code) | | Get the collections in this community. Throws an SQLException because
creating a community object won't load in all collections.
array of Collection objects |
getID | public int getID()(Code) | | Get the internal ID of this collection
the internal identifier |
getLogo | public Bitstream getLogo()(Code) | | Get the logo for the community. null is return if the
community does not have a logo.
the logo of the community, or null |
getMetadata | public String getMetadata(String field)(Code) | | Get the value of a metadata field
Parameters: field - the name of the metadata field to get the value of the metadata field exception: IllegalArgumentException - if the requested metadata field doesn't exist |
getParentCommunity | public Community getParentCommunity() throws SQLException(Code) | | Return the parent community of this community, or null if the community
is top-level
the immediate parent community, or null if top-level |
getSubcommunities | public Community[] getSubcommunities() throws SQLException(Code) | | Get the immediate sub-communities of this community. Throws an
SQLException because creating a community object won't load in all
collections.
array of Community objects |
getType | public int getType()(Code) | | return type found in Constants
|
setLogo | public Bitstream setLogo(InputStream is) throws AuthorizeException, IOException, SQLException(Code) | | Give the community a logo. Passing in null removes any
existing logo. You will need to set the format of the new logo bitstream
before it will work, for example to "JPEG". Note that
update(/code> will need to be called for the change to take
effect. Setting a logo and not calling update later may
result in a previous logo lying around as an "orphaned" bitstream.
Parameters: is - the stream to use as the new logo the new logo bitstream, or null if there is nologo (null was passed in) |
|
|