Search in sources :

Example 1 with TemplateCreationHelper

use of com.thinkbiganalytics.nifi.feedmgr.TemplateCreationHelper in project kylo by Teradata.

the class LegacyNifiRestClient method getPropertiesForTemplate.

/**
 * @param parentProcessGroup         the parent group for which this template will reside
 * @param dto                        the template to parse
 * @param includePropertyDescriptors true to include propertyDescriptor details on each property, false to just include the property key
 * @return all the properties included in this template
 */
public List<NifiProperty> getPropertiesForTemplate(ProcessGroupDTO parentProcessGroup, TemplateDTO dto, boolean includePropertyDescriptors) {
    if (includePropertyDescriptors) {
        TemplateCreationHelper helper = new TemplateCreationHelper(this, niFiObjectCache);
        ProcessGroupDTO groupDTO = helper.createTemporaryTemplateFlow(dto.getId());
        dto.setSnippet(groupDTO.getContents());
    }
    return NifiPropertyUtil.getPropertiesForTemplate(parentProcessGroup, dto, propertyDescriptorTransform);
}
Also used : ProcessGroupDTO(org.apache.nifi.web.api.dto.ProcessGroupDTO) RemoteProcessGroupDTO(org.apache.nifi.web.api.dto.RemoteProcessGroupDTO) TemplateCreationHelper(com.thinkbiganalytics.nifi.feedmgr.TemplateCreationHelper)

Aggregations

TemplateCreationHelper (com.thinkbiganalytics.nifi.feedmgr.TemplateCreationHelper)1 ProcessGroupDTO (org.apache.nifi.web.api.dto.ProcessGroupDTO)1 RemoteProcessGroupDTO (org.apache.nifi.web.api.dto.RemoteProcessGroupDTO)1