Update apache camel from 2.x to 3.x
[aai/router-core.git] / src / main / java / org / onap / aai / rest / RestClientEndpoint.java
index 5e6d751..e39a9ca 100644 (file)
@@ -2,8 +2,8 @@
  * ============LICENSE_START=======================================================
  * org.onap.aai
  * ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017 Amdocs
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
 package org.onap.aai.rest;
 
+import org.apache.camel.Category;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.support.DefaultEndpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
@@ -34,11 +33,9 @@ import org.apache.camel.spi.UriPath;
 import java.util.Map;
 
 
-/**
- * Represents a RestClient endpoint.
- */
 @UriEndpoint(scheme = "ecomp-rest", syntax = "ecomp-rest:op",
-    consumerClass = RestClientConsumer.class, label = "RestClient2", title = "")
+    consumerClass = RestClientConsumer.class, label = "RestClient2", title = "ecomp-rest",
+    firstVersion = "1.0.0", category = {Category.CORE})
 public class RestClientEndpoint extends DefaultEndpoint {
 
   public static final String CONTEXT_PARAM_CLIENT_CERT = "ecomp-client-cert";
@@ -50,32 +47,24 @@ public class RestClientEndpoint extends DefaultEndpoint {
   public static final String OUT_HEADER_RESPONSE_CODE = "ecomp-response-code";
   public static final String OUT_HEADER_RESPONSE_MSG = "ecomp-response-message";
 
-  @UriPath
-  @Metadata(required = "true")
+  @UriPath(description = "op")
+  @Metadata(required = true)
   private String op;
-
-  @UriParam
+  @UriParam(description = "ecomp client cert")
   private String ecompClientCert;
-
-  @UriParam
+  @UriParam(description = "ecomp key store")
   private String ecompKeystore;
-
-  @UriParam
+  @UriParam(description = "ecomp key store passwd")
   private String ecompKeystorePassword;
 
-
   public RestClientEndpoint() {}
 
   public RestClientEndpoint(String uri, RestClientComponent component) {
     super(uri, component);
   }
 
-  public RestClientEndpoint(String endpointUri) {
-    super(endpointUri);
-  }
-
   @Override
-  protected void setProperties(Object bean, Map<String, Object> parameters) throws Exception {
+  public void setProperties(Object bean, Map<String, Object> parameters) {
     super.setProperties(bean, parameters);
   }
 
@@ -86,7 +75,7 @@ public class RestClientEndpoint extends DefaultEndpoint {
   public Consumer createConsumer(Processor processor) throws Exception {
     return new RestClientConsumer(this, processor);
   }
-
+  @Override
   public boolean isSingleton() {
     return true;
   }