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
  • Field Details

    • license

      protected String license
      The default license
  • Constructor Details

    • LicenseServiceImpl

      protected LicenseServiceImpl()
  • Method Details

    • writeLicenseFile

      public void writeLicenseFile(String licenseFile, String newLicense)
      Description copied from interface: LicenseService
      Writes license to a text file.
      Specified by:
      writeLicenseFile in interface LicenseService
      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: LicenseService
      Get the License
      Specified by:
      getLicenseText in interface LicenseService
      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:
      getDefaultSubmissionLicense in interface LicenseService
      Returns:
      the default license
    • init

      protected void init()
      Load in the default license.