Package org.dspace.core
Class LicenseServiceImpl
- java.lang.Object
-
- org.dspace.core.LicenseServiceImpl
-
- All Implemented Interfaces:
LicenseService
public class LicenseServiceImpl extends Object implements LicenseService
Encapsulate the deposit license.- Author:
- mhwood
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLicenseServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDefaultSubmissionLicense()Get the site-wide default license that submitters need to grant Localized license requires: default_{{locale}}.license file.StringgetLicenseText(String licenseFile)Get the Licenseprotected voidinit()Load in the default license.voidwriteLicenseFile(String licenseFile, String newLicense)Writes license to a text file.
-
-
-
Field Detail
-
license
protected String license
The default license
-
-
Method Detail
-
writeLicenseFile
public void writeLicenseFile(String licenseFile, String newLicense)
Description copied from interface:LicenseServiceWrites license to a text file.- Specified by:
writeLicenseFilein interfaceLicenseService- Parameters:
licenseFile- name for the file into which license will be written, relative to the current directory.newLicense- new license
-
getLicenseText
public String getLicenseText(String licenseFile)
Description copied from interface:LicenseServiceGet the License- Specified by:
getLicenseTextin interfaceLicenseService- Parameters:
licenseFile- file name- Returns:
- license text
-
getDefaultSubmissionLicense
public String getDefaultSubmissionLicense()
Get the site-wide default license that submitters need to grant Localized license requires: default_{{locale}}.license file. Locale also must be listed in webui.supported.locales setting.- Specified by:
getDefaultSubmissionLicensein interfaceLicenseService- Returns:
- the default license
-
init
protected void init()
Load in the default license.
-
-