Class CadfCredential.Builder
- java.lang.Object
-
- org.linuxforhealth.fhir.audit.cadf.CadfCredential.Builder
-
- Enclosing class:
- CadfCredential
public static class CadfCredential.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder(java.lang.String token)
Constructs a Builder instance based on the Credential token
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CadfCredential.Builder
assertion(CadfMapItem assertion)
Add an assertion to the assertion list, one at a time.CadfCredential.Builder
assertions(java.util.ArrayList<CadfMapItem> assertions)
Set the optional assertions property.CadfCredential.Builder
assertions(CadfMapItem[] assertions)
Set the optional assertions property.CadfCredential.Builder
authority(java.lang.String authority)
Set the optional authority property.CadfCredential
build()
Builds the CadfCredential objectCadfCredential.Builder
token(java.lang.String token)
CadfCredential.Builder
type(java.lang.String type)
Set the optional credential type property.
-
-
-
Constructor Detail
-
Builder
public Builder(java.lang.String token)
Constructs a Builder instance based on the Credential token- Parameters:
token
- -- String. The primary opaque or non-opaque identity or security token (e.g., an opaque or obfuscated user ID, opaque security token string, or security certificate).
-
-
Method Detail
-
type
public CadfCredential.Builder type(java.lang.String type)
Set the optional credential type property.- Parameters:
type
- -- String. Type of credential. (e.g., auth. token, identity token, etc.)- Returns:
- Builder instance
-
authority
public CadfCredential.Builder authority(java.lang.String authority)
Set the optional authority property.- Parameters:
authority
- - String. The trusted authority (a service) that understands and can verify the credential.- Returns:
- Builder instance
-
assertions
public CadfCredential.Builder assertions(CadfMapItem[] assertions)
Set the optional assertions property. This property contains a list of additional opaque or non-opaque assertions or attributes that belong to the credential. One example might be the certificate trust chain if the credential is a certificate.- Parameters:
assertions
- -- Array of CadfMapItem. Optional list of additional opaque or non-opaque assertions or attributes that belong to the credential.- Returns:
- Builder instance
-
assertions
public CadfCredential.Builder assertions(java.util.ArrayList<CadfMapItem> assertions)
Set the optional assertions property. This property contains a list of additional opaque or non-opaque assertions or attributes that belong to the credential. One example might be the certificate trust chain if the credential is a certificate.- Parameters:
assertions
- -- Array of CadfMapItem. Optional list of additional opaque or non-opaque assertions or attributes that belong to the credential.- Returns:
- Builder instance
-
assertion
public CadfCredential.Builder assertion(CadfMapItem assertion)
Add an assertion to the assertion list, one at a time.- Parameters:
assertion
- -- A single CadfMapItem.- Returns:
- Builder instance
- See Also:
assertion(CadfMapItem)
-
token
public CadfCredential.Builder token(java.lang.String token)
-
build
public CadfCredential build() throws java.lang.IllegalStateException
Builds the CadfCredential object- Returns:
CadfCredential
- Throws:
java.lang.IllegalStateException
- when the event does not meet the specification.
-
-