use of io.gravitee.definition.model.FlowMode in project gravitee-management-rest-api by gravitee-io.
the class OrganizationServiceImpl method convert.
private OrganizationEntity convert(final Organization organization) {
final OrganizationEntity organizationEntity = new OrganizationEntity();
organizationEntity.setId(organization.getId());
organizationEntity.setCockpitId(organization.getCockpitId());
organizationEntity.setHrids(organization.getHrids());
organizationEntity.setName(organization.getName());
organizationEntity.setDescription(organization.getDescription());
organizationEntity.setDomainRestrictions(organization.getDomainRestrictions());
FlowMode flowMode = organization.getFlowMode() != null ? FlowMode.valueOf(organization.getFlowMode()) : FlowMode.DEFAULT;
organizationEntity.setFlowMode(flowMode);
List<Flow> flows = flowService.findByReference(FlowReferenceType.ORGANIZATION, organization.getId());
organizationEntity.setFlows(flows);
return organizationEntity;
}
Aggregations