Package org.dspace.authorize

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


               
                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

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

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

        // now create the default policies for submitted items
        myPolicy = ResourcePolicy.create(context);
        myPolicy.setResource(c);
        myPolicy.setAction(Constants.DEFAULT_ITEM_READ);
View Full Code Here

        // now create the default policies for submitted items
        myPolicy = ResourcePolicy.create(context);
        myPolicy.setResource(c);
        myPolicy.setAction(Constants.DEFAULT_ITEM_READ);
        myPolicy.setGroup(anonymousGroup);
        myPolicy.update();

        myPolicy = ResourcePolicy.create(context);
        myPolicy.setResource(c);
        myPolicy.setAction(Constants.DEFAULT_BITSTREAM_READ);
        myPolicy.setGroup(anonymousGroup);
View Full Code Here

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

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

        log.info(LogManager.getHeader(context, "create_collection",
View Full Code Here

            if(!isAnonymousInPlace){
                // add policies for all the groups
                for(Group g : authorizedGroups){
                    ResourcePolicy rp = AuthorizeManager.createOrModifyPolicy(null, context, null, g.getID(), null, embargoDate, Constants.READ, reason, dso);
                    if(rp!=null)
                        rp.update();
                }

            }
            else{
                // add policy just for anonymous
View Full Code Here

            }
            else{
                // add policy just for anonymous
                ResourcePolicy rp = AuthorizeManager.createOrModifyPolicy(null, context, null, 0, null, embargoDate, Constants.READ, reason, dso);
                if(rp!=null)
                    rp.update();
            }
        }

    }
View Full Code Here

                                rp.setRpName(name);
                                rp.setRpDescription(description);
                                rp.setStartDate(startDate);
                                rp.setEndDate(endDate);

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

                                    rp.setRpName(name);
                                    rp.setRpDescription(description);
                                    rp.setStartDate(startDate);
                                    rp.setEndDate(endDate);

                                    rp.update();
                                }
                            }
                        }
                    }
                }
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.