use of org.apache.nifi.web.api.dto.action.ActionDTO in project nifi by apache.
the class DtoFactory method createActionDto.
/**
* Creates an ActionDTO for the specified Action.
*
* @param action action
* @return dto
*/
public ActionDTO createActionDto(final Action action) {
final ActionDTO actionDto = new ActionDTO();
actionDto.setId(action.getId());
actionDto.setSourceId(action.getSourceId());
actionDto.setSourceName(action.getSourceName());
actionDto.setSourceType(action.getSourceType().toString());
actionDto.setTimestamp(action.getTimestamp());
actionDto.setUserIdentity(action.getUserIdentity());
actionDto.setOperation(action.getOperation().toString());
actionDto.setActionDetails(createActionDetailsDto(action.getActionDetails()));
actionDto.setComponentDetails(createComponentDetailsDto(action.getComponentDetails()));
return actionDto;
}
Aggregations