Package org.dspace.core

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


                {
                    DSIndexer.indexContent(context, item, true);
                    ib.indexItem(item);
                }
            }
            context.commit();
            context.clearCache();
        }
        catch (DCInputsReaderException e)
        {
            log.error(e.getMessage());
View Full Code Here


                // Display the changes
                displayChanges(changes, true);

                // Commit the change to the DB
                c.commit();
            }

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

                }
            }
        }

        // commit pending transactions before continuing
        c.commit();

        // now combine some bundles
        ii = Item.findAll(c);

        while (ii.hasNext())
View Full Code Here

          {
            WorkflowManager.claim(context, workflowItem, context.getCurrentUser());
          }
        }

        context.commit();
      }
     
      return null;
    }
View Full Code Here

          {
            // If they selected to remove the item then delete everything.
          WorkspaceItem workspaceItem = WorkspaceItem.find(context, Integer.valueOf(workspaceID));
          workspaceItem.deleteAll();
          }
          context.commit();
      }
   
        return null;
    }
View Full Code Here

          {
                    log.info(LogManager.getHeader(context, "unclaim_workflow", "workflow_id=" + workflowItem.getID()));
            WorkflowManager.unclaim(context, workflowItem, context.getCurrentUser());
          }
        }
        context.commit();
      }
     
      return null;
    }
View Full Code Here

        HarvestedCollection hc = HarvestedCollection.find(context, cid);
        hc.setHarvestStartTime(null);
        hc.setHarvestStatus(HarvestedCollection.STATUS_READY);
        hc.update();
      }
      context.commit();
    }
 
 
  /**
   * Exception class specifically assigned to recoverable errors that occur during harvesting. Throughout the harvest process, various exceptions
View Full Code Here

      //subContext.setCurrentUser(harvestAdmin);
     
      HarvestedCollection hc = HarvestedCollection.find(subContext, collecionID);
      hc.setHarvestStatus(HarvestedCollection.STATUS_QUEUED);
      hc.update();
      subContext.commit();
     
      HarvestThread ht = new HarvestThread(subContext, hc);
      harvestThreads.push(ht);                       
     
      log.debug("****** Queued up a thread. Active threads: " + harvestThreads.toString());
View Full Code Here

                // amounts of bitstreams.
                commit_counter++;
                if (commit_counter % 100 == 0)
                {
                  System.out.print("Committing changes to the database...");
                    context.commit();
                    System.out.println(" Done!");
                }
            }

            context.complete();
View Full Code Here

                // amounts of bitstreams.
                commitCounter++;
                if (commitCounter % 100 == 0)
                {
                  System.out.print("Committing changes to the database...");
                    context.commit();
                    System.out.println(" Done!");
                }
            }

            context.complete();
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.