faa066fe51a65965b7df82811bbf38ecc457ec11
[policy/distribution.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.distribution.forwarding.apex.pdp;
22
23 /**
24  * This builder holds all the parameters needed to build an instance of {@link ApexPdpPolicyForwarderParameterGroup}
25  * class.
26  *
27  * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
28  */
29 public class ApexPdpPolicyForwarderParameterBuilder {
30
31     private String hostname;
32     private int port;
33     private boolean ignoreConflicts;
34     private boolean forceUpdate;
35
36     /**
37      * Set host name to this {@link ApexPdpPolicyForwarderParameterBuilder} instance.
38      *
39      * @param hostname the host name
40      */
41     public ApexPdpPolicyForwarderParameterBuilder setHostname(final String hostname) {
42         this.hostname = hostname;
43         return this;
44     }
45
46     /**
47      * Set port to this {@link ApexPdpPolicyForwarderParameterBuilder} instance.
48      *
49      * @param port the port number
50      */
51     public ApexPdpPolicyForwarderParameterBuilder setPort(final int port) {
52         this.port = port;
53         return this;
54     }
55
56     /**
57      * Set ignore conflicts flag to this {@link ApexPdpPolicyForwarderParameterBuilder} instance.
58      *
59      * @param ignoreConflicts the ignore conflicts flag
60      */
61     public ApexPdpPolicyForwarderParameterBuilder setIgnoreConflicts(final boolean ignoreConflicts) {
62         this.ignoreConflicts = ignoreConflicts;
63         return this;
64     }
65
66     /**
67      * Set force update flag to this {@link ApexPdpPolicyForwarderParameterBuilder} instance.
68      *
69      * @param forceUpdate the force update flag
70      */
71     public ApexPdpPolicyForwarderParameterBuilder setForceUpdate(final boolean forceUpdate) {
72         this.forceUpdate = forceUpdate;
73         return this;
74     }
75
76     /**
77      * Returns the host name of this {@link ApexPdpPolicyForwarderParameterBuilder} instance.
78      *
79      * @return the host name
80      */
81     public String getHostname() {
82         return hostname;
83     }
84
85     /**
86      * Returns the port of this {@link ApexPdpPolicyForwarderParameterBuilder} instance.
87      *
88      * @return the port
89      */
90     public int getPort() {
91         return port;
92     }
93
94     /**
95      * Returns the ignore conflicts flag of this {@link ApexPdpPolicyForwarderParameterBuilder} instance.
96      *
97      * @return the ignoreConflicts
98      */
99     public boolean isIgnoreConflicts() {
100         return ignoreConflicts;
101     }
102
103     /**
104      * Returns the force update flag of this {@link ApexPdpPolicyForwarderParameterBuilder} instance.
105      *
106      * @return the forceUpdate
107      */
108     public boolean isForceUpdate() {
109         return forceUpdate;
110     }
111 }