Class ExtractorOfAInprogressSubmissionInformations

java.lang.Object
org.dspace.app.rest.security.ExtractorOfAInprogressSubmissionInformations

@Component("extractorOf") public class ExtractorOfAInprogressSubmissionInformations extends Object
Methods of this class are used on PreAuthorize annotations to convert input parameters.
Author:
Mykhaylo Boychuk (mykhaylo.boychuk at 4science.it)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getAInprogressSubmissionID(jakarta.servlet.http.HttpServletRequest request, Integer versionHistoryId)
    This method is used on security checks, given a versionHistory id, it searches the latest version and checks if there is a Workspace/Workflow item in progress submission, if yes return the id of this one, otherwise returns null.
    getAInprogressSubmissionTarget(jakarta.servlet.http.HttpServletRequest request, Integer versionHistoryId)
    This method is used on security checks, given a versionHistory id, it searches the latest version and checks if there is a Workspace/Workflow item in progress submission, if yes return the rest name - 'workspaceitem' or 'workflowitem', otherwise it returns the empty string.
    getVersionIdByItemUUID(jakarta.servlet.http.HttpServletRequest request, UUID uuid)
    This method is used on security checks, given an item UUID, it searches the relative version, if version exist return its id, otherwise returns null.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExtractorOfAInprogressSubmissionInformations

      public ExtractorOfAInprogressSubmissionInformations()
  • Method Details

    • getAInprogressSubmissionID

      public Integer getAInprogressSubmissionID(@Nullable jakarta.servlet.http.HttpServletRequest request, Integer versionHistoryId)
      This method is used on security checks, given a versionHistory id, it searches the latest version and checks if there is a Workspace/Workflow item in progress submission, if yes return the id of this one, otherwise returns null.
      Parameters:
      request - The current request
      versionHistoryId - VersionHistoryId
      Returns:
    • getAInprogressSubmissionTarget

      public String getAInprogressSubmissionTarget(@Nullable jakarta.servlet.http.HttpServletRequest request, Integer versionHistoryId)
      This method is used on security checks, given a versionHistory id, it searches the latest version and checks if there is a Workspace/Workflow item in progress submission, if yes return the rest name - 'workspaceitem' or 'workflowitem', otherwise it returns the empty string.
      Parameters:
      request - The current request
      versionHistoryId - VersionHistoryId
      Returns:
    • getVersionIdByItemUUID

      public Integer getVersionIdByItemUUID(@Nullable jakarta.servlet.http.HttpServletRequest request, UUID uuid)
      This method is used on security checks, given an item UUID, it searches the relative version, if version exist return its id, otherwise returns null.
      Parameters:
      request - The current request
      uuid - Item uuid
      Returns: