Package org.dspace.authorize

Examples of org.dspace.authorize.ResourcePolicy.update()


                resourcePolicy.setAction(Constants.ADMIN);
                resourcePolicy.setEPerson(cris.getDspaceUser());
                resourcePolicy.setResource(cris);
                resourcePolicy.setResourceType(CrisConstants.RP_TYPE_ID);
                resourcePolicy.setResourceID(cris.getID());
                resourcePolicy.update();
            }
            context.complete();
        }
        catch (Exception e)
        {
View Full Code Here


                    resourcePolicy.setAction(Constants.ADMIN);
                    resourcePolicy.setEPerson(cris.getDspaceUser());
                    resourcePolicy.setResource(cris);
                    resourcePolicy.setResourceType(CrisConstants.RP_TYPE_ID);
                    resourcePolicy.setResourceID(cris.getID());
                    resourcePolicy.update();
                }
                if (cris.getOldEpersonID() != null)
                {
                    delete(cris.getOldEpersonID(), cris.getId(), context);
                }
View Full Code Here

                            rp.setResource(myitem);
                            rp.setAction(actionID);
                            rp.setGroup(group);

                            rp.update();
                        }
                    }
                }
                else if (contentType == Constants.BUNDLE)
                {
View Full Code Here

            rp.setResource(bs);
            rp.setAction(actionID);
            rp.setGroup(g);

            rp.update();
        }
        else
        {
            if (actionID == Constants.READ)
            {
View Full Code Here

                                rp.setResource(t);
                                rp.setAction(actionID);
                                rp.setGroup(group);

                                rp.update();
                            }
                        }
                    }
                }
                else if (contentType == Constants.BITSTREAM)
View Full Code Here

                                            rp.setResource(t);
                                            rp.setAction(actionID);
                                            rp.setGroup(group);

                                            rp.update();
                                    }
                                }
                            }
                        }
                    }
View Full Code Here

        ResourcePolicy myPolicy = ResourcePolicy.create(context);
        myPolicy.setResource(c);
        myPolicy.setAction(Constants.READ);
        myPolicy.setGroup(anonymousGroup);
        myPolicy.update();

        context.addEvent(new Event(Event.CREATE, Constants.COMMUNITY, c.getID(), c.handle));

        // if creating a top-level Community, simulate an ADD event at the Site.
        if (parent == null)
View Full Code Here

            {
                ResourcePolicy r = ResourcePolicy.create(context);
                r.setResource(item);
                r.setGroup(group);
                r.setAction(Constants.READ);
                r.update();
               
                r = ResourcePolicy.create(context);
                r.setResource(item);
                r.setGroup(group);
                r.setAction(Constants.WRITE);
View Full Code Here

               
                r = ResourcePolicy.create(context);
                r.setResource(item);
                r.setGroup(group);
                r.setAction(Constants.WRITE);
                r.update();
               
                r = ResourcePolicy.create(context);
                r.setResource(item);
                r.setGroup(group);
                r.setAction(Constants.ADD);
View Full Code Here

               
                r = ResourcePolicy.create(context);
                r.setResource(item);
                r.setGroup(group);
                r.setAction(Constants.ADD);
                r.update();
               
            }
            else if (policy == POLICY_OBSERVER)
            {
                ResourcePolicy r = ResourcePolicy.create(context);
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.