Package org.dspace.content

Examples of org.dspace.content.Collection.update()


            if (collection != null) {
                int act = Utils.getActionRole((String) inputVar.get("action"));
                switch (act) {
                    case 1: {
                        Group group = collection.createAdministrators();
                        collection.update();
                        return String.valueOf(group.getID());
                    }
                    case 2: {
                        Group group = collection.createSubmitters();
                        collection.update();
View Full Code Here


                        collection.update();
                        return String.valueOf(group.getID());
                    }
                    case 2: {
                        Group group = collection.createSubmitters();
                        collection.update();
                        return String.valueOf(group.getID());
                    }
                    case 4:
                    case 5:
                    case 6: {
View Full Code Here

                    }
                    case 4:
                    case 5:
                    case 6: {
                        Group group = collection.createWorkflowGroup(act - 3);
                        collection.update();
                        return String.valueOf(group.getID());
                    }
                    default:
                        return null;
                }
View Full Code Here

                switch (act) {
                    case 1: {
                        Group group = collection.getAdministrators();
                        if (group != null) {
                            collection.removeAdministrators();
                            collection.update();
                            group.delete();
                        }
                        break;
                    }
                    case 2: {
View Full Code Here

                    }
                    case 2: {
                        Group group = collection.getSubmitters();
                        if (group != null) {
                            collection.removeSubmitters();
                            collection.update();
                            group.delete();
                        }
                        break;
                    }
                    case 4:
View Full Code Here

                    case 6: {
                        Group group = collection.getWorkflowGroup(act - 3);
                        if (group != null) {
                            AuthorizeUtil.authorizeManageWorkflowsGroup(context, collection);
                            collection.setWorkflowGroup(act - 3,null);
                            collection.update();
                            group.delete();
                        }
                        break;
                    }
                }
View Full Code Here

        try {
            Collection col = Collection.find(context, Integer.parseInt(ref.getId()));
            if (col != null) {
                Bitstream bitstream = col.setLogo((InputStream) inputVar);
                col.update();
                return String.valueOf(bitstream.getID());
            } else {
                throw new EntityException("Not found", "Entity not found", 404);
            }
        } catch (SQLException ex) {
View Full Code Here

    public void removeLogo(EntityReference ref, Map<String, Object> inputVar, Context context) {
        try {
            Collection col = Collection.find(context, Integer.parseInt(ref.getId()));
            if ((col != null)) {
                col.setLogo(null);
                col.update();
            }
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } catch (AuthorizeException ae) {
            throw new EntityException("Forbidden", "Forbidden", 403);
View Full Code Here

            dso = community;
            jsp = "/tools/edit-community.jsp";
        }
        else
        {
            collection.update();

            // Show collection edit page
            request.setAttribute("collection", collection);
            request.setAttribute("community", community);
            storeAuthorizeAttributeCollectionEdit(context, request, collection);
View Full Code Here

          collection.setLogo(is);
        }
        }
       
        // Save everything
        collection.update();
        context.commit();
       
       
        // No notice...
        result.setContinue(true);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.