Package org.dspace.event

Examples of org.dspace.event.Event


                TableRow mappingRow = DatabaseManager.row("community2collection");

                mappingRow.setColumn("community_id", getID());
                mappingRow.setColumn("collection_id", c.getID());

                ourContext.addEvent(new Event(Event.ADD, Constants.COMMUNITY,
                        getID(), Constants.COLLECTION, c.getID(), c.getHandle(),
                        getIdentifiers(ourContext)));

                DatabaseManager.insert(ourContext, mappingRow);
            }
View Full Code Here


                TableRow mappingRow = DatabaseManager.row("community2community");

                mappingRow.setColumn("parent_comm_id", getID());
                mappingRow.setColumn("child_comm_id", c.getID());

                ourContext.addEvent(new Event(Event.ADD, Constants.COMMUNITY,
                        getID(), Constants.COMMUNITY, c.getID(), c.getHandle(),
                        getIdentifiers(ourContext)));

                DatabaseManager.insert(ourContext, mappingRow);
            }
View Full Code Here

       
            // log the removal & trigger any associated event(s)
            log.info(LogManager.getHeader(ourContext, "remove_collection",
                    "community_id=" + getID() + ",collection_id=" + removedId));
       
            ourContext.addEvent(new Event(Event.REMOVE, Constants.COMMUNITY, getID(),
                    Constants.COLLECTION, removedId, removedHandle, removedIdentifiers));
        }
        catch(SQLException|IOException e)
        {
            // Immediately abort the deletion, rolling back the transaction
View Full Code Here

            // log the removal & trigger any related event(s)
            log.info(LogManager.getHeader(ourContext, "remove_subcommunity",
                    "parent_comm_id=" + getID() + ",child_comm_id=" + removedId));

            ourContext.addEvent(new Event(Event.REMOVE, Constants.COMMUNITY, getID(), Constants.COMMUNITY, removedId, removedHandle, removedIdentifiers));
        }
        catch(SQLException|IOException e)
        {
            // Immediately abort the deletion, rolling back the transaction
            ourContext.abort();
View Full Code Here

            // Call rawDelete to clean up all sub-communities & collections
            // under this Community, then delete the Community itself
            rawDelete();

            // Since this is a top level Community, simulate a REMOVE event at the Site.
            ourContext.addEvent(new Event(Event.REMOVE, Constants.SITE, Site.SITE_ID,
                    Constants.COMMUNITY, getID(), getHandle(), getIdentifiers(ourContext)));
        } else {
            // This is a subcommunity, so let the parent remove it
            // NOTE: this essentially just logs event and calls "rawDelete()"
            parent.removeSubcommunity(this);
View Full Code Here

        {
            g.delete();
        }

        // If everything above worked, then trigger any associated events
        ourContext.addEvent(new Event(Event.DELETE, Constants.COMMUNITY, deletedId, deletedHandle, deletedIdentifiers));
    }
View Full Code Here

    @Override
    public void updateLastModified()
    {
        //Also fire a modified event since the community HAS been modified
        ourContext.addEvent(new Event(Event.MODIFY, Constants.COMMUNITY,
                getID(), null, getIdentifiers(ourContext)));
    }
View Full Code Here

        // Set the format to "unknown"
        Bitstream bitstream = find(context, bitstreamID);
        bitstream.setFormat(null);

        context.addEvent(new Event(Event.CREATE, Constants.BITSTREAM,
                bitstreamID, null, bitstream.getIdentifiers(context)));

        return bitstream;
    }
View Full Code Here

        // Set the format to "unknown"
        Bitstream bitstream = find(context, bitstreamID);
        bitstream.setFormat(null);

        context.addEvent(new Event(Event.CREATE, Constants.BITSTREAM,
                bitstreamID, "REGISTER", bitstream.getIdentifiers(context)));

        return bitstream;
    }
View Full Code Here

        DatabaseManager.update(ourContext, bRow);

        if (modified)
        {
            ourContext.addEvent(new Event(Event.MODIFY, Constants.BITSTREAM, getID(), null, getIdentifiers(ourContext)));
            modified = false;
        }
        if (modifiedMetadata)
        {
            updateMetadata();
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.