Examples of SwordError


Examples of org.swordapp.server.SwordError

      SwordUrlManager urlManager = config.getUrlManager(context, config);

      Item item = urlManager.getItem(context, editIRI);
            if (item == null)
            {
                throw new SwordError(404);
            }

            // we can't give back an entry unless the user is authorised to retrieve it
            AuthorizeManager.authorizeAction(context, item, Constants.READ);
View Full Code Here

Examples of org.swordapp.server.SwordError

            // get the deposit target
            Item item = this.getDSpaceTarget(context, editIRI, config);
            if (item == null)
            {
                throw new SwordError(404);
            }

      // now we have the deposit target, we can determine whether this operation is allowed
      // at all
      WorkflowManager wfm = WorkflowManagerFactory.getInstance();
View Full Code Here

Examples of org.swordapp.server.SwordError

      // get the deposit target
            Item item = this.getDSpaceTarget(context, editIRI, config);
            if (item == null)
            {
                throw new SwordError(404);
            }

      // Ensure that this method is allowed
      WorkflowManager wfm = WorkflowManagerFactory.getInstance();
      wfm.replaceMetadataAndMediaResource(context, item);
View Full Code Here

Examples of org.swordapp.server.SwordError

            // get the deposit target
            Item item = this.getDSpaceTarget(context, editIRI, config);
            if (item == null)
            {
                throw new SwordError(404);
            }

      // now we have the deposit target, we can determine whether this operation is allowed
      // at all
      WorkflowManager wfm = WorkflowManagerFactory.getInstance();
View Full Code Here

Examples of org.swordapp.server.SwordError

            // get the deposit target
            Item item = this.getDSpaceTarget(context, editIRI, config);
            if (item == null)
            {
                throw new SwordError(404);
            }

      // now we have the deposit target, we can determine whether this operation is allowed
      // at all
      WorkflowManager wfm = WorkflowManagerFactory.getInstance();
View Full Code Here

Examples of org.swordapp.server.SwordError

            // get the deposit target
            Item item = this.getDSpaceTarget(context, editIRI, config);
            if (item == null)
            {
                throw new SwordError(404);
            }

      // now we have the deposit target, we can determine whether this operation is allowed
      // at all
      WorkflowManager wfm = WorkflowManagerFactory.getInstance();
View Full Code Here

Examples of org.swordapp.server.SwordError

    // get the target collection
    Item item = urlManager.getItem(context, editUrl);
        if (item == null)
        {
            throw new SwordError(404);
        }

    this.verboseDescription.append("Performing replace using edit-media URL: " + editUrl);
        this.verboseDescription.append("Location resolves to item with handle: " + item.getHandle());
View Full Code Here

Examples of org.swordapp.server.SwordError

            throws DSpaceSwordException, SwordError
    {
        WorkflowManager manager = (WorkflowManager) PluginManager.getSinglePlugin("swordv2-server", WorkflowManager.class);
        if (manager == null)
        {
            throw new SwordError(DSpaceUriRegistry.REPOSITORY_ERROR, "No workflow manager configured");
        }
        return manager;
  }
View Full Code Here

Examples of org.swordapp.server.SwordError

  public void replaceResourceContent(Context context, Item item) throws SwordError, DSpaceSwordException
  {
    WorkflowTools wft = new WorkflowTools();
    if (item.isArchived() || item.isWithdrawn())
    {
      throw new SwordError(UriRegistry.ERROR_METHOD_NOT_ALLOWED, "The item has already been archived, and can no longer be modified");
    }
    if (wft.isItemInWorkflow(context, item))
    {
      throw new SwordError(UriRegistry.ERROR_METHOD_NOT_ALLOWED, "The item has already been injected into the review workflow, and can no longer be modified");
    }
  }
View Full Code Here

Examples of org.swordapp.server.SwordError

        // otherwise, go ahead and figure out the state
    WorkflowTools wft = new WorkflowTools();
    if (item.isArchived() || item.isWithdrawn())
    {
      throw new SwordError(UriRegistry.ERROR_METHOD_NOT_ALLOWED, "The item has already been archived, and can no longer be modified");
    }
    if (wft.isItemInWorkflow(context, item))
    {
      throw new SwordError(UriRegistry.ERROR_METHOD_NOT_ALLOWED, "The item has already been injected into the review workflow, and can no longer be modified");
    }
  }
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.