diff options
author | Gao, Chenfei (cg287m) <cgao@research.att.com> | 2017-06-22 14:48:41 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2017-06-29 12:50:23 -0400 |
commit | 68377161605e39c8c74ea77d0b504177480788f3 (patch) | |
tree | fb0fb8a27178da607866e1850f73ac056e046ee8 /controlloop/common/model-impl/aai/src/main | |
parent | f0c29b57e132e6335f0fa7bbad885d403e4c85df (diff) |
[POLICY-22] Reorganizing drools-apps
Change-Id: I5f9bb3908f8d55c466dd847ae5e01a424e9ba364
Signed-off-by: Gao, Chenfei (cg287m) <chenfei.gao11@gmail.com>
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/common/model-impl/aai/src/main')
26 files changed, 1360 insertions, 0 deletions
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java new file mode 100644 index 000000000..d2e2d710f --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java @@ -0,0 +1,40 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class AAIGETResponse implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 7311418432051756161L; + + @SerializedName("relationship-list") + public RelationshipList relationshipList; + + public AAIGETResponse() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199CloudRegion.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199CloudRegion.java new file mode 100644 index 000000000..4c80c4a41 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199CloudRegion.java @@ -0,0 +1,51 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199CloudRegion implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -897231529157222683L; + + @SerializedName("cloud-owner") + public String cloudOwner; + + @SerializedName("cloud-region-id") + public String cloudRegionId; + + @SerializedName("cloud-region-version") + public String cloudRegionVersion; + + @SerializedName("complex-name") + public String complexName; + + @SerializedName("resource-version") + public String resourceVersion; + + public AAINQF199CloudRegion() { + } +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199ExtraProperties.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199ExtraProperties.java new file mode 100644 index 000000000..ca5863a46 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199ExtraProperties.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199ExtraProperties implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 4109625574744702319L; + + @SerializedName("extra-property") + public List<AAINQF199ExtraProperty> extraProperty = new LinkedList<AAINQF199ExtraProperty>(); + + public AAINQF199ExtraProperties() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199ExtraProperty.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199ExtraProperty.java new file mode 100644 index 000000000..7280ff9bc --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199ExtraProperty.java @@ -0,0 +1,48 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199ExtraProperty implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -3861240617222397736L; + + @SerializedName("property-name") + public String propertyName; + + @SerializedName("property-value") + public String propertyValue; + + public AAINQF199ExtraProperty() { + } + + public AAINQF199ExtraProperty(String propertyName, String propertyValue) { + this.propertyName = propertyName; + this.propertyValue = propertyValue; + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199GenericVNF.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199GenericVNF.java new file mode 100644 index 000000000..8d667bb75 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199GenericVNF.java @@ -0,0 +1,82 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199GenericVNF implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 834322706248060559L; + + @SerializedName("vnf-id") + public String vnfID; + + @SerializedName("vnf-name") + public String vnfName; + + @SerializedName("vnf-name2") + public String vnfName2; + + @SerializedName("vnf-type") + public String vnfType; + + @SerializedName("service-id") + public String serviceId; + + @SerializedName("prov-status") + public String provStatus; + + @SerializedName("operational-state") + public String operationalState; + + @SerializedName("ipv4-oam-address") + public String ipv4OamAddress; + + @SerializedName("ipv4-loopback0-address") + public String ipv4Loopback0Address; + + @SerializedName("in-maint") + public Boolean inMaint; + + @SerializedName("is-closed-loop-disabled") + public Boolean isClosedLoopDisabled; + + @SerializedName("resource-version") + public String resourceVersion; + + @SerializedName("encrypted-access-flag") + public Boolean encrypedAccessFlag; + + @SerializedName("persona-model-id") + public String personaModelId; + + @SerializedName("persona-model-version") + public String personaModelVersion; + + public AAINQF199GenericVNF() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199InstanceFilters.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199InstanceFilters.java new file mode 100644 index 000000000..80ab73d74 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199InstanceFilters.java @@ -0,0 +1,43 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199InstanceFilters implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 8993824591338121185L; + + @SerializedName("instance-filter") + public List<Map<String, Map<String, String>>> instanceFilter = new LinkedList<Map<String, Map<String, String>>>(); + + public AAINQF199InstanceFilters() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199InventoryResponseItem.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199InventoryResponseItem.java new file mode 100644 index 000000000..d896c931b --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199InventoryResponseItem.java @@ -0,0 +1,64 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199InventoryResponseItem implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 7142072567154675183L; + + @SerializedName("model-name") + public String modelName; + + @SerializedName("vf-module") + public AAINQF199VfModule vfModule; + + @SerializedName("service-instance") + public AAINQF199ServiceInstance serviceInstance; + + @SerializedName("vserver") + public AAINQF199VServer vserver; + + @SerializedName("tenant") + public AAINQF199Tenant tenant; + + @SerializedName("cloud-region") + public AAINQF199CloudRegion cloudRegion; + + @SerializedName("generic-vnf") + public AAINQF199GenericVNF genericVNF; + + @SerializedName("extra-properties") + public AAINQF199ExtraProperties extraProperties; + + @SerializedName("inventory-response-items") + public AAINQF199InventoryResponseItems items; + + public AAINQF199InventoryResponseItem() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199InventoryResponseItems.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199InventoryResponseItems.java new file mode 100644 index 000000000..d3d17093f --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199InventoryResponseItems.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199InventoryResponseItems implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 7602807659381179004L; + + @SerializedName("inventory-response-item") + public List<AAINQF199InventoryResponseItem> inventoryResponseItems = new LinkedList<AAINQF199InventoryResponseItem>(); + + public AAINQF199InventoryResponseItems() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java new file mode 100644 index 000000000..e02021a43 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java @@ -0,0 +1,108 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +import org.onap.policy.aai.AAIGETResponse; +import org.onap.policy.aai.util.Serialization; +import org.onap.policy.rest.RESTManager; +import org.onap.policy.rest.RESTManager.Pair; + +import com.google.gson.JsonSyntaxException; + +public final class AAINQF199Manager { + + public static AAINQF199Response postQuery(String url, String username, String password, AAINQF199Request request, UUID requestID) { + + Map<String, String> headers = new HashMap<String, String>(); + headers.put("X-FromAppId", "POLICY"); + headers.put("X-TransactionId", requestID.toString()); + headers.put("Accept", "application/json"); + + url = url + "/aai/search/named-query"; + + Pair<Integer, String> httpDetails = RESTManager.post(url, username, password, headers, "application/json", Serialization.gsonPretty.toJson(request)); + + if (httpDetails == null) { + System.out.println("AAI POST Null Response to " + url); + return null; + } + + System.out.println(url); + System.out.println(httpDetails.a); + System.out.println(httpDetails.b); + if (httpDetails.a == 200) { + try { + AAINQF199Response response = Serialization.gsonPretty.fromJson(httpDetails.b, AAINQF199Response.class); + return response; + } catch (JsonSyntaxException e) { + System.err.println("Failed to deserialize into AAIResponse" + e.getLocalizedMessage()); + } + } + + return null; + } + + public static AAIGETResponse getQuery(String urlGet, String username, String password, UUID requestID, String vnfId) { + + Map<String, String> headers = new HashMap<String, String>(); + headers.put("X-FromAppId", "POLICY"); + headers.put("X-TransactionId", requestID.toString()); + headers.put("Accept", "application/json"); + + urlGet = urlGet + "/aai/v8/network/generic-vnfs/generic-vnf/" + vnfId; + + int attemptsLeft = 3; + AAIGETResponse responseGet = null; + + while(attemptsLeft-- > 0){ + + Pair<Integer, String> httpDetailsGet = RESTManager.get(urlGet, username, password, headers); + if (httpDetailsGet == null) { + System.out.println("AAI GET Null Response to " + urlGet); + return null; + } + + System.out.println(urlGet); + System.out.println(httpDetailsGet.a); + System.out.println(httpDetailsGet.b); + + if (httpDetailsGet.a == 200) { + try { + responseGet = Serialization.gsonPretty.fromJson(httpDetailsGet.b, AAIGETResponse.class); + return responseGet; + } catch (JsonSyntaxException e) { + System.err.println("Failed to deserialize into AAIResponse" + e.getLocalizedMessage()); + } + } + try { + Thread.sleep(1000); + } catch (InterruptedException e) {} + + } + + return null; + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199NamedQuery.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199NamedQuery.java new file mode 100644 index 000000000..922d67f39 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199NamedQuery.java @@ -0,0 +1,41 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; +import java.util.UUID; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199NamedQuery implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -3277980060302645333L; + + @SerializedName("named-query-uuid") + public UUID namedQueryUUID; + + public AAINQF199NamedQuery() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199QueryParameters.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199QueryParameters.java new file mode 100644 index 000000000..8812a2483 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199QueryParameters.java @@ -0,0 +1,40 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199QueryParameters implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -4291227193197126982L; + + @SerializedName("named-query") + public AAINQF199NamedQuery namedQuery; + + public AAINQF199QueryParameters() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Request.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Request.java new file mode 100644 index 000000000..0feb6d73b --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Request.java @@ -0,0 +1,65 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + + +/* + * + * { + "query-parameters": { + "named-query": { + "named-query-uuid": "f199cb88-5e69-4b1f-93e0-6f257877d066" + } + }, + "instance-filters": { + "instance-filter": [ + { + "vserver": { + "vserver-name": "dfw1lb01lb01" + } + } + ] + } +} + + * + */ + +public class AAINQF199Request implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("query-parameters") + public AAINQF199QueryParameters queryParameters; + @SerializedName("instance-filters") + public AAINQF199InstanceFilters instanceFilters; + + public AAINQF199Request() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199RequestWrapper.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199RequestWrapper.java new file mode 100644 index 000000000..fdd630ba8 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199RequestWrapper.java @@ -0,0 +1,39 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.util.UUID; + +public class AAINQF199RequestWrapper { + + public UUID requestID; + public AAINQF199Request aainqf199request; + + public AAINQF199RequestWrapper() { + + } + + public AAINQF199RequestWrapper(UUID requestID, AAINQF199Request aainqf199request){ + this.requestID = requestID; + this.aainqf199request = aainqf199request; + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Response.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Response.java new file mode 100644 index 000000000..68a011b98 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Response.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199Response implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 8411407444051746101L; + + @SerializedName("inventory-response-item") + public List<AAINQF199InventoryResponseItem> inventoryResponseItems = new LinkedList<AAINQF199InventoryResponseItem>(); + + public AAINQF199Response() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199ResponseWrapper.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199ResponseWrapper.java new file mode 100644 index 000000000..d4fe8f86d --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199ResponseWrapper.java @@ -0,0 +1,40 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.util.UUID; + +import org.onap.policy.aai.AAINQF199.AAINQF199Response; + +public class AAINQF199ResponseWrapper { + + public UUID requestID; + public AAINQF199Response aainqf199response; + + public AAINQF199ResponseWrapper() { + + } + + public AAINQF199ResponseWrapper(UUID requestID, AAINQF199Response aainqf199response){ + this.requestID = requestID; + this.aainqf199response = aainqf199response; + } +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199ServiceInstance.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199ServiceInstance.java new file mode 100644 index 000000000..8aa4a1b2a --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199ServiceInstance.java @@ -0,0 +1,55 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199ServiceInstance implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -8000944396593889586L; + + @SerializedName("service-instance-id") + public String serviceInstanceID; + + @SerializedName("service-instance-name") + public String serviceInstanceName; + + @SerializedName("persona-model-id") + public String personaModelId; + + @SerializedName("persona-model-version") + public String personaModelVersion; + + @SerializedName("service-instance-location-id") + public String serviceInstanceLocationId; + + @SerializedName("resource-version") + public String resourceVersion; + + public AAINQF199ServiceInstance() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Tenant.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Tenant.java new file mode 100644 index 000000000..763c052ca --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Tenant.java @@ -0,0 +1,45 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199Tenant implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 4702784101671984364L; + + @SerializedName("tenant-id") + public String tenantId; + + @SerializedName("tenant-name") + public String tenantName; + + @SerializedName("resource-version") + public String resourceVersion; + + public AAINQF199Tenant() { + } +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199VServer.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199VServer.java new file mode 100644 index 000000000..8667544eb --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199VServer.java @@ -0,0 +1,54 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199VServer { + + @SerializedName("vserver-id") + public String vserverId; + + @SerializedName("vserver-name") + public String vserverName; + + @SerializedName("vserver-name2") + public String vserverName2; + + @SerializedName("prov-status") + public String provStatus; + + @SerializedName("vserver-selflink") + public String vserverSelflink; + + @SerializedName("in-maint") + public Boolean inMaint; + + @SerializedName("is-closed-loop-disabled") + public Boolean isClosedLoopDisabled; + + @SerializedName("resource-version") + public String resourceVersion; + + public AAINQF199VServer() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199VfModule.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199VfModule.java new file mode 100644 index 000000000..50161fb8a --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199VfModule.java @@ -0,0 +1,69 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.AAINQF199; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class AAINQF199VfModule implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 8019133081429638231L; + + @SerializedName("vf-module-id") + public String vfModuleId; + + @SerializedName("vf-module-name") + public String vfModuleName; + + @SerializedName("heat-stack-id") + public String heatStackId; + + @SerializedName("orchestration-status") + public String orchestrationStatus; + + @SerializedName("is-base-vf-module") + public Boolean isBaseVfModule; + + @SerializedName("resource-version") + public String resourceVersion; + + @SerializedName("persona-model-id") + public String personaModelId; + + @SerializedName("persona-model-version") + public String personaModelVersion; + + @SerializedName("widget-model-id") + public String widgetModelId; + + @SerializedName("widget-model-version") + public String widgetModelVersion; + + @SerializedName("contrail-service-instance-fqdn") + public String contrailServiceInstanceFqdn; + + public AAINQF199VfModule() { + } +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PNF.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PNF.java new file mode 100644 index 000000000..d8074e0a8 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PNF.java @@ -0,0 +1,75 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai; + +import java.io.Serializable; + +public class PNF implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -3535108358668248501L; + + public String PNFName; + public PNFType PNFType; + + public PNF() { + + } + + public PNF(PNF pnf) { + this.PNFName = pnf.PNFName; + this.PNFType = pnf.PNFType; + } + + @Override + public String toString() { + return "PNF [PNFName=" + PNFName + ", PNFType=" + PNFType + "]"; + } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((PNFName == null) ? 0 : PNFName.hashCode()); + result = prime * result + ((PNFType == null) ? 0 : PNFType.hashCode()); + return result; + } + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PNF other = (PNF) obj; + if (PNFName == null) { + if (other.PNFName != null) + return false; + } else if (!PNFName.equals(other.PNFName)) + return false; + if (PNFType != other.PNFType) + return false; + return true; + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PNFInstance.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PNFInstance.java new file mode 100644 index 000000000..21d1d50ac --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PNFInstance.java @@ -0,0 +1,97 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai; + +import java.io.Serializable; + +public class PNFInstance implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -3694152433472165034L; + + public String PNFName; + public String PNFInstanceName; + public PNFType PNFType; + public String PNFSerial; + + public PNFInstance() { + + } + + public PNFInstance(PNFInstance instance) { + if (instance == null) { + return; + } + this.PNFName = instance.PNFName; + this.PNFInstanceName = instance.PNFInstanceName; + this.PNFType = instance.PNFType; + this.PNFSerial = instance.PNFSerial; + } + + @Override + public String toString() { + return "PNFInstance [PNFName=" + PNFName + ", PNFInstanceName=" + PNFInstanceName + ", PNFType=" + PNFType + + ", PNFSerial=" + PNFSerial + "]"; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((PNFInstanceName == null) ? 0 : PNFInstanceName.hashCode()); + result = prime * result + ((PNFName == null) ? 0 : PNFName.hashCode()); + result = prime * result + ((PNFSerial == null) ? 0 : PNFSerial.hashCode()); + result = prime * result + ((PNFType == null) ? 0 : PNFType.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PNFInstance other = (PNFInstance) obj; + if (PNFInstanceName == null) { + if (other.PNFInstanceName != null) + return false; + } else if (!PNFInstanceName.equals(other.PNFInstanceName)) + return false; + if (PNFName == null) { + if (other.PNFName != null) + return false; + } else if (!PNFName.equals(other.PNFName)) + return false; + if (PNFSerial == null) { + if (other.PNFSerial != null) + return false; + } else if (!PNFSerial.equals(other.PNFSerial)) + return false; + if (PNFType != other.PNFType) + return false; + return true; + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PNFType.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PNFType.java new file mode 100644 index 000000000..e3d068877 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/PNFType.java @@ -0,0 +1,39 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai; + +public enum PNFType { + ENODEB("eNodeB"), + PSERVER("pserver") + ; + + private String type; + + private PNFType(String type) { + this.type = type; + } + + public String toString() { + return this.type; + + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToPropertyItem.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToPropertyItem.java new file mode 100644 index 000000000..7b5bcafa7 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToPropertyItem.java @@ -0,0 +1,35 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai; + +import com.google.gson.annotations.SerializedName; + +public class RelatedToPropertyItem { + + @SerializedName("property-key") + public String propertyKey; + @SerializedName("property-value") + public String propertyValue; + + public RelatedToPropertyItem() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipItem.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipItem.java new file mode 100644 index 000000000..0cfc82ec9 --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipItem.java @@ -0,0 +1,36 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai; + +import java.util.List; +import java.util.LinkedList; + +import com.google.gson.annotations.SerializedName; + +public class RelationshipItem { + + @SerializedName("related-to-property") + public List<RelatedToPropertyItem> relatedToProperty = new LinkedList<RelatedToPropertyItem>(); + + public RelationshipItem() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipList.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipList.java new file mode 100644 index 000000000..36d34f75b --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipList.java @@ -0,0 +1,36 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai; + +import java.util.List; +import java.util.LinkedList; + +import com.google.gson.annotations.SerializedName; + +public class RelationshipList { + + @SerializedName("relationship") + public List<RelationshipItem> relationship = new LinkedList<RelationshipItem>(); + + public RelationshipList() { + } + +} diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/util/Serialization.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/util/Serialization.java new file mode 100644 index 000000000..785c173eb --- /dev/null +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/util/Serialization.java @@ -0,0 +1,32 @@ +/*- + * ============LICENSE_START======================================================= + * aai + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.aai.util; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +public final class Serialization { + + final static public Gson gsonPretty = new GsonBuilder().disableHtmlEscaping() + .setPrettyPrinting() +// .registerTypeAdapter(AAIQueryParameters.class, new notificationTypeAdapter()) + .create(); +} |