Package org.dspace.content

Examples of org.dspace.content.Community


                feed.setDescription(col.getMetadata("short_description"));
                logo = col.getLogo();
            }
            else if (dso.getType() == Constants.COMMUNITY)
            {
                Community comm = (Community)dso;
                defaultTitle = comm.getMetadata("name");
                feed.setDescription(comm.getMetadata("short_description"));
                logo = comm.getLogo();
            }
            objectURL = resolveURL(request, dso);
            if (logo != null)
                logoURL = urlOfBitstream(request, logo);
        }
View Full Code Here


            else
            {
                id = FlowGroupUtils.getCommunityId(groupName);
                if (id > -1)
                {
                    Community community = Community.find(context, id);
                    if (community != null)
                    {
                        collectionOrCommunityName = community.getMetadata("name");
                        collectionOrCommunity = community;
                    }
                }
            }
            if (collectionOrCommunity != null)
View Full Code Here

        else if (!isAuthorized
                && AuthorizeConfiguration
                        .canCommunityAdminManageCollectionTemplateItem())
        {
            Community[] communities = collection.getCommunities();
            Community parent = communities != null && communities.length > 0 ? communities[0]
                    : null;
            AuthorizeManager.authorizeAction(context, parent, Constants.ADMIN);
        }
        else if (!AuthorizeManager.isAdmin(context))
        {
View Full Code Here

     *             if a db error occur
     */
    public static void authorizeRemoveAdminGroup(Context context,
            Community community) throws SQLException, AuthorizeException
    {
        Community parentCommunity = community.getParentCommunity();
        if (AuthorizeConfiguration.canCommunityAdminManageAdminGroup()
                && parentCommunity != null)
        {
            AuthorizeManager.authorizeAction(context, parentCommunity,
                    Constants.ADMIN);
View Full Code Here

     * @see org.dspace.app.dav.DAVResource#children()
     */
    @Override
    protected DAVResource[] children() throws SQLException
    {
        Community top[] = Community.findAllTop(this.context);
        DAVResource result[] = new DAVResource[top.length];

        for (int i = 0; i < top.length; ++i)
        {
            result[i] = new DAVCommunity(this.context, this.request, this.response,
View Full Code Here

     */
    @Override
    protected DAVResource[] children() throws SQLException
    {
        Vector result = new Vector();
        Community subs[] = this.community.getSubcommunities();
        for (Community element : subs)
        {
            result.add(new DAVCommunity(this.context, this.request, this.response,
                    makeChildPath(element), element));
        }
View Full Code Here

     */
    @Override
    protected int deleteInternal() throws DAVStatusException, SQLException,
            AuthorizeException, IOException
    {
        Community c = this.community.getParentCommunity();
        if (c != null)
        {
            c.removeSubcommunity(this.community);
        }
        this.community.delete();
        return HttpServletResponse.SC_OK;
    }
View Full Code Here

        Context context = null;
        try {
            context = new Context();
            refreshParams(context);

            Community comm = Community.find(context, Integer.parseInt(id));
            return comm != null ? true : false;
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } catch (NumberFormatException ex) {
            throw new EntityException("Bad request", "Could not parse input", 400);
View Full Code Here

        String licence = (String) inputVar.get("licence");
        String provenance = (String) inputVar.get("provenance");

        try {
            if (communityId > 0) {
                Community community = Community.find(context, communityId);
                Collection collection = community.createCollection();
                if (collection != null) {
                    collection.setMetadata("name", name);
                    collection.setMetadata("short_description", shortDescription);
                    collection.setMetadata("introductory_text", introductoryText);
                    collection.setMetadata("copyright_text", copyrightText);
View Full Code Here

        String copyrightText = (String) inputVar.get("copyrightText");
        String sidebarText = (String) inputVar.get("sidebarText");
        String introductoryText = (String) inputVar.get("introductoryText");

        try {
            Community community;
            if (communityId > 0) {
                Community com = Community.find(context, communityId);
                community = com.createSubcommunity();
            } else {
                community = Community.create(null, context);
            }
            if (community != null) {
                result = String.valueOf(community.getID());
View Full Code Here

TOP

Related Classes of org.dspace.content.Community

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.