Package org.dspace.event

Examples of org.dspace.event.Event


            if (modifiedMetadata) {
                updateMetadata();
                clearDetails();
            }

            ourContext.addEvent(new Event(Event.MODIFY, Constants.ITEM, getID(),
                    null, getIdentifiers(ourContext)));
            modified = false;
        }
    }
View Full Code Here


        addDC("description", "provenance", "en", prov.toString());

        // Update item in DB
        update();

        ourContext.addEvent(new Event(Event.MODIFY, Constants.ITEM, getID(),
                "WITHDRAW", getIdentifiers(ourContext)));

        // remove all authorization policies, saving the custom ones
        AuthorizeManager.removeAllPoliciesByDSOAndTypeNotEqualsTo(ourContext, this, ResourcePolicy.TYPE_CUSTOM);
View Full Code Here

        addDC("description", "provenance", "en", prov.toString());

        // Update item in DB
        update();

        ourContext.addEvent(new Event(Event.MODIFY, Constants.ITEM, getID(),
                "REINSTATE", getIdentifiers(ourContext)));

        // authorization policies
        if (colls.length > 0)
        {
View Full Code Here

        // Check authorisation here. If we don't, it may happen that we remove the
        // metadata but when getting to the point of removing the bundles we get an exception
        // leaving the database in an inconsistent state
        AuthorizeManager.authorizeAction(ourContext, this, Constants.REMOVE);

        ourContext.addEvent(new Event(Event.DELETE, Constants.ITEM, getID(),
                getHandle(), getIdentifiers(ourContext)));

        log.info(LogManager.getHeader(ourContext, "delete_item", "item_id="
                + getID()));
View Full Code Here

            // care about the structure of the repository can take account of the move

            // Note that updating the owning collection above will have the same effect,
            // so we only do this here if the owning collection hasn't changed.
           
            ourContext.addEvent(new Event(Event.MODIFY, Constants.ITEM, getID(),
                    null, getIdentifiers(ourContext)));
        }
    }
View Full Code Here

        EPerson e = new EPerson(context, row);

        log.info(LogManager.getHeader(context, "create_eperson", "eperson_id="
                + e.getID()));

        context.addEvent(new Event(Event.CREATE, Constants.EPERSON, e.getID(),
                null, e.getIdentifiers(context)));

        return e;
    }
View Full Code Here

        }

        // Delete the Dublin Core
        removeMetadataFromDatabase();

        ourContext.addEvent(new Event(Event.DELETE, Constants.EPERSON, getID(), getEmail(), getIdentifiers(ourContext)));

        // Remove from cache
        ourContext.removeCached(this, getID());

        // XXX FIXME: This sidesteps the object model code so it won't
View Full Code Here

        log.info(LogManager.getHeader(ourContext, "update_eperson",
                "eperson_id=" + getID()));

        if (modified)
        {
            ourContext.addEvent(new Event(Event.MODIFY, Constants.EPERSON,
                    getID(), null, getIdentifiers(ourContext)));
            modified = false;
        }
        if (modifiedMetadata)
        {
View Full Code Here

        myPolicy.setResource(c);
        myPolicy.setAction(Constants.READ);
        myPolicy.setGroup(anonymousGroup);
        myPolicy.update();

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

        // if creating a top-level Community, simulate an ADD event at the Site.
        if (parent == null)
        {
            context.addEvent(new Event(Event.ADD, Constants.SITE, Site.SITE_ID,
                    Constants.COMMUNITY, c.getID(), c.handle,
                    c.getIdentifiers(context)));
        }

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

        DatabaseManager.update(ourContext, communityRow);

        if (modified)
        {
            ourContext.addEvent(new Event(Event.MODIFY, Constants.COMMUNITY,
                    getID(), null, getIdentifiers(ourContext)));
            modified = false;
        }
        if (modifiedMetadata)
        {
View Full Code Here

TOP

Related Classes of org.dspace.event.Event

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.