Added HTTPS and CADI/AAF Support for PDP-X
[policy/xacml-pdp.git] / main / src / main / java / org / onap / policy / pdpx / main / parameters / RestServerParameters.java
index e04a0f2..c452c75 100644 (file)
@@ -35,21 +35,22 @@ public class RestServerParameters implements ParameterGroup {
     private int port;
     private String userName;
     private String password;
+    private boolean https;
+    private boolean aaf;
 
     /**
      * Constructor for instantiating RestServerParameters.
      *
-     * @param host the host name
-     * @param port the port
-     * @param userName the user name
-     * @param password the password
+     * @param builder the RestServer builder
      */
-    public RestServerParameters(final String host, final int port, final String userName, final String password) {
+    public RestServerParameters(final RestServerBuilder builder) {
         super();
-        this.host = host;
-        this.port = port;
-        this.userName = userName;
-        this.password = password;
+        this.host = builder.getHost();
+        this.port = builder.getPort();
+        this.userName = builder.getUserName();
+        this.password = builder.getPassword();
+        this.https = builder.isHttps();
+        this.aaf = builder.isAaf();
     }
 
     /**
@@ -98,6 +99,24 @@ public class RestServerParameters implements ParameterGroup {
         return password;
     }
 
+    /**
+     * Return the https flag of this RestServerParameters instance.
+     *
+     * @return the https flag
+     */
+    public boolean isHttps() {
+        return https;
+    }
+
+    /**
+     * Return the aaf flag of this RestServerParameters instance.
+     *
+     * @return the aaf flag
+     */
+    public boolean isAaf() {
+        return aaf;
+    }
+
     /**
      * Set the name of this RestServerParameters instance.
      *