Package org.dspace.content
Class InstallItemServiceImpl
- java.lang.Object
-
- org.dspace.content.InstallItemServiceImpl
-
- All Implemented Interfaces:
InstallItemService
public class InstallItemServiceImpl extends Object implements InstallItemService
Support to install an Item in the archive.- Version:
- $Revision$
- Author:
- dstuve
-
-
Field Summary
Fields Modifier and Type Field Description protected CollectionServicecollectionServiceprotected ContentServiceFactorycontentServiceFactoryprotected EmbargoServiceembargoServiceprotected IdentifierServiceidentifierServiceprotected ItemServiceitemServiceprotected SupervisionOrderServicesupervisionOrderService
-
Constructor Summary
Constructors Modifier Constructor Description protectedInstallItemServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ItemfinishItem(Context c, Item item, InProgressSubmission is)Final housekeeping when adding a new Item into the archive.StringgetBitstreamProvenanceMessage(Context context, Item myitem)Generate provenance-worthy description of the bitstreams contained in an item.StringgetSubmittedByProvenanceMessage(Context context, Item item)Generate provenance description of direct item submission (not through workflow).IteminstallItem(Context c, InProgressSubmission is)Take an InProgressSubmission and turn it into a fully-archived Item, creating a new Handle.IteminstallItem(Context c, InProgressSubmission is, String suppliedHandle)Take an InProgressSubmission and turn it into a fully-archived Item.protected voidpopulateMetadata(Context c, Item item)ItemrestoreItem(Context c, InProgressSubmission is, String suppliedHandle)Turn an InProgressSubmission into a fully-archived Item, for a "restore" operation such as ingestion of an AIP to recreate an archive.
-
-
-
Field Detail
-
contentServiceFactory
@Autowired(required=true) protected ContentServiceFactory contentServiceFactory
-
collectionService
@Autowired(required=true) protected CollectionService collectionService
-
embargoService
@Autowired(required=true) protected EmbargoService embargoService
-
identifierService
@Autowired(required=true) protected IdentifierService identifierService
-
itemService
@Autowired(required=true) protected ItemService itemService
-
supervisionOrderService
@Autowired(required=true) protected SupervisionOrderService supervisionOrderService
-
-
Method Detail
-
installItem
public Item installItem(Context c, InProgressSubmission is) throws SQLException, AuthorizeException
Description copied from interface:InstallItemServiceTake an InProgressSubmission and turn it into a fully-archived Item, creating a new Handle.- Specified by:
installItemin interfaceInstallItemService- Parameters:
c- DSpace Contextis- submission to install- Returns:
- the fully archived Item
- Throws:
SQLException- if database errorAuthorizeException- if authorization error
-
installItem
public Item installItem(Context c, InProgressSubmission is, String suppliedHandle) throws SQLException, AuthorizeException
Description copied from interface:InstallItemServiceTake an InProgressSubmission and turn it into a fully-archived Item.- Specified by:
installItemin interfaceInstallItemService- Parameters:
c- current contextis- submission to installsuppliedHandle- the existing Handle to give to the installed item- Returns:
- the fully archived Item
- Throws:
SQLException- if database errorAuthorizeException- if authorization error
-
restoreItem
public Item restoreItem(Context c, InProgressSubmission is, String suppliedHandle) throws SQLException, IOException, AuthorizeException
Description copied from interface:InstallItemServiceTurn an InProgressSubmission into a fully-archived Item, for a "restore" operation such as ingestion of an AIP to recreate an archive. This does NOT add any descriptive metadata (e.g. for provenance) to preserve the transparency of the ingest. The ingest mechanism is assumed to have set all relevant technical and administrative metadata fields.- Specified by:
restoreItemin interfaceInstallItemService- Parameters:
c- current contextis- submission to installsuppliedHandle- the existing Handle to give the installed item, or null to create a new one.- Returns:
- the fully archived Item
- Throws:
SQLException- if database errorIOException- if IO errorAuthorizeException- if authorization error
-
populateMetadata
protected void populateMetadata(Context c, Item item) throws SQLException, AuthorizeException
- Throws:
SQLExceptionAuthorizeException
-
finishItem
protected Item finishItem(Context c, Item item, InProgressSubmission is) throws SQLException, AuthorizeException
Final housekeeping when adding a new Item into the archive. This method is used by *both* installItem() and restoreItem(), so all actions here will be run for a newly added item or a restored item.- Parameters:
c- DSpace Contextitem- Item in questionis- InProgressSubmission object- Returns:
- final "archived" Item
- Throws:
SQLException- if database errorAuthorizeException- if authorization error
-
getBitstreamProvenanceMessage
public String getBitstreamProvenanceMessage(Context context, Item myitem) throws SQLException
Description copied from interface:InstallItemServiceGenerate provenance-worthy description of the bitstreams contained in an item.- Specified by:
getBitstreamProvenanceMessagein interfaceInstallItemService- Parameters:
context- contextmyitem- the item to generate description for- Returns:
- provenance description
- Throws:
SQLException- if database error
-
getSubmittedByProvenanceMessage
public String getSubmittedByProvenanceMessage(Context context, Item item) throws SQLException
Description copied from interface:InstallItemServiceGenerate provenance description of direct item submission (not through workflow).- Specified by:
getSubmittedByProvenanceMessagein interfaceInstallItemService- Parameters:
context- contextitem- the item to generate description for- Returns:
- provenance description
- Throws:
SQLException- if database error
-
-