Package eu.europeana.apikey.domain
Class ApiKey
java.lang.Object
eu.europeana.apikey.domain.ApiKey
API key as it is used internally and stored in the database
Created by luthien on 18/04/2017.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEmail()For combined api keys / keycloak clients onlyvoidsetActivationDate(Date activationDate) voidvoidsetAppName(String appName) voidsetComments(String comments) voidsetCompany(String company) voidsetDeprecationDate(Date deprecationDate) voidvoidsetFirstName(String firstName) voidsetKeycloakId(String keycloakId) For combined api keys / keycloak clients onlyvoidsetLastAccessDate(Date lastAccessDate) voidsetLastName(String lastName) voidsetRegistrationDate(Date registrationDate) voidvoidsetWebsite(String website) toString()
-
Field Details
-
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 stringfirstName- User's first namelastName- User's second nameemail- User's email addressappName- Name of application the key is intended forcompany- Name of institute or company
-
ApiKey
Constructor with all fields- Parameters:
copy- Apikey to copy fields from
-
-
Method Details
-
getApiKey
- Returns:
- the apikey string
-
setApiKey
- Parameters:
apiKey- sets the apikey string
-
getKeycloakId
For combined api keys / keycloak clients only- Returns:
- the UUID linking to the associated Keycloak Client (when created)
-
setKeycloakId
For combined api keys / keycloak clients only- Parameters:
keycloakId- sets UUID linking to the associated Keycloak Client (when created)
-
getRegistrationDate
- Returns:
- timestamp of registration this key
-
setRegistrationDate
- Parameters:
registrationDate- sets registration timestamp
-
getWebsite
- Returns:
- string containing name or URL to website associated with this API Key
-
setWebsite
- Parameters:
website- sets name or URL to website associated with this API Key.
-
getActivationDate
- Returns:
- timestamp op activating this API key
-
setActivationDate
- Parameters:
activationDate- sets activation timestamp for this API key
-
getAppName
- Returns:
- returns string containing app name
-
setAppName
- Parameters:
appName- sets the associated application name
-
getCompany
- Returns:
- string containing institute or company name
-
setCompany
- Parameters:
company- sets institute or company name
-
getSector
- Returns:
- string containing the name of the sector of the institute or company
-
setSector
- Parameters:
sector- returns the name of the sector of the institute or company
-
getEmail
- Returns:
- the email address associated wih this key
-
setEmail
- Parameters:
email- sets the associated email address
-
getFirstName
- Returns:
- the user's first name
-
setFirstName
- Parameters:
firstName- sets the user's first name
-
getLastName
- Returns:
- last name of the user
-
setLastName
- Parameters:
lastName- sets the user's last name
-
getDeprecationDate
- Returns:
- returns disabled timestamp of this key
-
setDeprecationDate
- Parameters:
deprecationDate- sets disabled timestamp of this key
-
getLastAccessDate
- Returns:
- last validation timestamp
-
setLastAccessDate
- Parameters:
lastAccessDate- sets latest validation timestamp
-
getComments
- Returns:
- comment string
-
setComments
- Parameters:
comments- sets comment string
-
toString
-