Search in sources :

Example 1 with FlowMode

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;
}
Also used : UpdateOrganizationEntity(io.gravitee.rest.api.model.UpdateOrganizationEntity) OrganizationEntity(io.gravitee.rest.api.model.OrganizationEntity) FlowMode(io.gravitee.definition.model.FlowMode) Flow(io.gravitee.definition.model.flow.Flow)

Aggregations

FlowMode (io.gravitee.definition.model.FlowMode)1 Flow (io.gravitee.definition.model.flow.Flow)1 OrganizationEntity (io.gravitee.rest.api.model.OrganizationEntity)1 UpdateOrganizationEntity (io.gravitee.rest.api.model.UpdateOrganizationEntity)1