Package org.dspace.content

Examples of org.dspace.content.WorkspaceItem


            throws DSpaceSwordException
    {
        try
        {
            // obtain the workspace item which should therefore exist
            WorkspaceItem wsi = this.getWorkspaceItem(context, item);

            // kick off the workflow
            boolean notify = ConfigurationManager.getBooleanProperty("swordv2-server", "workflow.notify");
            if (ConfigurationManager.getProperty("workflow", "workflow.framework").equals("xmlworkflow")) {
                if (notify) {
View Full Code Here


            // create the an item in the workspace.  This is necessary, because later
            // we are going to ask a package ingester to /replace/ this item, which gives
            // us finer control over the workflow state of the item, whereas asking
            // the ingester to /create/ this item causes it to be injected into the workflow,
            // irrespective of the In-Progress header provided by the depositor
            WorkspaceItem wsi = WorkspaceItem.create(context, collection, true);
            Item item = wsi.getItem();

            // need to add a licence file, otherwise the METS replace function raises a NullPointerException
            String licence = collection.getLicense();
            if (PackageUtils.findDepositLicense(context, item) == null)
            {
View Full Code Here

            // get deposited file as file object
      File depositFile = deposit.getFile();

            // decide whether we have a new item or an existing one
            Item item = null;
            WorkspaceItem wsi = null;
            if (result != null)
            {
                item = result.getItem();
            }
            else
            {
                result = new DepositResult();
            }
            if (item == null)
            {
                // simple zip ingester uses the item template, since there is no native metadata
                wsi = WorkspaceItem.create(context, collection, true);
                item = wsi.getItem();
            }

            // get the original bundle
            Bundle[] originals = item.getBundles("ORIGINAL");
            Bundle bundle = null;
View Full Code Here

    {
        // get the values out of the request
        int wsItemID = UIUtil.getIntParameter(request, "workspace_id");
       
        // get the workspace item
        WorkspaceItem wsItem = WorkspaceItem.find(context, wsItemID);
       
        // Ensure the user has authorisation
        Item item = wsItem.getItem();
        AuthorizeManager.authorizeAction(context, item, Constants.READ);
       
        log.info(LogManager.getHeader(context,
            "View Workspace Item",
            "workspace_item_id="+wsItemID));
View Full Code Here

            Item item = Item.find(context, itemID);

            if (AuthorizeManager.isAdmin(context, item) || item.canEdit()) {
                VersioningService versioningService = new DSpace().getSingletonService(VersioningService.class);
                Version version = versioningService.createNewVersion(context, itemID, summary);
                WorkspaceItem wsi = WorkspaceItem.findByItem(context, version.getItem());

                context.commit();

                result.setParameter("wsid", wsi.getID());
                result.setOutcome(true);
                result.setContinue(true);
                result.setMessage(T_version_created);
                result.setParameter("summary", summary);
            }
View Full Code Here

      if (workspaceIDs != null)
      {
          for (String workspaceID : workspaceIDs)
          {
            // 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

Related Classes of org.dspace.content.WorkspaceItem

Copyright © 2018 www.massapicom. 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.