Search in sources :

Example 1 with FlowBreadcrumbDTO

use of org.apache.nifi.web.api.dto.flow.FlowBreadcrumbDTO in project nifi by apache.

the class DtoFactory method createBreadcrumbDto.

/**
 * Creates a FlowBreadcrumbDTO from the specified parent ProcessGroup.
 *
 * @param group group
 * @return dto
 */
private FlowBreadcrumbDTO createBreadcrumbDto(final ProcessGroup group) {
    if (group == null) {
        return null;
    }
    final FlowBreadcrumbDTO dto = new FlowBreadcrumbDTO();
    dto.setId(group.getIdentifier());
    dto.setName(group.getName());
    final VersionControlInformationDTO versionControlInformation = createVersionControlInformationDto(group);
    dto.setVersionControlInformation(versionControlInformation);
    return dto;
}
Also used : FlowBreadcrumbDTO(org.apache.nifi.web.api.dto.flow.FlowBreadcrumbDTO)

Example 2 with FlowBreadcrumbDTO

use of org.apache.nifi.web.api.dto.flow.FlowBreadcrumbDTO in project nifi by apache.

the class DtoFactory method createBreadcrumbEntity.

/**
 * Creates a FlowBreadcrumbEntity from the specified parent ProcessGroup.
 *
 * @param group group
 * @return dto
 */
private FlowBreadcrumbEntity createBreadcrumbEntity(final ProcessGroup group) {
    if (group == null) {
        return null;
    }
    final FlowBreadcrumbDTO dto = createBreadcrumbDto(group);
    final PermissionsDTO permissions = createPermissionsDto(group);
    final FlowBreadcrumbEntity entity = entityFactory.createFlowBreadcrumbEntity(dto, permissions);
    if (group.getParent() != null) {
        entity.setParentBreadcrumb(createBreadcrumbEntity(group.getParent()));
    }
    return entity;
}
Also used : FlowBreadcrumbEntity(org.apache.nifi.web.api.entity.FlowBreadcrumbEntity) FlowBreadcrumbDTO(org.apache.nifi.web.api.dto.flow.FlowBreadcrumbDTO)

Aggregations

FlowBreadcrumbDTO (org.apache.nifi.web.api.dto.flow.FlowBreadcrumbDTO)2 FlowBreadcrumbEntity (org.apache.nifi.web.api.entity.FlowBreadcrumbEntity)1