Package org.dspace.content

Examples of org.dspace.content.Item.update()


    {
      collection.createTemplateItem();
      template = collection.getTemplateItem();
     
      collection.update();
      template.update();
      context.commit();
    }
   
    return template.getID();
  }
View Full Code Here


                        }
                        item.addMetadata(parts[0], parts[1], parts[2], lang,
                                             value, authority, iconf);
    }
   
    item.update();
    context.commit();
   
    result.setContinue(true);
   
    result.setOutcome(true);
View Full Code Here

    MetadataField field = MetadataField.find(context,Integer.valueOf(fieldID));
    MetadataSchema schema = MetadataSchema.find(context,field.getSchemaID());
   
    item.addMetadata(schema.getName(), field.getElement(), field.getQualifier(), language, value);
   
    item.update();
    context.commit();
   
    result.setContinue(true);
   
    result.setOutcome(true);
View Full Code Here

        FlowResult result = new FlowResult();
        result.setContinue(false);

        Item item = Item.find(context, itemID);
        item.setDiscoverable(false);
        item.update();
        context.commit();

        result.setContinue(true);
        result.setOutcome(true);
        result.setMessage(T_item_private);
View Full Code Here

        FlowResult result = new FlowResult();
        result.setContinue(false);

        Item item = Item.find(context, itemID);
        item.setDiscoverable(true);
        item.update();
        context.commit();

        result.setContinue(true);
        result.setOutcome(true);
        result.setMessage(T_item_public);
View Full Code Here

          if (inherit)
          {
              item.inheritCollectionDefaultPolicies(destination);
          }

          item.update();
          context.commit();

          result.setOutcome(true);
          result.setContinue(true);
          result.setMessage(T_item_moved);
View Full Code Here

      BitstreamFormat format = FormatIdentifier.guessFormat(context, bitstream);
      bitstream.setFormat(format);

      // Update to DB
      bitstream.update();
      item.update();

            processAccessFields(context, request, item.getOwningCollection(), bitstream);
     
      context.commit();
     
View Full Code Here

                    }
          }
          if (!isTest)
          {
            Item item = itarch.getItem();
            item.update()//need to update before commit
            context.commit()
            item.decache();
          }
          ItemUpdate.pr("Item " + dirname + " completed");
          successItemCount++;
View Full Code Here

      {
        item.removeBundle(bundle);
      }
    }
   
    item.update();
   
    context.commit();
   
    result.setContinue(true);
    result.setOutcome(true);
View Full Code Here

      // authorisation briefly, because although the user may be
      // able to add stuff to the repository, they may not have
      // WRITE permissions on the archive.
      boolean ignore = context.ignoreAuthorization();
      context.setIgnoreAuthorization(true);
      installedItem.update();
      context.setIgnoreAuthorization(ignore);
     
      // for some reason, DSpace will not give you the handle automatically,
      // so we have to look it up
      String handle = HandleManager.findHandle(context, installedItem);
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.