api/src/main/java/com/epam/pipeline/mapper/PipelineRunMapper.java
public static Map<String, Object> map(PipelineRun run, Long threshold, Long duration) {
        JsonMapper mapper = new JsonMapper();
        Map<String, Object> params = mapper.convertValue(run, mapper.getTypeFactory()
            .constructParametricType(Map.class, String.class, Object.class));

        if (StringUtils.isBlank(run.getPipelineName())) {
            params.put("pipelineName", PipelineRun.DEFAULT_PIPELINE_NAME);
        }

        if (threshold != null) {
            params.put("timeThreshold", threshold / SECONDS_IN_MINUTE);
        }

        params.put("runningTime", duration / SECONDS_IN_MINUTE);

        return params;
    }
/**
     * Mapping a {@code PipelineRun}
     * @param run {@code PipelineRun}
     * @param duration Pipeline run running duration in seconds.
     * @param threshold Long running threshold in seconds.
     * @return a mapped {@code PipelineRun}, {@code Map} key - a field name of {@code PipelineRun},
     * {@code Map} value - a {@code PipelineRun} field value
     */
Mapping a  PipelineRun
@param run  PipelineRun
@param duration Pipeline run running duration in seconds.
@param threshold Long running threshold in seconds.
@return a mapped  PipelineRun,  Map key - a field name of  PipelineRun,
Map value - a  PipelineRun field value
Mapping a PipelineRun @param run PipelineRun @param duration Pipeline run running duration in seconds . @param threshold Long running threshold in seconds . @return a mapped PipelineRun Map key - a field name of PipelineRun Map value - a PipelineRun field value
public static Map<String, Object> map(PipelineRun run, Long threshold, Long duration) {
        JsonMapper mapper = new JsonMapper();
        Map<String, Object> params = mapper.convertValue(run, mapper.getTypeFactory()
            .constructParametricType(Map.class, String.class, Object.class));
        if (StringUtils.isBlank(run.getPipelineName())) {
            params.put("pipelineName", PipelineRun.DEFAULT_PIPELINE_NAME);
        }
        if (threshold != null) {
            params.put("timeThreshold", threshold / SECONDS_IN_MINUTE);
        }
        params.put("runningTime", duration / SECONDS_IN_MINUTE);
        return params;
    }
public static Map < String , Object > map ( PipelineRun run , Long threshold , Long duration ) { JsonMapper mapper = new JsonMapper ( ) ; Map < String , Object > params = mapper . convertValue ( run , mapper . getTypeFactory ( ) . constructParametricType ( Map . class , String . class , Object . class ) ) ; if ( StringUtils . isBlank ( run . getPipelineName ( ) ) ) { params . put ( "pipelineName" , PipelineRun . DEFAULT_PIPELINE_NAME ) ; } if ( threshold != null ) { params . put ( "timeThreshold" , threshold / SECONDS_IN_MINUTE ) ; } params . put ( "runningTime" , duration / SECONDS_IN_MINUTE ) ; return params ; }
Mapping a {@code PipelineRun}
 @param run {@code PipelineRun}
 @param duration Pipeline run running duration in seconds.
Mapping a { @code PipelineRun } @param run { @code PipelineRun } @param duration Pipeline run running duration in seconds .