Package org.dspace.app.rest.submit
Class SubmissionService
- java.lang.Object
-
- org.dspace.app.rest.submit.SubmissionService
-
@Component public class SubmissionService extends Object
Service to manipulate in-progress submissions.- Author:
- Luigi Andrea Pascarelli (luigiandrea.pascarelli at 4science.it)
-
-
Field Summary
Fields Modifier and Type Field Description protected CollectionServicecollectionServiceprotected ConfigurationServiceconfigurationServiceprotected CreativeCommonsServicecreativeCommonsServiceprotected ItemServiceitemServiceprotected WorkflowItemService<XmlWorkflowItem>workflowItemServiceprotected WorkflowService<XmlWorkflowItem>workflowServiceprotected WorkspaceItemServiceworkspaceItemService
-
Constructor Summary
Constructors Constructor Description SubmissionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UploadBitstreamRestbuildUploadBitstream(ConfigurationService configurationService, Bitstream source)Build the rest representation of a bitstream as used in the upload section (DataUpload.XmlWorkflowItemcreateWorkflowItem(Context context, String requestUriListString)Create a workflowitem using the information in the requestWorkspaceItemcreateWorkspaceItem(Context context, Request request)Create a workspaceitem using the information in the requestDataCCLicensegetDataCCLicense(InProgressSubmission obj)Builds the CC License data of an inprogress submission based on the cc license info present in the metadatavoidsaveWorkflowItem(Context context, XmlWorkflowItem source)voidsaveWorkspaceItem(Context context, WorkspaceItem wsi)
-
-
-
Field Detail
-
configurationService
@Autowired protected ConfigurationService configurationService
-
collectionService
@Autowired protected CollectionService collectionService
-
itemService
@Autowired protected ItemService itemService
-
workspaceItemService
@Autowired protected WorkspaceItemService workspaceItemService
-
workflowItemService
@Autowired protected WorkflowItemService<XmlWorkflowItem> workflowItemService
-
workflowService
@Autowired protected WorkflowService<XmlWorkflowItem> workflowService
-
creativeCommonsService
@Autowired protected CreativeCommonsService creativeCommonsService
-
-
Method Detail
-
createWorkspaceItem
public WorkspaceItem createWorkspaceItem(Context context, Request request) throws SQLException, AuthorizeException
Create a workspaceitem using the information in the request- Parameters:
context- the dspace contextrequest- the request containing the details about the workspace to create- Returns:
- Throws:
SQLExceptionAuthorizeException
-
saveWorkspaceItem
public void saveWorkspaceItem(Context context, WorkspaceItem wsi)
-
buildUploadBitstream
public UploadBitstreamRest buildUploadBitstream(ConfigurationService configurationService, Bitstream source) throws SQLException
Build the rest representation of a bitstream as used in the upload section (DataUpload. It contains all its metadata and the list of applied access conditions (@linkUploadBitstreamAccessConditionDTO- Parameters:
configurationService- the DSpace ConfigurationServicesource- the bitstream to translate in its rest submission representation- Returns:
- Throws:
SQLException
-
createWorkflowItem
public XmlWorkflowItem createWorkflowItem(Context context, String requestUriListString) throws SQLException, AuthorizeException, WorkflowException
Create a workflowitem using the information in the request- Parameters:
context- the dspace contextrequestUriListString- the id of the workspaceItem- Returns:
- Throws:
SQLExceptionAuthorizeExceptionWorkflowException
-
saveWorkflowItem
public void saveWorkflowItem(Context context, XmlWorkflowItem source) throws SQLException, AuthorizeException
- Throws:
SQLExceptionAuthorizeException
-
getDataCCLicense
public DataCCLicense getDataCCLicense(InProgressSubmission obj) throws SQLException, IOException, AuthorizeException
Builds the CC License data of an inprogress submission based on the cc license info present in the metadata- Parameters:
obj- - the in progress submission- Returns:
- an object representing the CC License data
- Throws:
SQLExceptionIOExceptionAuthorizeException
-
-