From 68377161605e39c8c74ea77d0b504177480788f3 Mon Sep 17 00:00:00 2001 From: "Gao, Chenfei (cg287m)" Date: Thu, 22 Jun 2017 14:48:41 -0400 Subject: [POLICY-22] Reorganizing drools-apps Change-Id: I5f9bb3908f8d55c466dd847ae5e01a424e9ba364 Signed-off-by: Gao, Chenfei (cg287m) Signed-off-by: Pamela Dragosh --- .../policy/vnf/trafficgenerator/PGRequest.java | 41 +++++++++++++++++++++ .../onap/policy/vnf/trafficgenerator/PGStream.java | 42 ++++++++++++++++++++++ .../policy/vnf/trafficgenerator/PGStreams.java | 42 ++++++++++++++++++++++ .../vnf/trafficgenerator/util/Serialization.java | 32 +++++++++++++++++ 4 files changed, 157 insertions(+) create mode 100644 controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PGRequest.java create mode 100644 controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PGStream.java create mode 100644 controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PGStreams.java create mode 100644 controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/util/Serialization.java (limited to 'controlloop/common/model-impl/trafficgenerator/src/main') diff --git a/controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PGRequest.java b/controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PGRequest.java new file mode 100644 index 000000000..d08d9422e --- /dev/null +++ b/controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PGRequest.java @@ -0,0 +1,41 @@ +/*- + * ============LICENSE_START======================================================= + * trafficgenerator + * ================================================================================ + * 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.vnf.trafficgenerator; + +import java.io.Serializable; + + +import com.google.gson.annotations.SerializedName; + +public class PGRequest implements Serializable { + + /** + * + */ + private static final long serialVersionUID = -3283942659786236032L; + + @SerializedName("pg-streams") + public PGStreams pgStreams; + + public PGRequest() { + } + +} diff --git a/controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PGStream.java b/controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PGStream.java new file mode 100644 index 000000000..de5a2c37d --- /dev/null +++ b/controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PGStream.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * trafficgenerator + * ================================================================================ + * 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.vnf.trafficgenerator; + +import java.io.Serializable; + +import com.google.gson.annotations.SerializedName; + +public class PGStream implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 5567635677419358210L; + + @SerializedName("id") + public String streamId; + @SerializedName("is-enabled") + public String isEnabled; + + public PGStream() { + } + +} diff --git a/controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PGStreams.java b/controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PGStreams.java new file mode 100644 index 000000000..dc0d4084f --- /dev/null +++ b/controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PGStreams.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * trafficgenerator + * ================================================================================ + * 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.vnf.trafficgenerator; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; + +import com.google.gson.annotations.SerializedName; + +public class PGStreams implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 5567635677419358210L; + + @SerializedName("pg-stream") + public List pgStream= new LinkedList(); + + public PGStreams() { + } + +} diff --git a/controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/util/Serialization.java b/controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/util/Serialization.java new file mode 100644 index 000000000..e64991d94 --- /dev/null +++ b/controlloop/common/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/util/Serialization.java @@ -0,0 +1,32 @@ +/*- + * ============LICENSE_START======================================================= + * trafficgenerator + * ================================================================================ + * 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.vnf.trafficgenerator.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(); +} -- cgit 1.2.3-korg