Class AuthTransactionBuilder
- java.lang.Object
-
- io.mosip.authentication.common.service.builder.AuthTransactionBuilder
-
public class AuthTransactionBuilder extends Object
The builder to buildAutnTxninstance.- Author:
- Loganathan Sekar
-
-
Field Summary
Fields Modifier and Type Field Description static StringREQ_TYPE_DELIMThe Constant REQ_TYPE_DELIM.static StringREQ_TYPE_MSG_DELIMThe Constant REQ_TYPE_MSG_DELIM.
-
Method Summary
-
-
-
Field Detail
-
REQ_TYPE_MSG_DELIM
public static final String REQ_TYPE_MSG_DELIM
The Constant REQ_TYPE_MSG_DELIM.- See Also:
- Constant Field Values
-
REQ_TYPE_DELIM
public static final String REQ_TYPE_DELIM
The Constant REQ_TYPE_DELIM.- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
public static AuthTransactionBuilder newInstance()
Get new instance ofAuthTransactionBuilder.- Returns:
- new instance of AuthTransactionBuilder
-
withRequest
public AuthTransactionBuilder withRequest(BaseRequestDTO requestDTO)
Set the AuthRequestDTO.- Parameters:
requestDTO- the auth request DTO- Returns:
AuthTransactionBuilderinstance
-
withToken
public AuthTransactionBuilder withToken(String token)
Set the UIN.- Parameters:
token- the token- Returns:
AuthTransactionBuilderinstance
-
getToken
public String getToken()
Gets the token.- Returns:
- the token
-
addRequestType
public AuthTransactionBuilder addRequestType(RequestType requestType)
Set the RequestType.- Parameters:
requestType- the request type- Returns:
AuthTransactionBuilderinstance
-
withAuthTypeCode
public void withAuthTypeCode(String authTypeCode)
With auth type code.- Parameters:
authTypeCode- the auth type code
-
withAuthToken
public AuthTransactionBuilder withAuthToken(String authTokenId)
Set the auth token.- Parameters:
authTokenId- the auth token id- Returns:
AuthTransactionBuilderinstance
-
withStatus
public AuthTransactionBuilder withStatus(boolean isStatus)
With status.- Parameters:
isStatus- the is status- Returns:
- the auth transaction builder
-
withStatusComment
public AuthTransactionBuilder withStatusComment(String statusComment)
With status comment.- Parameters:
statusComment- the status comment- Returns:
- the auth transaction builder
-
withPartner
public AuthTransactionBuilder withPartner(Optional<PartnerDTO> partnerOptional)
With partner.- Parameters:
partnerOptional- the partner optional- Returns:
- the auth transaction builder
-
withInternal
public AuthTransactionBuilder withInternal(boolean isInternal)
With internal.- Parameters:
isInternal- the is internal- Returns:
- the auth transaction builder
-
getRequestDTO
public BaseRequestDTO getRequestDTO()
-
getRequestTypes
public Set<RequestType> getRequestTypes()
Gets the request types.- Returns:
- the request types
-
build
public AutnTxn build(EnvUtil env, IdaUinHashSaltRepo uinHashSaltRepo, IdAuthSecurityManager securityManager) throws IdAuthenticationBusinessException
BuildAutnTxn.- Parameters:
env- the envuinEncryptSaltRepo- the uin encrypt salt repouinHashSaltRepo- the uin hash salt reposecurityManager- the security manager- Returns:
- the instance of
AutnTxn - Throws:
IdAuthenticationBusinessException- the id authentication business exception
-
-