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;
}
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;
}
Aggregations