Package org.dspace.core

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


                {
                    myloader.addBTEItems(c, mycollections, sourcedir, mapfile, template, bteInputType, null);
                }

                // complete all transactions
                c.complete();
            }
            catch (Exception e)
            {
                c.abort();
                e.printStackTrace();
View Full Code Here


         
          // email message letting user know the file is ready for
                    // download
                    emailSuccessMessage(context, eperson, mapFilePath);
                   
          context.complete();

        } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
         
View Full Code Here

                        mapOut.close();
                    }

                    // Make sure the database connection gets closed in all conditions.
                  try {
            context.complete();
          } catch (SQLException sqle) {
            context.abort();
          }
                }
      }
View Full Code Here

                {
                    //replace the object from the source file
                    myPackager.replace(context, sip, pkgParams, sourceFile, objToReplace);

                    //commit all changes & exit successfully
                    context.complete();
                    System.exit(0);
                }
                catch (Exception e)
                {
                    // abort all operations
View Full Code Here

            {
                //ingest the object from the source file
                myPackager.ingest(context, sip, pkgParams, sourceFile, parentObjs);

                //commit all changes & exit successfully
                context.complete();
                System.exit(0);
            }
            catch (Exception e)
            {
                // abort all operations
View Full Code Here

    throws ItemCountException, SQLException
  {
        Context context = new Context();
        ItemCounter ic = new ItemCounter(context);
    ic.buildItemCounts();
        context.complete();
  }
 
  /**
   * Construct a new item counter which will use the give DSpace Context
   *
 
View Full Code Here

                indexer.initBrowse();
                return;
            }

            indexer.usage(options);
            context.complete();
        }
        finally
        {
            Date endTime = new Date();
            System.out.println("Started: " + startTime.getTime());
View Full Code Here

            row.setColumn("AppName", kind);
            row.setColumn("URL", url);
            row.setColumn("Started", now);
            row.setColumn("isUI", isUI() ? 1 : 0); // update won't widen boolean to integer
            DatabaseManager.update(context, row);
            context.complete();
        } catch (SQLException e) {
            log.error("Failed to record startup in Webapp table.", e);
        }
    }
View Full Code Here

    {
        // Remove the database entry
        try {
            Context context = new Context();
            DatabaseManager.delete(context, row);
            context.complete();
        } catch (SQLException e) {
            log.error("Failed to record shutdown in Webapp table.", e);
        }
    }
View Full Code Here

                    }
                }
            }
        }

        c.complete();
    }

    private static void exportItem(Context c, ItemIterator i,
            String destDirName, int seqStart, boolean migrate) throws Exception
    {
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.