Search in sources :

Example 1 with VersionedFlowStatus

use of org.apache.nifi.registry.flow.VersionedFlowStatus in project nifi by apache.

the class DtoFactory method createVersionControlInformationDto.

public VersionControlInformationDTO createVersionControlInformationDto(final ProcessGroup group) {
    if (group == null) {
        return null;
    }
    final VersionControlInformation versionControlInfo = group.getVersionControlInformation();
    if (versionControlInfo == null) {
        return null;
    }
    final VersionControlInformationDTO dto = new VersionControlInformationDTO();
    dto.setGroupId(group.getIdentifier());
    dto.setRegistryId(versionControlInfo.getRegistryIdentifier());
    dto.setRegistryName(versionControlInfo.getRegistryName());
    dto.setBucketId(versionControlInfo.getBucketIdentifier());
    dto.setBucketName(versionControlInfo.getBucketName());
    dto.setFlowId(versionControlInfo.getFlowIdentifier());
    dto.setFlowName(versionControlInfo.getFlowName());
    dto.setFlowDescription(versionControlInfo.getFlowDescription());
    dto.setVersion(versionControlInfo.getVersion());
    final VersionedFlowStatus status = versionControlInfo.getStatus();
    final VersionedFlowState state = status.getState();
    dto.setState(state == null ? null : state.name());
    dto.setStateExplanation(status.getStateExplanation());
    return dto;
}
Also used : VersionedFlowStatus(org.apache.nifi.registry.flow.VersionedFlowStatus) VersionControlInformation(org.apache.nifi.registry.flow.VersionControlInformation) VersionedFlowState(org.apache.nifi.registry.flow.VersionedFlowState)

Aggregations

VersionControlInformation (org.apache.nifi.registry.flow.VersionControlInformation)1 VersionedFlowState (org.apache.nifi.registry.flow.VersionedFlowState)1 VersionedFlowStatus (org.apache.nifi.registry.flow.VersionedFlowStatus)1