@JsonIgnore @JsonProperty(access = JsonProperty.Access.READ_ONLY) default Optional<DataShape> getOutputDataShape() { ActionDescriptor descriptor = getDescriptor(); return descriptor != null ? descriptor.getOutputDataShape() : Optional.empty(); }
protected String decodeHttpReturnCode(List<Step> steps, String code) { if (code == null || steps.isEmpty()) { return code; } Step lastStep = steps.get(steps.size() - 1); Optional<Action> lastAction = lastStep.getAction(); if (!lastAction.isPresent()) { return code; } Optional<String> httpCodeDescription = lastAction .flatMap(a -> ofNullable(a.getProperties().get("httpResponseCode"))) .flatMap(prop -> prop.getEnum().stream() .filter(e -> code.equals(e.getValue())) .map(ConfigurationProperty.PropertyValue::getLabel) .findFirst() ); return httpCodeDescription.orElse(code); }
Action.Pattern patternValue = instance.getPattern(); if (patternValue != null) { pattern(patternValue); actionType(instance.getActionType()); bits |= 0x1L; String descriptionValue = instance.getDescription(); if (descriptionValue != null) { description(descriptionValue);
private Optional<String> serverBasePath(Integration integration) { return allSteps(integration) .findFirst() .flatMap(Step::getAction) .flatMap(action -> action.getMetadata("serverBasePath")); }
static boolean needsExposure(final IntegrationDeployment integrationDeployment) { return integrationDeployment.getSpec() .getFlows().stream().flatMap(f -> f.getSteps().stream()) .flatMap(step -> Optionals.asStream(step.getAction())) .flatMap(action -> action.getTags().stream()) .anyMatch("expose"::equals); } }
@Override public boolean canHandle(Step step) { if (StepKind.template != step.getStepKind()) { return false; } Action action = step.getAction().orElse(null); if (action == null) { return false; } DataShape inputDataShape = action.getInputDataShape().orElse(null); if (inputDataShape == null) { return false; } return DataShapeKinds.JSON_SCHEMA == inputDataShape.getKind(); }
EquivContext context = identifier(parentContext, another.getName(), another.getClass()); context.setFail(ONE_NULL, NULL, NOT_NULL); return false; EquivContext context = identifier(parentContext, one.getName(), one.getClass()); context.setFail(ANOTHER_NULL, NOT_NULL, NULL); return false; EquivContext context = identifier(parentContext, one.getName(), one.getClass()); context.setFail("action-classes", one.getClass(), another.getClass()); return false;
Action.Pattern patternValue = instance.getPattern(); if (patternValue != null) { pattern(patternValue); actionType(instance.getActionType()); bits |= 0x1L; String descriptionValue = instance.getDescription(); if (descriptionValue != null) { description(descriptionValue);
@JsonIgnore @JsonProperty(access = JsonProperty.Access.READ_ONLY) @Override default Map<String, ConfigurationProperty> getProperties() { ActionDescriptor descriptor = getDescriptor(); return descriptor != null ? descriptor.getPropertyDefinitionSteps().stream() .flatMap(step -> step.getProperties().entrySet().stream()) .collect(Collectors.toMap(Entry::getKey, Entry::getValue)) : Collections.emptyMap(); } }
); } else { messages.addAll(computePropertiesDiffMessages(supplier, action.getProperties(), newAction.getProperties())); messages.addAll(computeMissingMandatoryPropertiesMessages(supplier, newAction.getProperties(), step.getConfiguredProperties())); messages.addAll(computeSecretsUpdateMessages(supplier, newAction.getProperties(), step.getConfiguredProperties())); messages.addAll(computePropertiesDiffMessages(supplier, action.getProperties(), newAction.getProperties())); messages.addAll(computeMissingMandatoryPropertiesMessages(supplier, newAction.getProperties(), configuredProperties)); messages.addAll(computeSecretsUpdateMessages(supplier, newAction.getProperties(), configuredProperties));
Action anotherAction = another.findActionById(myAction.getId().get()).orElse(null); if (! equivalent(context, myAction, anotherAction)) { return false;
@JsonIgnore @JsonProperty(access = JsonProperty.Access.READ_ONLY) default Optional<DataShape> getInputDataShape() { ActionDescriptor descriptor = getDescriptor(); return descriptor != null ? descriptor.getInputDataShape() : Optional.empty(); }
.addTag("locked-action") .descriptor(new ConnectorDescriptor.Builder() .createFrom(startAction.getDescriptor()) .outputDataShape(startDataShape) .build()) .addTag("locked-action") .descriptor(new ConnectorDescriptor.Builder() .createFrom(endAction.getDescriptor()) .inputDataShape(endDataShape) .addConnectorCustomizer("io.syndesis.connector.rest.swagger.ResponseCustomizer")