Package org.dspace.core

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


        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


                }
                else
                {
                    ePerson.setLastActive(date);
                    ePerson.update();
                    ctx.commit();
                }
            }
        }

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

            // if curation scoped, commit transaction
            if (txScope.equals(TxScope.CURATION)) {
              Context ctx = curationCtx.get();
              if (ctx != null)
              {
                ctx.commit();
              }
            }
        }
        catch (SQLException sqlE)
        {
View Full Code Here

      {
        try
        {
          if (txScope.equals(TxScope.OBJECT))
          {
            curCtx.commit();
          }
          if (curCtx.getCacheSize() % cacheLimit == 0)
          {
            curCtx.clearCache();
          }
View Full Code Here

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

        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

                Workflow workflow = WorkflowFactory.getWorkflow(workflowItem.getCollection());

                WorkflowActionConfig currentAction = workflow.getStep(poolTask.getStepID()).getActionConfig(poolTask.getActionID());
                XmlWorkflowManager.doState(context, context.getCurrentUser(), request, workflowID, workflow, currentAction);
            }
            context.commit();
        }


        return null;
    }
View Full Code Here

                HttpResponse response = client.execute(method);
                int status = response.getStatusLine().getStatusCode();
                if (status != HttpStatus.SC_OK)
                {
                    DatabaseManager.delete(context, row);
                    context.commit();
                    continue;
                }

                apps.add(app);
            }
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

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.