Package org.dspace.core

Examples of org.dspace.core.Context.complete()


        // Save the files to the file
        csv.save(filename);       

        // Finsh off and tidy up
        c.restoreAuthSystemState();
        c.complete();
    }
}
View Full Code Here


                }
                else
                {
                    response.sendError(HttpServletResponse.SC_NOT_IMPLEMENTED);
                }
                context.complete();
                context = null;
            }
        }
        catch (SQLException e)
        {
View Full Code Here

                MetadataImporter.loadRegistry(base + "workflow-types.xml", true);
            }

            context.restoreAuthSystemState();
            // Commit changes and close context
            context.complete();
            log.info("All Bitstream Format Regitry and Metadata Registry updates were completed.");
        }
        catch(Exception e)
        {
            log.error("Error attempting to update Bitstream Format and/or Metadata Registries", e);
View Full Code Here

            // While it's not really a formal "registry", we need to ensure the
            // default, required Groups exist in the DSpace database
            Group.initDefaultGroupNames(context);
            context.restoreAuthSystemState();
            // Commit changes and close context
            context.complete();
        }
        catch(Exception e)
        {
            log.error("Error attempting to add/update default DSpace Groups", e);
        }
View Full Code Here

             */
            bitstream.setColumn("store_number", incoming);

            DatabaseManager.insert(tempContext, bitstream);

            tempContext.complete();
        }
        catch (SQLException sqle)
        {
            if (tempContext != null)
            {
View Full Code Here

      bitstream.setColumn("deleted", true);
      bitstream.setColumn("internal_id", sInternalId);
      bitstream.setColumn("store_number", assetstore);
      DatabaseManager.insert(tempContext, bitstream);

      tempContext.complete();
    } catch (SQLException sqle) {
      if (tempContext != null) {
        tempContext.abort();
      }
      throw sqle;
View Full Code Here

                                                ContextUtil.obtainContext(ObjectModelHelper.getRequest(objectModel)),
                                                bitstream));
           
            // If we created the database connection close it, otherwise leave it open.
            if (BitstreamReaderOpenedContext)
              context.complete();
        }
        catch (SQLException sqle)
        {
            throw new ProcessingException("Unable to read bitstream.",sqle);
        }
View Full Code Here

                      "handle.resource_type_id=2) WHERE  text_value LIKE 'http://hdl.handle.net/%';";
                updated = DatabaseManager.updateQuery(context, sql, new Object[] {});
                System.out.println(updated + " metadata values updated");

                // Commit the changes
                context.complete();

                System.out.print("Re-creating browse and search indexes... ");               

                // Reinitialise the browse system
                IndexBrowse.main(new String[] {"-i"});
View Full Code Here

                    context.commit();
                    System.out.println(" Done!");
                }
            }

            context.complete();
        }
        // Aborting will leave the DB objects around, even if the
        // bitstreams are deleted. This is OK; deleting them next
        // time around will be a no-op.
        catch (SQLException sqle)
View Full Code Here

        {
            System.out.println("Unable to write to output file " + output);
            System.exit(0);
        }
       
        context.complete();
    }
   
    /**
     * Output the usage information
     */
 
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.