diff options
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src')
-rw-r--r-- | plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java index 47e94ff51..d5bca3f5a 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java @@ -24,6 +24,8 @@ package org.onap.policy.apex.plugins.event.carrier.restclient; import lombok.Getter; import lombok.Setter; import org.onap.policy.apex.service.parameters.carriertechnology.RestPluginCarrierTechnologyParameters; +import org.onap.policy.common.parameters.GroupValidationResult; +import org.onap.policy.common.parameters.ValidationStatus; // @formatter:off /** @@ -59,4 +61,19 @@ public class RestClientCarrierTechnologyParameters extends RestPluginCarrierTech this.setEventProducerPluginClass(ApexRestClientProducer.class.getName()); this.setEventConsumerPluginClass(ApexRestClientConsumer.class.getName()); } + + /** + * {@inheritDoc} + */ + @Override + public GroupValidationResult validateUrl(final GroupValidationResult result) { + // Check if the URL has been set for event output + final String urlNullMessage = "no URL has been set for event sending on " + getLabel(); + if (getUrl() == null) { + result.setResult("url", ValidationStatus.INVALID, urlNullMessage); + return result; + } + + return super.validateUrl(result); + } } |