AuthorizeManager.addPolicy(ourContext, item, Constants.DELETE, ourContext.getCurrentUser()); AuthorizeManager.addPolicy(ourContext, item, Constants.REMOVE, ourContext.getCurrentUser());
    public void removeItem(Item item)        throws SQLException, AuthorizeException,IOException    {        // Check authorisation        AuthorizeManager.authorizeAction(ourContext, this, Constants.REMOVE);        log.info(LogManager.getHeader(ourContext,            "remove_item",            "collection_id=" + getID() + ",item_id=" + item.getID()));        DatabaseManager.updateQuery(ourContext,            "DELETE FROM collection2item WHERE collection_id=" + getID() +            " AND item_id=" + item.getID() );        // Is the item an orphan?        TableRowIterator tri = DatabaseManager.query(ourContext,            "SELECT * FROM collection2item WHERE item_id=" +                item.getID());        if (!tri.hasNext())        {            // Orphan; delete it            item.delete();        }    }