Class ApiKey

java.lang.Object
eu.europeana.apikey.domain.ApiKey

@Entity public class ApiKey extends Object
API key as it is used internally and stored in the database Created by luthien on 18/04/2017.
  • Field Details

    • email

      @NotNull @Size(max=100) protected @NotNull @Size(max=100) String email
      Email address
  • Constructor Details

    • ApiKey

      public ApiKey()
      constructor
    • ApiKey

      public ApiKey(String apiKey, String firstName, String lastName, String email, String appName, String company)
      Constructor with all required fields. Note that there can be old API keys stored in the database that do not have an appName or company
      Parameters:
      apiKey - Apikey string
      firstName - User's first name
      lastName - User's second name
      email - User's email address
      appName - Name of application the key is intended for
      company - Name of institute or company
    • ApiKey

      public ApiKey(ApiKey copy)
      Constructor with all fields
      Parameters:
      copy - Apikey to copy fields from
  • Method Details

    • getApiKey

      public String getApiKey()
      Returns:
      the apikey string
    • setApiKey

      public void setApiKey(String apiKey)
      Parameters:
      apiKey - sets the apikey string
    • getKeycloakId

      public String getKeycloakId()
      For combined api keys / keycloak clients only
      Returns:
      the UUID linking to the associated Keycloak Client (when created)
    • setKeycloakId

      public void setKeycloakId(String keycloakId)
      For combined api keys / keycloak clients only
      Parameters:
      keycloakId - sets UUID linking to the associated Keycloak Client (when created)
    • getRegistrationDate

      public Date getRegistrationDate()
      Returns:
      timestamp of registration this key
    • setRegistrationDate

      public void setRegistrationDate(Date registrationDate)
      Parameters:
      registrationDate - sets registration timestamp
    • getWebsite

      public String getWebsite()
      Returns:
      string containing name or URL to website associated with this API Key
    • setWebsite

      public void setWebsite(String website)
      Parameters:
      website - sets name or URL to website associated with this API Key.
    • getActivationDate

      public Date getActivationDate()
      Returns:
      timestamp op activating this API key
    • setActivationDate

      public void setActivationDate(Date activationDate)
      Parameters:
      activationDate - sets activation timestamp for this API key
    • getAppName

      public String getAppName()
      Returns:
      returns string containing app name
    • setAppName

      public void setAppName(String appName)
      Parameters:
      appName - sets the associated application name
    • getCompany

      public String getCompany()
      Returns:
      string containing institute or company name
    • setCompany

      public void setCompany(String company)
      Parameters:
      company - sets institute or company name
    • getSector

      public String getSector()
      Returns:
      string containing the name of the sector of the institute or company
    • setSector

      public void setSector(String sector)
      Parameters:
      sector - returns the name of the sector of the institute or company
    • getEmail

      public String getEmail()
      Returns:
      the email address associated wih this key
    • setEmail

      public void setEmail(String email)
      Parameters:
      email - sets the associated email address
    • getFirstName

      public String getFirstName()
      Returns:
      the user's first name
    • setFirstName

      public void setFirstName(String firstName)
      Parameters:
      firstName - sets the user's first name
    • getLastName

      public String getLastName()
      Returns:
      last name of the user
    • setLastName

      public void setLastName(String lastName)
      Parameters:
      lastName - sets the user's last name
    • getDeprecationDate

      public Date getDeprecationDate()
      Returns:
      returns disabled timestamp of this key
    • setDeprecationDate

      public void setDeprecationDate(Date deprecationDate)
      Parameters:
      deprecationDate - sets disabled timestamp of this key
    • getLastAccessDate

      public Date getLastAccessDate()
      Returns:
      last validation timestamp
    • setLastAccessDate

      public void setLastAccessDate(Date lastAccessDate)
      Parameters:
      lastAccessDate - sets latest validation timestamp
    • getComments

      public String getComments()
      Returns:
      comment string
    • setComments

      public void setComments(String comments)
      Parameters:
      comments - sets comment string
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      to-string version of object