Interface AttributeSource


  • public interface AttributeSource
    An AttributeSource provides access to attributes through an attribute path. For example, an AttributeSource backed by an XML document may use XPaths whereas an AttributeSource backed by a JSON document may use Json Paths.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> java.util.Optional<T> get​(java.lang.String attributePath, java.lang.Class<T> clazz)
      Fetch the attribute value with the given attribute path and type
      java.util.Optional<java.lang.String> getSignedAttributesDocument()  
    • Method Detail

      • get

        @Nonnull
        <T> java.util.Optional<T> get​(@Nonnull
                                      java.lang.String attributePath,
                                      @Nonnull
                                      java.lang.Class<T> clazz)
                               throws AttributeSourceException
        Fetch the attribute value with the given attribute path and type
        Type Parameters:
        T - the type of the attribute value
        Parameters:
        attributePath - the path to the attribute
        clazz - the Class containing the type of the attribute value
        Returns:
        an Optional containing the attribute value or an empty Optional if no attribute exists with the given path
        Throws:
        AttributeSourceException - if there is an unexpected problem fetching an attribute value with the given type at the given attribute path
      • getSignedAttributesDocument

        @Nonnull
        java.util.Optional<java.lang.String> getSignedAttributesDocument()
        Returns:
        an Optional containing the underlying attribute source document which was signed by the attribute authority or an empty Optional if it is not available