mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-12 12:33:18 +00:00
D4CRIS-338 add implementation to grant license
This commit is contained in:
@@ -10,6 +10,7 @@ package org.dspace.content;
|
||||
import java.io.InputStream;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.dspace.content.factory.ContentServiceFactory;
|
||||
@@ -437,4 +438,16 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
return hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add date for bitstream granted (used into the use case for license grant the {@link LicenseUtils#grantLicense(Context, Item, String, String)}
|
||||
*
|
||||
* @param context
|
||||
* the dspace context
|
||||
* @param acceptanceDate the granted date
|
||||
* @throws SQLException
|
||||
*/
|
||||
public void setAcceptanceDate(Context context, DCDate acceptanceDate) throws SQLException {
|
||||
getBitstreamService().setMetadataSingleValue(context, this, MetadataSchema.DC_SCHEMA, "rights", "date", null, acceptanceDate.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user