Package com.ibm.fhir.audit.cadf
Class CadfCredential.Builder
- java.lang.Object
-
- com.ibm.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.Builderassertion(CadfMapItem assertion)Add an assertion to the assertion list, one at a time.CadfCredential.Builderassertions(CadfMapItem[] assertions)Set the optional assertions property.CadfCredential.Builderassertions(java.util.ArrayList<CadfMapItem> assertions)Set the optional assertions property.CadfCredential.Builderauthority(java.lang.String authority)Set the optional authority property.CadfCredentialbuild()Builds the CadfCredential objectCadfCredential.Buildertoken(java.lang.String token)CadfCredential.Buildertype(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.
-
-