Class Profile

java.lang.Object
com.yoti.api.client.Profile
Direct Known Subclasses:
ApplicationProfile, HumanProfile

public abstract class Profile extends Object
Yoti profile for a connect token and application. You can get a hold of one of these by using a YotiClient.
  • Method Details

    • getAttribute

      public <T> Attribute<T> getAttribute(String name, Class<T> clazz)
      Return typed Attribute object for a key.
      Type Parameters:
      T - the type parameter indicating the type of the returned value
      Parameters:
      name - attribute name
      clazz - attribute type
      Returns:
      typed attribute, null if it is not present in the profile
    • getAttribute

      public Attribute<?> getAttribute(String name)
      Returns the Attribute object for the key
      Parameters:
      name - the name of the attribute
      Returns:
      the attribute object, null if it is not present in the profile
    • findAttributesStartingWith

      public <T> List<Attribute<T>> findAttributesStartingWith(String name, Class<T> clazz)
      Return a list of all the Attributes with a name starting with name
      Type Parameters:
      T - the type parameter indicating the type of the returned value
      Parameters:
      name - attribute name
      clazz - attribute type
      Returns:
      typed attribute value, null if there was no match
    • findAttributeStartingWith

      public <T> Attribute<T> findAttributeStartingWith(String name, Class<T> clazz)
      Return the first Attribute with a name starting with name
      Type Parameters:
      T - the type parameter indicating the type of the returned value
      Parameters:
      name - attribute name
      clazz - attribute type
      Returns:
      typed attribute value, null if there was no match
    • getAttributes

      public Collection<Attribute<?>> getAttributes()
      Return all Attributes for the profile.
      Returns:
      an unsorted collection of Attributes
    • getAttributeById

      public Attribute<Object> getAttributeById(String id)
      Return typed Attribute by ID.
      Parameters:
      id - the ID to match
      Returns:
      attribute value, null if there was no match