Package alpine.model

Class ApiKey

java.lang.Object
alpine.model.ApiKey
All Implemented Interfaces:
Serializable, Principal

public class ApiKey extends Object implements Serializable, Principal
Persistable object representing an ApiKey.
Since:
1.0.0
Author:
Steve Springett
See Also:
  • Constructor Details

    • ApiKey

      public ApiKey()
  • Method Details

    • getId

      public long getId()
    • setId

      public void setId(long id)
    • getKey

      public String getKey()
    • setKey

      public void setKey(String key)
    • getMaskedKey

      public String getMaskedKey()
      Masks all key characters except the prefix and last four characters with *. If the key does not have the currently configured prefix, do not return it.
      Returns:
      Masked key.
    • getName

      @Deprecated public String getName()
      Do not use - only here to satisfy Principal implementation requirement.
      Specified by:
      getName in interface Principal
      Returns:
      a String presentation of the username
    • getComment

      public String getComment()
    • setComment

      public void setComment(String comment)
    • getCreated

      public Date getCreated()
    • setCreated

      public void setCreated(Date created)
    • getLastUsed

      public Date getLastUsed()
    • setLastUsed

      public void setLastUsed(Date lastUsed)
    • getTeams

      public List<Team> getTeams()
    • setTeams

      public void setTeams(List<Team> teams)