Search in sources :

Example 1 with AbstractAwaitingCycle3DataStateController

use of uk.gov.ida.hub.policy.domain.controller.AbstractAwaitingCycle3DataStateController in project verify-hub by alphagov.

the class Cycle3Service method sendCycle3MatchingRequest.

public void sendCycle3MatchingRequest(SessionId sessionId, Cycle3UserInput cycle3UserInput) {
    AbstractAwaitingCycle3DataStateController controller = (AbstractAwaitingCycle3DataStateController) sessionRepository.getStateController(sessionId, AbstractAwaitingCycle3DataState.class);
    String attributeName = controller.getCycle3AttributeRequestData().getAttributeName();
    Cycle3Dataset cycle3Dataset = Cycle3Dataset.createFromData(attributeName, cycle3UserInput.getCycle3Input());
    AbstractAttributeQueryRequestDto attributeQuery = controller.createAttributeQuery(cycle3Dataset);
    attributeQueryService.sendAttributeQueryRequest(sessionId, attributeQuery);
    controller.handleCycle3DataSubmitted(cycle3UserInput.getPrincipalIpAddress());
}
Also used : AbstractAwaitingCycle3DataState(uk.gov.ida.hub.policy.domain.state.AbstractAwaitingCycle3DataState) Cycle3Dataset(uk.gov.ida.hub.policy.domain.Cycle3Dataset) AbstractAwaitingCycle3DataStateController(uk.gov.ida.hub.policy.domain.controller.AbstractAwaitingCycle3DataStateController) AbstractAttributeQueryRequestDto(uk.gov.ida.hub.policy.contracts.AbstractAttributeQueryRequestDto)

Example 2 with AbstractAwaitingCycle3DataStateController

use of uk.gov.ida.hub.policy.domain.controller.AbstractAwaitingCycle3DataStateController in project verify-hub by alphagov.

the class Cycle3Service method cancelCycle3DataInput.

public void cancelCycle3DataInput(SessionId sessionId) {
    AbstractAwaitingCycle3DataStateController controller = (AbstractAwaitingCycle3DataStateController) sessionRepository.getStateController(sessionId, AbstractAwaitingCycle3DataState.class);
    controller.handleCancellation();
}
Also used : AbstractAwaitingCycle3DataState(uk.gov.ida.hub.policy.domain.state.AbstractAwaitingCycle3DataState) AbstractAwaitingCycle3DataStateController(uk.gov.ida.hub.policy.domain.controller.AbstractAwaitingCycle3DataStateController)

Aggregations

AbstractAwaitingCycle3DataStateController (uk.gov.ida.hub.policy.domain.controller.AbstractAwaitingCycle3DataStateController)2 AbstractAwaitingCycle3DataState (uk.gov.ida.hub.policy.domain.state.AbstractAwaitingCycle3DataState)2 AbstractAttributeQueryRequestDto (uk.gov.ida.hub.policy.contracts.AbstractAttributeQueryRequestDto)1 Cycle3Dataset (uk.gov.ida.hub.policy.domain.Cycle3Dataset)1