Package org.dspace.event

Examples of org.dspace.event.Event


        DatabaseManager.update(ourContext, collectionRow);

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


    void delete() throws SQLException, AuthorizeException, IOException
    {
        log.info(LogManager.getHeader(ourContext, "delete_collection",
                "collection_id=" + getID()));

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

        // Remove from cache
        ourContext.removeCached(this, getID());
View Full Code Here

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

                modifiedMetadata = true;
            }
        }

        if(modifiedMetadata) {
            ourContext.addEvent(new Event(Event.MODIFY_METADATA, getType(), getID(), getDetails(), getIdentifiers(ourContext)));
            modifiedMetadata = false;
        }
    }
View Full Code Here

                            previousItem.setArchived(false);
                            itemsToProcess.add(previousItem);
                            //Fire a new modify event for our previous item
                            //Due to the need to reindex the item in the search
                            //and browse index we need to fire a new event
                            ctx.addEvent(new Event(Event.MODIFY,
                                    previousItem.getType(), previousItem.getID(),
                                    null, previousItem.getIdentifiers(ctx)));
                        }
                    }
                }
View Full Code Here

       
        // save changes ;-)
        item.update();

        // Notify interested parties of newly archived Item
        c.addEvent(new Event(Event.INSTALL, Constants.ITEM, item.getID(),
                item.getHandle(), item.getIdentifiers(c)));

        // remove in-progress submission
        is.deleteWrapper();
View Full Code Here

        // amazingly efficient but creates don't happen that often.
        context.turnOffAuthorisationSystem();
        i.update();
        context.restoreAuthSystemState();

        context.addEvent(new Event(Event.CREATE, Constants.ITEM, i.getID(),
                null, i.getIdentifiers(context)));

        log.info(LogManager.getHeader(context, "create_item", "item_id="
                + row.getIntColumn("item_id")));
View Full Code Here

        try {
            Date lastModified = new Timestamp(new Date().getTime());
            itemRow.setColumn("last_modified", lastModified);
            DatabaseManager.updateQuery(ourContext, "UPDATE item SET last_modified = ? WHERE item_id= ? ", lastModified, getID());
            //Also fire a modified event since the item HAS been modified
            ourContext.addEvent(new Event(Event.MODIFY, Constants.ITEM, getID(), null, getIdentifiers(ourContext)));
        } catch (SQLException e) {
            log.error(LogManager.getHeader(ourContext, "Error while updating last modified timestamp", "Item: " + getID()));
        }
    }
View Full Code Here

        TableRow mappingRow = DatabaseManager.row("item2bundle");
        mappingRow.setColumn("item_id", getID());
        mappingRow.setColumn("bundle_id", b.getID());
        DatabaseManager.insert(ourContext, mappingRow);

        ourContext.addEvent(new Event(Event.ADD, Constants.ITEM, getID(),
                Constants.BUNDLE, b.getID(), b.getName(),
                getIdentifiers(ourContext)));
    }
View Full Code Here

        DatabaseManager.updateQuery(ourContext,
                "DELETE FROM item2bundle WHERE item_id= ? " +
                "AND bundle_id= ? ",
                getID(), b.getID());

        ourContext.addEvent(new Event(Event.REMOVE, Constants.ITEM, getID(),
                Constants.BUNDLE, b.getID(), b.getName(), getIdentifiers(ourContext)));

        // If the bundle is orphaned, it's removed
        TableRowIterator tri = DatabaseManager.query(ourContext,
                "SELECT * FROM item2bundle WHERE bundle_id= ? ",
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.