Package org.dspace.app.rest.security
Class ExtractorOfAInprogressSubmissionInformations
- java.lang.Object
-
- org.dspace.app.rest.security.ExtractorOfAInprogressSubmissionInformations
-
@Component("extractorOf") public class ExtractorOfAInprogressSubmissionInformations extends ObjectMethods 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 ExtractorOfAInprogressSubmissionInformations()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetAInprogressSubmissionID(javax.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.StringgetAInprogressSubmissionTarget(javax.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.IntegergetVersionIdByItemUUID(javax.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.
-
-
-
Method Detail
-
getAInprogressSubmissionID
public Integer getAInprogressSubmissionID(@Nullable javax.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 requestversionHistoryId- VersionHistoryId- Returns:
-
getAInprogressSubmissionTarget
public String getAInprogressSubmissionTarget(@Nullable javax.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 requestversionHistoryId- VersionHistoryId- Returns:
-
getVersionIdByItemUUID
public Integer getVersionIdByItemUUID(@Nullable javax.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 requestuuid- Item uuid- Returns:
-
-