public class LicenseUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getLicenseText(Locale locale,
Collection collection,
Item item,
EPerson eperson)
Utility method if no additional arguments are to be supplied to the
license template.
|
static String |
getLicenseText(Locale locale,
Collection collection,
Item item,
EPerson eperson,
Map<String,Object> additionalInfo)
Return the text of the license that the user has granted/must grant
before for submit the item.
|
static void |
grantLicense(Context context,
Item item,
String licenseText,
String acceptanceDate)
Store a copy of the license a user granted in the item.
|
public static String getLicenseText(Locale locale, Collection collection, Item item, EPerson eperson, Map<String,Object> additionalInfo)
locale - Formatter localecollection - collection to get license fromitem - the item object of the licenseeperson - EPerson to get firstname, lastname and email fromadditionalInfo - additional template arguments beyond 0-6public static String getLicenseText(Locale locale, Collection collection, Item item, EPerson eperson)
null for the additionalInfo argument)locale - Formatter localecollection - collection to get license fromitem - the item object of the licenseeperson - EPerson to get firstname, lastname and email frompublic static void grantLicense(Context context, Item item, String licenseText, String acceptanceDate) throws SQLException, IOException, AuthorizeException
context - the dspace contextitem - the item object of the licenselicenseText - the license the user grantedacceptanceDate - TODOSQLException - if database errorIOException - if IO errorAuthorizeException - if authorization errorCopyright © 2019 DuraSpace. All rights reserved.