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 Object
 
- 
- 
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(ArrayList<CadfMapItem> assertions)Set the optional assertions property.CadfCredential.Builderauthority(String authority)Set the optional authority property.CadfCredentialbuild()Builds the CadfCredential objectCadfCredential.Buildertoken(String token)CadfCredential.Buildertype(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.
 
 - 
 
 -