Class DefaultItemVersionProvider

    • Constructor Detail

      • DefaultItemVersionProvider

        public DefaultItemVersionProvider()
    • Method Detail

      • updateItemState

        public Item updateItemState​(Context c,
                                    Item itemNew,
                                    Item previousItem)
        Copy all data (minus a few exceptions) from the old item to the new item.
        Specified by:
        updateItemState in interface ItemVersionProvider
        Parameters:
        c - the DSpace context.
        itemNew - the new version of the item.
        previousItem - the old version of the item.
        Returns:
        the new version of the item, with data from the old item.
      • copyRelationships

        protected void copyRelationships​(Context context,
                                         Item newItem,
                                         Item oldItem)
                                  throws SQLException,
                                         AuthorizeException
        Copy all relationships of the old item to the new item. At this point in the lifecycle of the item-version (before archival), only the opposite item receives "latest" status. On item archival of the item-version, the "latest" status of the relevant relationships will be updated.
        Parameters:
        context - the DSpace context.
        newItem - the new version of the item.
        oldItem - the old version of the item.
        Throws:
        SQLException
        AuthorizeException