Package com.ibm.fhir.audit.cadf.model
Class CadfCredential.Builder
- java.lang.Object
-
- com.ibm.fhir.audit.cadf.model.CadfCredential.Builder
-
- Enclosing class:
- CadfCredential
public static class CadfCredential.Builder extends Object
-
-
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(CadfMapItem[] assertions)
Set the optional assertions property.CadfCredential.Builder
assertions(ArrayList<CadfMapItem> assertions)
Set the optional assertions property.CadfCredential.Builder
authority(String authority)
Set the optional authority property.CadfCredential
build()
Builds the CadfCredential objectCadfCredential.Builder
token(String token)
CadfCredential.Builder
type(String type)
Set the optional credential type property.
-
-
-
Constructor Detail
-
Builder
public Builder(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(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(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(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(String token)
-
build
public CadfCredential build() throws IllegalStateException
Builds the CadfCredential object- Returns:
CadfCredential
- Throws:
IllegalStateException
- when the event does not meet the specification.
-
-