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 org.dspace.content.service.CollectionServicecollectionServiceprotected ConfigurationServiceconfigurationServiceprotected org.dspace.license.service.CreativeCommonsServicecreativeCommonsServiceprotected org.dspace.content.service.ItemServiceitemServiceprotected org.dspace.workflow.WorkflowItemService<org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItem>workflowItemServiceprotected org.dspace.workflow.WorkflowService<org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItem>workflowServiceprotected org.dspace.content.service.WorkspaceItemServiceworkspaceItemService
-
Constructor Summary
Constructors Constructor Description SubmissionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UploadBitstreamRestbuildUploadBitstream(ConfigurationService configurationService, org.dspace.content.Bitstream source)Build the rest representation of a bitstream as used in the upload section (DataUpload.org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItemcreateWorkflowItem(org.dspace.core.Context context, String requestUriListString)Create a workflowitem using the information in the requestorg.dspace.content.WorkspaceItemcreateWorkspaceItem(org.dspace.core.Context context, Request request)Create a workspaceitem using the information in the requestDataCCLicensegetDataCCLicense(org.dspace.content.InProgressSubmission obj)Builds the CC License data of an inprogress submission based on the cc license info present in the metadatavoidsaveWorkflowItem(org.dspace.core.Context context, org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItem source)voidsaveWorkspaceItem(org.dspace.core.Context context, org.dspace.content.WorkspaceItem wsi)
-
-
-
Field Detail
-
configurationService
@Autowired protected ConfigurationService configurationService
-
collectionService
@Autowired protected org.dspace.content.service.CollectionService collectionService
-
itemService
@Autowired protected org.dspace.content.service.ItemService itemService
-
workspaceItemService
@Autowired protected org.dspace.content.service.WorkspaceItemService workspaceItemService
-
workflowItemService
@Autowired protected org.dspace.workflow.WorkflowItemService<org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItem> workflowItemService
-
workflowService
@Autowired protected org.dspace.workflow.WorkflowService<org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItem> workflowService
-
creativeCommonsService
@Autowired protected org.dspace.license.service.CreativeCommonsService creativeCommonsService
-
-
Method Detail
-
createWorkspaceItem
public org.dspace.content.WorkspaceItem createWorkspaceItem(org.dspace.core.Context context, Request request) throws SQLException, org.dspace.authorize.AuthorizeExceptionCreate 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:
SQLExceptionorg.dspace.authorize.AuthorizeException
-
saveWorkspaceItem
public void saveWorkspaceItem(org.dspace.core.Context context, org.dspace.content.WorkspaceItem wsi)
-
buildUploadBitstream
public UploadBitstreamRest buildUploadBitstream(ConfigurationService configurationService, org.dspace.content.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 org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItem createWorkflowItem(org.dspace.core.Context context, String requestUriListString) throws SQLException, org.dspace.authorize.AuthorizeException, org.dspace.workflow.WorkflowExceptionCreate a workflowitem using the information in the request- Parameters:
context- the dspace contextrequestUriListString- the id of the workspaceItem- Returns:
- Throws:
SQLExceptionorg.dspace.authorize.AuthorizeExceptionorg.dspace.workflow.WorkflowException
-
saveWorkflowItem
public void saveWorkflowItem(org.dspace.core.Context context, org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItem source) throws SQLException, org.dspace.authorize.AuthorizeException- Throws:
SQLExceptionorg.dspace.authorize.AuthorizeException
-
getDataCCLicense
public DataCCLicense getDataCCLicense(org.dspace.content.InProgressSubmission obj) throws SQLException, IOException, org.dspace.authorize.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:
SQLExceptionIOExceptionorg.dspace.authorize.AuthorizeException
-
-